DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org, Ori Kam <orika@nvidia.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Akhil Goyal <gakhil@marvell.com>
Subject: [PATCH v2 1/4] ethdev: fix missing MACsec flow item descriptor
Date: Sat, 24 Oct 2026 13:04:07 +0100	[thread overview]
Message-ID: <8ccaee11fc265b812abd75ef7defdfdd47e65c3d.1792843432.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <8fa05595f3596e9355dd90df7fc278b104beb20b.1792757739.git.anatoly.burakov@intel.com>

RTE_FLOW_ITEM_TYPE_MACSEC was never added to rte_flow_desc_item[].
The table uses designated initializers, so the MACSEC slot is zero
filled: its name is NULL and its size is zero.

As a result, RTE_FLOW_CONV_OP_ITEM_NAME on MACSEC passes a NULL
source to strlcpy(), and rte_flow_copy() as well as the pattern
conversion operations reject any pattern containing a MACSEC item
as an unknown item type.

Add the missing descriptor entry.

Fixes: 0aaf097585a6 ("ethdev: add MACsec flow item")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/ethdev/rte_flow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 0ebf59165d4..eeab79aa5d9 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -229,6 +229,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
 			rte_flow_item_l2tpv2_mask),
 	MK_FLOW_ITEM_MASK(PPP, sizeof(struct rte_flow_item_ppp),
 			rte_flow_item_ppp_mask),
+	MK_FLOW_ITEM(MACSEC, sizeof(struct rte_flow_item_macsec)),
 	MK_FLOW_ITEM_MASK(METER_COLOR, sizeof(struct rte_flow_item_meter_color),
 			rte_flow_item_meter_color_mask),
 	MK_FLOW_ITEM(IPV6_ROUTING_EXT, sizeof(struct rte_flow_item_ipv6_routing_ext)),
-- 
2.52.0


  parent reply	other threads:[~2026-10-24 12:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 12:15 [PATCH v1 1/1] ethdev: add flow item structure size query Anatoly Burakov
2026-10-23 16:04 ` Stephen Hemminger
2026-10-24 12:04 ` Anatoly Burakov [this message]
2026-10-24 12:04   ` [PATCH v2 2/4] ethdev: fix missing flow action descriptors Anatoly Burakov
2026-10-24 12:04   ` [PATCH v2 3/4] test/ethdev: add flow conversion tests Anatoly Burakov
2026-10-24 12:04   ` [PATCH v2 4/4] ethdev: add flow item structure size query Anatoly Burakov
2026-10-24 13:50 ` [PATCH v3 1/5] ethdev: fix flow conversion with null buffer Anatoly Burakov
2026-10-24 13:50   ` [PATCH v3 2/5] ethdev: fix missing MACsec flow item descriptor Anatoly Burakov
2026-10-24 13:50   ` [PATCH v3 3/5] ethdev: fix missing flow action descriptors Anatoly Burakov
2026-10-24 13:50   ` [PATCH v3 4/5] test/ethdev: add flow conversion tests Anatoly Burakov
2026-10-24 13:50   ` [PATCH v3 5/5] ethdev: add flow item structure size query Anatoly Burakov
2026-10-26 16:51   ` [PATCH v3 1/5] ethdev: fix flow conversion with null buffer Stephen Hemminger
2026-10-27 10:56     ` Burakov, Anatoly
2026-10-27  9:50 ` [PATCH v4 1/6] " Anatoly Burakov
2026-10-27  9:50   ` [PATCH v4 2/6] ethdev: fix missing MACsec flow item descriptor Anatoly Burakov
2026-10-27  9:50   ` [PATCH v4 3/6] ethdev: fix missing flow action descriptors Anatoly Burakov
2026-10-27 13:59     ` Stephen Hemminger
2026-10-27  9:50   ` [PATCH v4 4/6] ethdev: fix indirect action conversion with short buffer Anatoly Burakov
2026-10-27  9:50   ` [PATCH v4 5/6] test/ethdev: add flow conversion tests Anatoly Burakov
2026-10-27  9:50   ` [PATCH v4 6/6] ethdev: add flow item structure size query 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=8ccaee11fc265b812abd75ef7defdfdd47e65c3d.1792843432.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    /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