[dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec validation helper' has been queued to stable release 20.11.1
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 5 12:17:06 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/df8185a23676498f4da4297c99b0bf2a19691909
Thanks.
Luca Boccassi
---
>From df8185a23676498f4da4297c99b0bf2a19691909 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov at oktetlabs.ru>
Date: Wed, 6 Jan 2021 13:05:59 +0300
Subject: [PATCH] common/sfc_efx/base: fix MAE match spec validation helper
[ upstream commit 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 ]
A particular FW version is aware of some set of match fields.
Depending on FW configuration and match specification type, a
known field may not necessarily be allowed to have a non-zero
mask. FW communicates such restrictions via field capabilities
MCDI. Newer FW may be aware of more fields. For such fields,
older FW simply does not report any capabilities.
A situation may occur when libefx is aware of a match field
which the FW is unaware of (eg., older FW), that is, FW does
not report capability status for this field. In this case,
libefx must consider such field as unsupported and demand
all-zeros mask for it when validating match specifications.
Currently, the helper in question simply exits and reports
that the specification is valid when it encounters a field
with no capability status available. This is clearly wrong.
Introduce the missing check to fix the problem.
Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
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 | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 22f29d454c..7fd42218f6 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -897,8 +897,17 @@ efx_mae_match_spec_is_valid(
if (m_size == 0)
continue; /* Skip array gap */
- if ((unsigned int)field_cap_id >= field_ncaps)
- break;
+ if ((unsigned int)field_cap_id >= field_ncaps) {
+ /*
+ * The FW has not reported capability status for
+ * this field. Make sure that its mask is zeroed.
+ */
+ is_valid = efx_mask_is_all_zeros(m_size, m_buf);
+ if (is_valid != B_FALSE)
+ continue;
+ else
+ break;
+ }
switch (field_caps[field_cap_id].emfc_support) {
case MAE_FIELD_SUPPORTED_MATCH_MASK:
--
2.29.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-02-05 11:18:35.413711002 +0000
+++ 0140-common-sfc_efx-base-fix-MAE-match-spec-validation-he.patch 2021-02-05 11:18:29.022695225 +0000
@@ -1 +1 @@
-From 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 Mon Sep 17 00:00:00 2001
+From df8185a23676498f4da4297c99b0bf2a19691909 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 ]
+
@@ -26 +27,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list