patch 'net/cnxk: fix promiscuous state after MAC change' has been queued to stable release 21.11.8

Kevin Traynor ktraynor at redhat.com
Fri Aug 23 18:17:56 CEST 2024


Hi,

FYI, your patch has been queued to stable release 21.11.8

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6fa9a2e32d563133cdc17e957dc4916ddaf7b032

Thanks.

Kevin

---
>From 6fa9a2e32d563133cdc17e957dc4916ddaf7b032 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali at marvell.com>
Date: Tue, 28 May 2024 14:02:46 +0530
Subject: [PATCH] net/cnxk: fix promiscuous state after MAC change

[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]

If promiscuous mode is enabled and default MAC address is set
again then promiscuous mode gets disabled in hardware.

This change will restore promiscuous behavior after configuring
default MAC address.

Fixes: 5fe86db2a0dd ("net/cnxk: support MAC address set")

Signed-off-by: Rahul Bhansali <rbhansali at marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 67c0dd8865..84124c84a6 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -341,4 +341,11 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
 			goto exit;
 		}
+
+		if (eth_dev->data->promiscuous) {
+			rc = roc_nix_mac_promisc_mode_enable(nix, true);
+			if (rc)
+				plt_err("Failed to setup promisc mode in mac, rc=%d(%s)", rc,
+					roc_error_msg_get(rc));
+		}
 	}
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:11.351443060 +0100
+++ 0048-net-cnxk-fix-promiscuous-state-after-MAC-change.patch	2024-08-23 17:18:09.701430039 +0100
@@ -1 +1 @@
-From 5f1bce00fddffc63e5634891df2b02859c010944 Mon Sep 17 00:00:00 2001
+From 6fa9a2e32d563133cdc17e957dc4916ddaf7b032 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index c8260fcb9c..b1093dd584 100644
+index 67c0dd8865..84124c84a6 100644
@@ -24 +25 @@
-@@ -452,4 +452,11 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
+@@ -341,4 +341,11 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)



More information about the stable mailing list