On Tue, 10 Nov 2026 21:22:00 +0800 Zhang Tengfei <[email protected]> wrote:
> The flow rule wrappers each held one filter structure after their > list links were removed. Store the filter structure directly in > rte_flow. RSS still goes through txgbe_rss_conf_init() so the saved > key and queue pointers refer to that stored copy. > > Signed-off-by: Zhang Tengfei <[email protected]> > --- Looks good, AI review did have some observations to consider for later releases [PATCH] net/txgbe: store flow rules without wrappers Mechanical change; the conversion is correct. Allocation sizes match the copied types, every flow->rule consumer is updated, and the RSS path still goes through txgbe_rss_conf_init() so conf.key and conf.queue point into the stored copy rather than the parse-time stack buffer. txgbe_config_rss_filter(..., FALSE) and txgbe_action_rss_same() therefore still see valid pointers on destroy. Info flow->rule is void *, so the casts on the lines being touched in txgbe_flow_destroy() are unnecessary. Since those lines are being rewritten anyway, plain struct assignment is simpler than rte_memcpy() in the control path: case RTE_ETH_FILTER_NTUPLE: ntuple_filter_ptr = pmd_flow->rule; ntuple_filter = *ntuple_filter_ptr; ret = txgbe_add_del_ntuple_filter(dev, &ntuple_filter, FALSE); Same for the ethertype, syn, fdir and l2_tunnel cases. Not introduced here, but worth a follow-up: these rule copies are CPU-only bookkeeping and do not need hugepage memory; malloc()/free() would do.

