[dpdk-stable] patch 'net/sfc: fix mark support in EF100 native Rx datapath' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:02:35 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/15cf480f1a93b1e24d5d20db142472ba2fa03ff2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 15cf480f1a93b1e24d5d20db142472ba2fa03ff2 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Date: Wed, 28 Apr 2021 17:17:02 +0300
Subject: [PATCH] net/sfc: fix mark support in EF100 native Rx datapath
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit ad82838e3c7c11bd940bf4b5384377fa83c6a2ba ]

Decouple user mark from user flag. Usage of mark does not require to
use flag as well. Flag is not actually supported yet.

Fixes: 1aacc3d388d3 ("net/sfc: support user mark and flag Rx for EF100")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov at oktetlabs.ru>
---
 drivers/net/sfc/sfc_ef100_rx.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index c1c56d0e75..6ec0451057 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -46,6 +46,9 @@
 	((_ndesc) - 1 /* head must not step on tail */ - \
 	 1 /* Rx error */ - 1 /* flush */)
 
+/** Invalid user mark value when the mark should be treated as unset */
+#define SFC_EF100_USER_MARK_INVALID	0
+
 struct sfc_ef100_rx_sw_desc {
 	struct rte_mbuf			*mbuf;
 };
@@ -365,7 +368,6 @@ static const efx_rx_prefix_layout_t sfc_ef100_rx_prefix_layout = {
 
 		SFC_EF100_RX_PREFIX_FIELD(LENGTH, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(RSS_HASH_VALID, B_FALSE),
-		SFC_EF100_RX_PREFIX_FIELD(USER_FLAG, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(CLASS, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(RSS_HASH, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(USER_MARK, B_FALSE),
@@ -404,12 +406,16 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,
 					      ESF_GZ_RX_PREFIX_RSS_HASH);
 	}
 
-	if ((rxq->flags & SFC_EF100_RXQ_USER_MARK) &&
-	    EFX_TEST_OWORD_BIT(rx_prefix[0], ESF_GZ_RX_PREFIX_USER_FLAG_LBN)) {
-		ol_flags |= PKT_RX_FDIR_ID;
+	if (rxq->flags & SFC_EF100_RXQ_USER_MARK) {
+		uint32_t user_mark;
+
 		/* EFX_OWORD_FIELD converts little-endian to CPU */
-		m->hash.fdir.hi = EFX_OWORD_FIELD(rx_prefix[0],
-						  ESF_GZ_RX_PREFIX_USER_MARK);
+		user_mark = EFX_OWORD_FIELD(rx_prefix[0],
+					    ESF_GZ_RX_PREFIX_USER_MARK);
+		if (user_mark != SFC_EF100_USER_MARK_INVALID) {
+			ol_flags |= PKT_RX_FDIR_ID;
+			m->hash.fdir.hi = user_mark;
+		}
 	}
 
 	m->ol_flags = ol_flags;
@@ -794,8 +800,7 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr,
 		rxq->flags &= ~SFC_EF100_RXQ_RSS_HASH;
 
 	if ((unsup_rx_prefix_fields &
-	     ((1U << EFX_RX_PREFIX_FIELD_USER_FLAG) |
-	      (1U << EFX_RX_PREFIX_FIELD_USER_MARK))) == 0)
+	     (1U << EFX_RX_PREFIX_FIELD_USER_MARK)) == 0)
 		rxq->flags |= SFC_EF100_RXQ_USER_MARK;
 	else
 		rxq->flags &= ~SFC_EF100_RXQ_USER_MARK;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.217857400 +0800
+++ 0061-net-sfc-fix-mark-support-in-EF100-native-Rx-datapath.patch	2021-06-12 06:53:56.300000000 +0800
@@ -1 +1 @@
-From ad82838e3c7c11bd940bf4b5384377fa83c6a2ba Mon Sep 17 00:00:00 2001
+From 15cf480f1a93b1e24d5d20db142472ba2fa03ff2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit ad82838e3c7c11bd940bf4b5384377fa83c6a2ba ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 07b37ff47f..8cde24c585 100644
+index c1c56d0e75..6ec0451057 100644


More information about the stable mailing list