patch 'net/enic: fix filter mode detection' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:48 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/72dd22208019fd848d18883a955376c68a59e385

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 72dd22208019fd848d18883a955376c68a59e385 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim at cisco.com>
Date: Tue, 12 Oct 2021 18:21:23 -0700
Subject: [PATCH] net/enic: fix filter mode detection

[ upstream commit fb9274546120898933f225742d9e37530504e8f9 ]

vnic_dev_capable_filter_mode() currently fails when
CMD_CAPABILITY(CMD_ADD_FILTER) returns ERR_EPERM. In turn, this
failure causes the driver initialization to fail.

But, firmware may legitimately return ERR_EPERM. For example, VF vNIC
returns ERR_EPERM when it does not support filtering at all. So, treat
ERR_EPERM as "no filtering available" instead of an unexpected error.

Fixes: 322b355f2183 ("net/enic/base: bring NIC interface functions up to date")

Signed-off-by: Hyong Youb Kim <hyonkim at cisco.com>
Reviewed-by: John Daley <johndale at cisco.com>
---
 drivers/net/enic/base/vnic_dev.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index 899df07df7..5535aa8774 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -570,8 +570,8 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, u32 *mode,
 	return 1;
 }
 
-/*  Determine the "best" filtering mode VIC is capaible of. Returns one of 4
- *  value or 0 on error:
+/*  Determine the "best" filtering mode VIC is capable of. Returns one of 4
+ *  value or 0 if filtering is unavailble:
  *	FILTER_FLOWMAN- flowman api capable
  *	FILTER_DPDK_1- advanced filters availabile
  *	FILTER_USNIC_IP_FLAG - advanced filters but with the restriction that
@@ -606,6 +606,14 @@ int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, u32 *mode,
 		args[0] = CMD_ADD_FILTER;
 		args[1] = 0;
 		err = vnic_dev_cmd_args(vdev, CMD_CAPABILITY, args, 2, 1000);
+		/*
+		 * ERR_EPERM may be returned if, for example, vNIC is
+		 * on a VF. It simply means no filtering is available
+		 */
+		if (err == -ERR_EPERM) {
+			*mode = 0;
+			return 0;
+		}
 		if (err)
 			return err;
 		max_level = args[1];
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:10.827337237 +0100
+++ 0084-net-enic-fix-filter-mode-detection.patch	2021-11-30 16:50:05.862874058 +0100
@@ -1 +1 @@
-From fb9274546120898933f225742d9e37530504e8f9 Mon Sep 17 00:00:00 2001
+From 72dd22208019fd848d18883a955376c68a59e385 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb9274546120898933f225742d9e37530504e8f9 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index ab6e05739b..9c42595ced 100644
+index 899df07df7..5535aa8774 100644
@@ -27 +28 @@
-@@ -644,8 +644,8 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, uint32_t *mode,
+@@ -570,8 +570,8 @@ static int vnic_dev_flowman_enable(struct vnic_dev *vdev, u32 *mode,
@@ -38 +39 @@
-@@ -680,6 +680,14 @@ int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, uint32_t *mode,
+@@ -606,6 +606,14 @@ int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, u32 *mode,


More information about the stable mailing list