From: Stephen Hemminger <stephen@networkplumber.org>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH v3 05/29] net/intel/common: add common flow action parsing
Date: Sun, 19 Apr 2026 08:41:45 -0700 [thread overview]
Message-ID: <20260419084145.53cb5215@phoenix.local> (raw)
In-Reply-To: <f9fb4aed4467f90a541c7f36af23817be12e8c9c.1775826526.git.anatoly.burakov@intel.com>
On Fri, 10 Apr 2026 14:12:59 +0100
Anatoly Burakov <anatoly.burakov@intel.com> wrote:
> Currently, each driver has their own code for action parsing, which results
> in a lot of duplication and subtle mismatches in behavior between drivers.
>
> Add common infrastructure, based on the following assumptions:
>
> - All drivers support at most 4 actions at once, but usually less
> - Not every action is supported by all drivers
> - We can check a few common things to filter out obviously wrong actions
> - Driver performs semantic checks on all valid actions
>
> So, the intention is to reject everything we can reasonably reject at the
> outset without knowing anything about the drivers, parametrize what is
> trivial to parametrize, and leave the rest for the driver to implement.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
----------------------------------------------------------------------
Patch 5/29: net/intel/common: add common flow action parsing
----------------------------------------------------------------------
Error: In __flow_action_check_rss(), the queue/queue_num consistency
check has inverted logic:
if ((q_num == 0) == (rss->queue == NULL)) {
return rte_flow_error_set(error, ...);
}
This errors when q_num and queue are both absent or both present (the
valid cases), and accepts when they are mismatched (the invalid cases).
When q_num > 0 and queue == NULL passes this check, the subsequent
contiguity loop dereferences rss->queue, which is a NULL pointer
dereference.
The key_len/key check immediately below correctly uses != for the same
pattern. Fix:
if ((q_num == 0) != (rss->queue == NULL)) {
Warning: ci_flow_check_actions() returns -EINVAL at the end when
parsed_actions->count is zero (all VOID actions), but does not call
rte_flow_error_set(). Every other error path in that function sets
the flow error. Callers may report a confusing empty error to the
application.
next prev parent reply other threads:[~2026-04-19 15:41 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 14:20 [PATCH v1 00/25] Add common flow attr/action parsing infrastructure to Intel PMD's Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 01/25] net/intel/common: add common flow action parsing Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 02/25] net/intel/common: add common flow attr validation Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 03/25] net/ixgbe: use common checks in ethertype filter Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 04/25] net/ixgbe: use common checks in syn filter Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 05/25] net/ixgbe: use common checks in L2 tunnel filter Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 06/25] net/ixgbe: use common checks in ntuple filter Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 07/25] net/ixgbe: use common checks in security filter Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 08/25] net/ixgbe: use common checks in FDIR filters Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 09/25] net/ixgbe: use common checks in RSS filter Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 10/25] net/i40e: use common flow attribute checks Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 11/25] net/i40e: refactor RSS flow parameter checks Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 12/25] net/i40e: use common action checks for ethertype Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 13/25] net/i40e: use common action checks for FDIR Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 14/25] net/i40e: use common action checks for tunnel Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 15/25] net/iavf: use common flow attribute checks Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 16/25] net/iavf: use common action checks for IPsec Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 17/25] net/iavf: use common action checks for hash Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 18/25] net/iavf: use common action checks for FDIR Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 19/25] net/iavf: use common action checks for fsub Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 20/25] net/iavf: use common action checks for flow query Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 21/25] net/ice: use common flow attribute checks Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 22/25] net/ice: use common action checks for hash Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 23/25] net/ice: use common action checks for FDIR Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 24/25] net/ice: use common action checks for switch Anatoly Burakov
2026-02-11 14:20 ` [PATCH v1 25/25] net/ice: use common action checks for ACL Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 00/25] Add common flow attr/action parsing infrastructure to Intel PMD's Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 01/25] net/intel/common: add common flow action parsing Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 02/25] net/intel/common: add common flow attr validation Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 03/25] net/ixgbe: use common checks in ethertype filter Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 04/25] net/ixgbe: use common checks in syn filter Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 05/25] net/ixgbe: use common checks in L2 tunnel filter Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 06/25] net/ixgbe: use common checks in ntuple filter Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 07/25] net/ixgbe: use common checks in security filter Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 08/25] net/ixgbe: use common checks in FDIR filters Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 09/25] net/ixgbe: use common checks in RSS filter Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 10/25] net/i40e: use common flow attribute checks Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 11/25] net/i40e: refactor RSS flow parameter checks Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 12/25] net/i40e: use common action checks for ethertype Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 13/25] net/i40e: use common action checks for FDIR Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 14/25] net/i40e: use common action checks for tunnel Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 15/25] net/iavf: use common flow attribute checks Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 16/25] net/iavf: use common action checks for IPsec Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 17/25] net/iavf: use common action checks for hash Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 18/25] net/iavf: use common action checks for FDIR Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 19/25] net/iavf: use common action checks for fsub Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 20/25] net/iavf: use common action checks for flow query Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 21/25] net/ice: use common flow attribute checks Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 22/25] net/ice: use common action checks for hash Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 23/25] net/ice: use common action checks for FDIR Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 24/25] net/ice: use common action checks for switch Anatoly Burakov
2026-03-16 10:52 ` [PATCH v2 25/25] net/ice: use common action checks for ACL Anatoly Burakov
2026-03-16 10:59 ` [PATCH v2 00/25] Add common flow attr/action parsing infrastructure to Intel PMD's Bruce Richardson
2026-04-10 13:12 ` [PATCH v3 00/29] " Anatoly Burakov
2026-04-10 13:12 ` [PATCH v3 01/29] net/ixgbe: fix shared PF pointer in representor Anatoly Burakov
2026-04-10 13:12 ` [PATCH v3 02/29] net/ixgbe: store max VFs in adapter Anatoly Burakov
2026-04-10 13:12 ` [PATCH v3 03/29] net/ixgbe: reduce FDIR conf macro usage Anatoly Burakov
2026-04-10 13:12 ` [PATCH v3 04/29] net/ixgbe: use adapter in flow-related calls Anatoly Burakov
2026-04-19 15:41 ` Stephen Hemminger
2026-04-10 13:12 ` [PATCH v3 05/29] net/intel/common: add common flow action parsing Anatoly Burakov
2026-04-19 15:41 ` Stephen Hemminger [this message]
2026-04-10 13:13 ` [PATCH v3 06/29] net/intel/common: add common flow attr validation Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 07/29] net/ixgbe: use common checks in ethertype filter Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 08/29] net/ixgbe: use common checks in syn filter Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 09/29] net/ixgbe: use common checks in L2 tunnel filter Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 10/29] net/ixgbe: use common checks in ntuple filter Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 11/29] net/ixgbe: use common checks in security filter Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 12/29] net/ixgbe: use common checks in FDIR filters Anatoly Burakov
2026-04-19 15:42 ` Stephen Hemminger
2026-04-10 13:13 ` [PATCH v3 13/29] net/ixgbe: use common checks in RSS filter Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 14/29] net/i40e: use common flow attribute checks Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 15/29] net/i40e: refactor RSS flow parameter checks Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 16/29] net/i40e: use common action checks for ethertype Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 17/29] net/i40e: use common action checks for FDIR Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 18/29] net/i40e: use common action checks for tunnel Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 19/29] net/iavf: use common flow attribute checks Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 20/29] net/iavf: use common action checks for IPsec Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 21/29] net/iavf: use common action checks for hash Anatoly Burakov
2026-04-10 13:13 ` [PATCH v3 22/29] net/iavf: use common action checks for FDIR Anatoly Burakov
2026-04-10 13:22 ` [PATCH v3 23/29] net/iavf: use common action checks for fsub Anatoly Burakov
2026-04-10 13:22 ` [PATCH v3 24/29] net/iavf: use common action checks for flow query Anatoly Burakov
2026-04-10 13:22 ` [PATCH v3 25/29] net/ice: use common flow attribute checks Anatoly Burakov
2026-04-10 13:22 ` [PATCH v3 26/29] net/ice: use common action checks for hash Anatoly Burakov
2026-04-10 13:22 ` [PATCH v3 27/29] net/ice: use common action checks for FDIR Anatoly Burakov
2026-04-10 13:22 ` [PATCH v3 28/29] net/ice: use common action checks for switch Anatoly Burakov
2026-04-10 13:22 ` [PATCH v3 29/29] net/ice: use common action checks for ACL Anatoly Burakov
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=20260419084145.53cb5215@phoenix.local \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox