DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Leroy <maxime@leroys.fr>
To: dev@dpdk.org
Cc: thomas@monjalon.net, david.marchand@redhat.com,
	hemant.agrawal@oss.nxp.com, Maxime Leroy <maxime@leroys.fr>
Subject: [PATCH v1 1/2] net/dpaa2: revert inner RSS level support
Date: Mon, 20 Jul 2026 15:34:35 +0200	[thread overview]
Message-ID: <20260720133436.869334-2-maxime@leroys.fr> (raw)
In-Reply-To: <20260630123857.392884-1-maxime@leroys.fr>

This reverts commit 618a06c53d479ae576ff01c7d274b10c60b3d3d5.

RTE_ETH_RSS_LEVEL_INNERMOST was mapped to the innermost IP instance by
programming the IP key extracts with hdr_index = HDR_INDEX_LAST. The
hardware only resolves that index when several IP headers are stacked.
A non-tunnelled frame carries a single IP header, so the extract
resolves to nothing, the RSS hash is constant and every such frame is
steered to a single Rx queue.

The ethdev API defines INNERMOST by encapsulation level, not by the
presence of a tunnel: a plain frame's innermost header is its only IP
header and must be hashed. The dpaa2 hardware cannot honour that and
keep true inner-only semantics for tunnelled traffic at the same time,
so the level cannot be implemented correctly as merged.

Revert it. Hashing the outer plus the inner IP under the PMD default
level, which spreads both plain and tunnelled traffic, is added in a
follow-up.

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
---
 doc/guides/rel_notes/release_26_07.rst |  1 -
 drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 23 -----------------------
 drivers/net/dpaa2/dpaa2_ethdev.c       |  3 +--
 3 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/doc/guides/rel_notes/release_26_07.rst b/doc/guides/rel_notes/release_26_07.rst
index 6badd6d91b..6a528e4a0d 100644
--- a/doc/guides/rel_notes/release_26_07.rst
+++ b/doc/guides/rel_notes/release_26_07.rst
@@ -162,7 +162,6 @@ New Features
 
 * **Updated NXP dpaa2 driver.**
 
-  * Added inner RSS level support for tunnelled traffic.
   * Added RSS RETA query and update support.
   * Removed the software VLAN strip offload:
     ``RTE_ETH_RX_OFFLOAD_VLAN_STRIP`` is no longer advertised,
diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index 07f4a3d414..26ad105c73 100644
--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@ -236,13 +236,6 @@ dpaa2_remove_flow_dist(struct rte_eth_dev *eth_dev,
 	return ret;
 }
 
-/* dpkg from_hdr.hdr_index value selecting the innermost IP instance (see
- * fsl_dpkg.h, where hdr_index is only defined for NET_PROT_IP/IPv4/IPv6/
- * VLAN/MPLS). Used to hash on the inner IP of tunnelled traffic when
- * RTE_ETH_RSS_LEVEL_INNERMOST is requested.
- */
-#define DPAA2_DIST_HDR_INDEX_LAST 0xff
-
 int
 dpaa2_distset_to_dpkg_profile_cfg(
 		uint64_t req_dist_set,
@@ -257,18 +250,8 @@ dpaa2_distset_to_dpkg_profile_cfg(
 	int esp_configured = 0;
 	int ah_configured = 0;
 	int pppoe_configured = 0;
-	uint8_t hdr_index = 0;
 
 	memset(kg_cfg, 0, sizeof(struct dpkg_profile_cfg));
-
-	/* RTE_ETH_RSS_LEVEL_INNERMOST asks for the inner header to be hashed.
-	 * Map it to the innermost IP instance in the key extracts; the level
-	 * bits are not protocol bits, so strip them before the loop.
-	 */
-	if ((req_dist_set & RTE_ETH_RSS_LEVEL_MASK) == RTE_ETH_RSS_LEVEL_INNERMOST)
-		hdr_index = DPAA2_DIST_HDR_INDEX_LAST;
-	req_dist_set &= ~RTE_ETH_RSS_LEVEL_MASK;
-
 	while (req_dist_set) {
 		if (req_dist_set % 2 != 0) {
 			dist_field = 1ULL << loop;
@@ -406,8 +389,6 @@ dpaa2_distset_to_dpkg_profile_cfg(
 
 				kg_cfg->extracts[i].extract.from_hdr.prot =
 					NET_PROT_IP;
-				kg_cfg->extracts[i].extract.from_hdr.hdr_index =
-					hdr_index;
 				kg_cfg->extracts[i].extract.from_hdr.field =
 					NH_FLD_IP_SRC;
 				kg_cfg->extracts[i].type =
@@ -418,8 +399,6 @@ dpaa2_distset_to_dpkg_profile_cfg(
 
 				kg_cfg->extracts[i].extract.from_hdr.prot =
 					NET_PROT_IP;
-				kg_cfg->extracts[i].extract.from_hdr.hdr_index =
-					hdr_index;
 				kg_cfg->extracts[i].extract.from_hdr.field =
 					NH_FLD_IP_DST;
 				kg_cfg->extracts[i].type =
@@ -430,8 +409,6 @@ dpaa2_distset_to_dpkg_profile_cfg(
 
 				kg_cfg->extracts[i].extract.from_hdr.prot =
 					NET_PROT_IP;
-				kg_cfg->extracts[i].extract.from_hdr.hdr_index =
-					hdr_index;
 				kg_cfg->extracts[i].extract.from_hdr.field =
 					NH_FLD_IP_PROTO;
 				kg_cfg->extracts[i].type =
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 53ea060a4c..f211357919 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -453,8 +453,7 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->max_hash_mac_addrs = 0;
 	dev_info->max_vfs = 0;
 	dev_info->max_vmdq_pools = RTE_ETH_16_POOLS;
-	dev_info->flow_type_rss_offloads = DPAA2_RSS_OFFLOAD_ALL |
-		RTE_ETH_RSS_LEVEL_OUTERMOST | RTE_ETH_RSS_LEVEL_INNERMOST;
+	dev_info->flow_type_rss_offloads = DPAA2_RSS_OFFLOAD_ALL;
 	/* DPAA2 has no software-visible indirection table: incoming packets are
 	 * dispatched to FQs via 'queue_id = hash % dist_size'. We expose the
 	 * standard RETA API as an emulation that only accepts uniform patterns
-- 
2.43.0


  parent reply	other threads:[~2026-07-20 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 12:38 [RFC PATCH] net/dpaa2: fix RSS at inner level for non-tunnelled traffic Maxime Leroy
2026-07-15 17:00 ` Maxime Leroy
2026-07-16  7:47   ` Hemant Agrawal
2026-07-16  8:00     ` Maxime Leroy
2026-07-20 13:34 ` [PATCH v1 0/2] net/dpaa2: fix RSS for plain and tunnelled traffic Maxime Leroy
2026-07-20 13:34 ` Maxime Leroy [this message]
2026-07-20 13:34 ` [PATCH v1 2/2] net/dpaa2: hash inner IP for " Maxime Leroy

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=20260720133436.869334-2-maxime@leroys.fr \
    --to=maxime@leroys.fr \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@oss.nxp.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