#233 - Add automatic RSS for multi-queue flows#234
Conversation
Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
|
| Filename | Overview |
|---|---|
| include/daqiri/types.h | Adds ids_ (std::vector<uint16_t>) to FlowAction after legacy fields, plus flow_config_actions, flow_queue_ids, and flow_queue_action_uses_rss helpers; ABI bump to 1 is correct given the layout change. |
| src/rss.h | New header with the fixed 40-byte Microsoft Toeplitz RSS key and a rss_table_size helper that rounds up to the next power-of-two; straightforward and correct. |
| src/engine.cpp | Validation updated to use flow_config_actions, adds duplicate-ID, unknown-ID, eCPRI+RSS, and reorder+RSS checks; removes the now-unnecessary empty-actions early-out safely because flow_config_actions always returns at least one element. |
| src/engines/dpdk/daqiri_dpdk_engine.cpp | Adds DpdkRxDestination that emits either RTE_FLOW_ACTION_TYPE_QUEUE or RTE_FLOW_ACTION_TYPE_RSS based on ids_ count; RSS flows routed to legacy path (not template); force_ipv4_udp pins the match pattern for Toeplitz hashing; pointer lifetimes are safe (stack-local struct within single create call). |
| src/engines/ibverbs/daqiri_ibverbs_engine.cpp | resolve_rx_destination creates DevX RQT + indirect TIR for multi-queue flows with correct byte-order and field masking; weak_ptr cache avoids redundant object creation; shutdown explicitly clears rule_specs before queues to release RSS TIR/RQT in the right order. |
| src/engines/ibverbs/mlx5_prm_min.h | Adds CREATE_RQT opcode, INDIRECT TIR disp_type, Toeplitz hash fn, L3/L4 prot types, hash field selectors, and RQT/create-rqt-in/out PRM structs needed by the new ibverbs RSS path. |
| src/engines/ibverbs/daqiri_ibverbs_engine.h | Adds RssDestination struct with custom shared_ptr deleter, rss_destination field on DynamicFlowEntry and RuleSpec, weak_ptr cache on PortSteering, and resolve_rx_destination declaration. |
| src/common.cpp | YAML parser correctly handles mutually-exclusive id/ids keys, validates non-empty sequence, and range-checks each entry to 16 bits before pushing into ids_. |
| examples/dynamic_rx_flow_example.cpp | Adds RSS phase to the dynamic-flow test: varied UDP source ports, add_dynamic_udp_rss_flow helper, per-packet flow-ID verification, and per-phase packet count checks; all RX bursts still free properly. |
| python/daqiri_common_pybind.cpp | Exposes ids_ on FlowAction via def_readwrite; one-line, correct. |
| CMakeLists.txt | DAQIRI_ABI_VERSION bumped from 0 to 1 to reflect the FlowAction layout change; AGENTS.md updated in sync. |
Reviews (2): Last reviewed commit: "#233 - Document multi-queue RSS in READM..." | Re-trigger Greptile
Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
Summary
ids: [queue, ...]in YAML, C++, and PythonMARK + RSSactions and ibverbs DevX RQT/indirect-TIR destinationsDAQIRI_ABI_VERSIONto 1 for the publicFlowActionlayout changeWhy
A flow previously targeted only one RX queue, preventing applications from distributing varied IPv4/UDP traffic across multiple queues while preserving per-flow affinity. Multi-queue targets now select hardware RSS automatically without changing existing scalar configurations.
User impact
Existing
action.idconfigurations remain unchanged. Users can specify:A fixed five-tuple remains on one queue. Roughly even packet counts require enough varied tuples with reasonably balanced traffic. Exact per-packet striping is not part of this change.
Validation
git diff --checkCloses #233