Add dummy TX queue when no transmit is defined#1402
Conversation
Signed-off-by: Cliff Burdick <30670611+cliffburdick@users.noreply.github.com>
Signed-off-by: Cliff Burdick <30670611+cliffburdick@users.noreply.github.com>
Greptile SummaryThis PR adds a Key changes:
Two minor style points were found: the new Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant App
participant DpdkMgr
participant DPDK
App->>DpdkMgr: initialize()
DpdkMgr->>DpdkMgr: init_rx_core_q_map()
DpdkMgr->>DpdkMgr: create_dummy_rx_q()
Note over DpdkMgr: if no RX queues, inject UNUSED_P_Q0
DpdkMgr->>DpdkMgr: create_dummy_tx_q() NEW
Note over DpdkMgr: if no TX queues, inject UNUSED_TX_P_Q0
DpdkMgr->>DpdkMgr: adjust_memory_regions()
DpdkMgr->>DpdkMgr: allocate_memory_regions()
DpdkMgr->>DPDK: rte_eth_tx_queue_setup() for all TX queues
Note over DPDK: dummy queue satisfies DPDK 25.11+ requirement
DpdkMgr->>DPDK: rte_eth_dev_start()
DpdkMgr->>DpdkMgr: setup_pools_and_rings()
Note over DpdkMgr: ring and burst pool created for dummy TX queue too
App->>DpdkMgr: run()
loop For each TX queue
alt queue name starts with UNUSED
DpdkMgr-->>DpdkMgr: skip, no worker thread launched
else real TX queue
DpdkMgr->>DPDK: rte_eal_remote_launch(tx_worker)
end
end
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds creation of dummy TX queues (mirroring dummy RX logic) for interfaces with no TX queues, calls the new function during initialize(), and prevents launching TX worker threads for dummy (UNUSED) TX queues in run(). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…network_dpdk_mgr.cpp Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Cliff Burdick <30670611+cliffburdick@users.noreply.github.com>
DPDK 25.11 and higher will fail to start if no TX queues are defined. Just like we do on RX, we defined a dummy TX queue if the user is not transmitting. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Adds creation of required dummy transmit queues during advanced network interface setup to support newer DPDK versions. * **Bug Fixes** * Ensures transmit queues are created during initialization so interfaces start reliably. * **Performance** * Prevents launching worker threads for dummy transmit queues, reducing unnecessary resource use. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Cliff Burdick <30670611+cliffburdick@users.noreply.github.com> Co-authored-by: Bruce Hashemian <3968947+bhashemian@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
DPDK 25.11 and higher will fail to start if no TX queues are defined. Just like we do on RX, we defined a dummy TX queue if the user is not transmitting.
Summary by CodeRabbit
New Features
Bug Fixes
Performance