[dpdk-stable] patch 'common/sfc_efx/base: fix MPORT related byte order handling' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:17:05 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/07/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7e813f306102a74f9655b5cb3d01324fb0f25bb9

Thanks.

Luca Boccassi

---
>From 7e813f306102a74f9655b5cb3d01324fb0f25bb9 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at oktetlabs.ru>
Date: Mon, 28 Dec 2020 06:00:23 +0300
Subject: [PATCH] common/sfc_efx/base: fix MPORT related byte order handling

[ upstream commit f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f ]

MPORT values derived by helper functions are little-endian.
At the same time, MCDIs which consume these values perform
one more host-order to little-endian conversion internally.

Fix the helper functions to return host-order MPORT values.

Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec")
Fixes: bb024542fffd ("common/sfc_efx/base: add API for adding action drop")
Fixes: 097058033f03 ("common/sfc_efx/base: add API to get mport of PF/VF")

Reported-by: Andy Moreton <amoreton at xilinx.com>
Reviewed-by: Andy Moreton <amoreton at xilinx.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Signed-off-by: Ivan Malov <ivan.malov at oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx_mae.c | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index a54d5f6e6c..22f29d454c 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -593,7 +593,13 @@ efx_mae_mport_by_phy_port(
 	    MAE_MPORT_SELECTOR_PPORT_ID, phy_port);
 
 	memset(mportp, 0, sizeof (*mportp));
-	mportp->sel = dword.ed_u32[0];
+	/*
+	 * The constructed DWORD is little-endian,
+	 * but the resulting value is meant to be
+	 * passed to MCDIs, where it will undergo
+	 * host-order to little endian conversion.
+	 */
+	mportp->sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0);
 
 	return (0);
 
@@ -630,7 +636,13 @@ efx_mae_mport_by_pcie_function(
 	    MAE_MPORT_SELECTOR_FUNC_VF_ID, vf);
 
 	memset(mportp, 0, sizeof (*mportp));
-	mportp->sel = dword.ed_u32[0];
+	/*
+	 * The constructed DWORD is little-endian,
+	 * but the resulting value is meant to be
+	 * passed to MCDIs, where it will undergo
+	 * host-order to little endian conversion.
+	 */
+	mportp->sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0);
 
 	return (0);
 
@@ -1319,7 +1331,13 @@ efx_mae_action_set_populate_drop(
 	EFX_POPULATE_DWORD_1(dword,
 	    MAE_MPORT_SELECTOR_FLAT, MAE_MPORT_SELECTOR_NULL);
 
-	mport.sel = dword.ed_u32[0];
+	/*
+	 * The constructed DWORD is little-endian,
+	 * but the resulting value is meant to be
+	 * passed to MCDIs, where it will undergo
+	 * host-order to little endian conversion.
+	 */
+	mport.sel = EFX_DWORD_FIELD(dword, EFX_DWORD_0);
 
 	arg = (const uint8_t *)&mport.sel;
 
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:35.374446275 +0000
+++ 0139-common-sfc_efx-base-fix-MPORT-related-byte-order-han.patch	2021-02-05 11:18:29.022695225 +0000
@@ -1 +1 @@
-From f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f Mon Sep 17 00:00:00 2001
+From 7e813f306102a74f9655b5cb3d01324fb0f25bb9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0d58c4b501dd993f6e4cbbd5e77ae0b0aed071f ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list