Skip to content

feat(rtps): menuconfig option for the transport task priority - #856

Merged
finger563 merged 1 commit into
esp-cpp:mainfrom
Alaining:pr4b-rtps-thread-pool-prio-kconfig
Oct 22, 2026
Merged

finger563 merged 1 commit into
esp-cpp:mainfrom
Alaining:pr4b-rtps-thread-pool-prio-kconfig

Conversation

@Alaining

Copy link
Copy Markdown

Description

The transport's worker pool (rtps_worker_<n>) and reactor (rtps_reactor) run at the
profile's fixed THREAD_POOL_READER_PRIO (5 on ESP32). This adds
CONFIG_RTPS_THREAD_POOL_READER_PRIO (RTPS -> Transport task priority (advanced)) to set it.
0, the default, keeps the profile's value, so nothing changes unless it is set.

It follows the same path as the capacity overrides: Kconfig → RTPS_CFG_THREAD_POOL_READER_PRIO
→ the three profile headers. The README is updated.

Motivation and Context

All RTPS sends and receives run on these tasks. A busy task of higher priority on their core
stops all traffic until it yields, and QosBand can't help with that. On an ESP32-P4, a UI task
at priority 20 busy for about 1 s starved an e-stop heartbeat (100 ms period, 300 ms timeout):

Worker and reactor priority History overflow E-stop starved by LVGL
5 (current) 7 yes
20 0 no

How has this been tested?

  • The rtps example builds for esp32 with IDF v6.0.1, both with the option at 0 and at 20.
    The define reaches EsppTransport.cpp only when set. No new warnings, and clang-format is
    clean.
  • The table above was measured on hardware, with the priority set to 20.

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Documentation Update
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • My code follows the code style of this project.

🤖 Generated with Claude Code

…ctor task priority

CONFIG_RTPS_THREAD_POOL_READER_PRIO (0 = the profile's default, so nothing
changes unless it is set) overrides THREAD_POOL_READER_PRIO through a new
RTPS_CFG_THREAD_POOL_READER_PRIO macro, in the same way as the capacity
overrides. EsppTransport already gives that priority to its worker pool
(rtps_worker_<n>) and its reactor (rtps_reactor).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@finger563
finger563 self-requested a review October 22, 2026 05:56
@finger563 finger563 added enhancement New feature or request rtps real time publish subscribe labels Oct 22, 2026
@finger563
finger563 merged commit 2c6da37 into esp-cpp:main Oct 22, 2026
169 of 171 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request rtps real time publish subscribe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants