From: Stephen Hemminger <stephen@networkplumber.org>
To: Zhang Tengfei <zhtfdev@gmail.com>
Cc: dev@dpdk.org, jiawenwu@trustnetic.com, zaiyuwang@trustnetic.com
Subject: Re: [PATCH] net/txgbe: store flow rules without wrappers
Date: Tue, 10 Nov 2026 07:04:58 -0800 [thread overview]
Message-ID: <20261110070458.0be83f1a@phoenix.local> (raw)
In-Reply-To: <20261110132200.12673-1-zhtfdev@gmail.com>
On Tue, 10 Nov 2026 21:22:00 +0800
Zhang Tengfei <zhtfdev@gmail.com> 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 <zhtfdev@gmail.com>
> ---
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.
prev parent reply other threads:[~2026-11-10 15:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 13:22 [PATCH] net/txgbe: store flow rules without wrappers Zhang Tengfei
2026-11-10 15:04 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110070458.0be83f1a@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=jiawenwu@trustnetic.com \
--cc=zaiyuwang@trustnetic.com \
--cc=zhtfdev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.