[dpdk-stable] patch 'kni: check error code of allmulticast mode switch' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:32:09 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 686908c0164bdafd3aeef65dc691af78c55eda2f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 23 Apr 2021 16:12:42 +0800
Subject: [PATCH] kni: check error code of allmulticast mode switch
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit b1f4933ef320cfc9096101499b711d0dd65f2e51 ]

Some drivers may return errcode when switch allmulticast mode,
so it's necessary to check the return code.

Fixes: b34801d1aa2e ("kni: support allmulticast mode set")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 lib/librte_kni/rte_kni.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index eb24b0d0ae..17e4487306 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -514,6 +514,8 @@ kni_config_promiscusity(uint16_t port_id, uint8_t to_on)
 static int
 kni_config_allmulticast(uint16_t port_id, uint8_t to_on)
 {
+	int ret;
+
 	if (!rte_eth_dev_is_valid_port(port_id)) {
 		RTE_LOG(ERR, KNI, "Invalid port id %d\n", port_id);
 		return -EINVAL;
@@ -523,11 +525,16 @@ kni_config_allmulticast(uint16_t port_id, uint8_t to_on)
 		port_id, to_on);
 
 	if (to_on)
-		rte_eth_allmulticast_enable(port_id);
+		ret = rte_eth_allmulticast_enable(port_id);
 	else
-		rte_eth_allmulticast_disable(port_id);
+		ret = rte_eth_allmulticast_disable(port_id);
+	if (ret != 0)
+		RTE_LOG(ERR, KNI,
+			"Failed to %s allmulticast mode for port %u: %s\n",
+			to_on ? "enable" : "disable", port_id,
+			rte_strerror(-ret));
 
-	return 0;
+	return ret;
 }
 
 int
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.672163735 +0800
+++ 0245-kni-check-error-code-of-allmulticast-mode-switch.patch	2021-11-10 14:17:02.090744291 +0800
@@ -1 +1 @@
-From b1f4933ef320cfc9096101499b711d0dd65f2e51 Mon Sep 17 00:00:00 2001
+From 686908c0164bdafd3aeef65dc691af78c55eda2f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit b1f4933ef320cfc9096101499b711d0dd65f2e51 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -16 +18 @@
- lib/kni/rte_kni.c | 13 ++++++++++---
+ lib/librte_kni/rte_kni.c | 13 ++++++++++---
@@ -19,4 +21,4 @@
-diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
-index d3e236005e..fc8f0e7b5a 100644
---- a/lib/kni/rte_kni.c
-+++ b/lib/kni/rte_kni.c
+diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
+index eb24b0d0ae..17e4487306 100644
+--- a/lib/librte_kni/rte_kni.c
++++ b/lib/librte_kni/rte_kni.c


More information about the stable mailing list