From: luca.boccassi@gmail.com
To: Dengdui Huang <huangdengdui@huawei.com>
Cc: Dongdong Liu <liudongdong3@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/hns3: fix flushing multicast MAC address' has been queued to stable release 20.11.10
Date: Thu, 19 Oct 2023 00:58:55 +0100 [thread overview]
Message-ID: <20231018235930.3144-6-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20231018235930.3144-1-luca.boccassi@gmail.com>
Hi,
FYI, your patch has been queued to stable release 20.11.10
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/21/23. 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/04a3f8de6cc6d01e8d9223814afe0f53c96b2542
Thanks.
Luca Boccassi
---
From 04a3f8de6cc6d01e8d9223814afe0f53c96b2542 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Sat, 5 Aug 2023 16:36:25 +0800
Subject: [PATCH] net/hns3: fix flushing multicast MAC address
[ upstream commit 49d1ab205b033b6131fb895b5e4d9ebc14081e51 ]
According rte_eth_dev_set_mc_addr_list() API definition,
support flush multicast MAC address if mc_addr_set is NULL
or nb_mc_addr is zero.
Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 68 +++++++++++++++++++---------------
1 file changed, 39 insertions(+), 29 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 08e2ae53db..b898c7b5a3 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2037,12 +2037,42 @@ hns3_set_mc_addr_calc_addr(struct hns3_hw *hw,
*rm_addr_num = rm_num;
}
+static int
+hns3_configure_all_mc_mac_addr(struct hns3_adapter *hns, bool del)
+{
+ char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+ struct hns3_hw *hw = &hns->hw;
+ struct rte_ether_addr *addr;
+ int err = 0;
+ int ret;
+ int i;
+
+ for (i = 0; i < hw->mc_addrs_num; i++) {
+ addr = &hw->mc_addrs[i];
+ if (!rte_is_multicast_ether_addr(addr))
+ continue;
+ if (del)
+ ret = hns3_remove_mc_addr(hw, addr);
+ else
+ ret = hns3_add_mc_addr(hw, addr);
+ if (ret) {
+ err = ret;
+ rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
+ addr);
+ hns3_dbg(hw, "%s mc mac addr: %s failed for pf: ret = %d",
+ del ? "Remove" : "Restore", mac_str, ret);
+ }
+ }
+ return err;
+}
+
static int
hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
struct rte_ether_addr reserved_addr_list[HNS3_MC_MACADDR_NUM];
struct rte_ether_addr add_addr_list[HNS3_MC_MACADDR_NUM];
struct rte_ether_addr rm_addr_list[HNS3_MC_MACADDR_NUM];
@@ -2055,6 +2085,15 @@ hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
int ret;
int i;
+ if (mc_addr_set == NULL || nb_mc_addr == 0) {
+ rte_spinlock_lock(&hw->lock);
+ ret = hns3_configure_all_mc_mac_addr(hns, true);
+ if (ret == 0)
+ hw->mc_addrs_num = 0;
+ rte_spinlock_unlock(&hw->lock);
+ return ret;
+ }
+
/* Check if input parameters are valid */
ret = hns3_set_mc_addr_chk_param(hw, mc_addr_set, nb_mc_addr);
if (ret)
@@ -2102,35 +2141,6 @@ hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
return 0;
}
-static int
-hns3_configure_all_mc_mac_addr(struct hns3_adapter *hns, bool del)
-{
- char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
- struct hns3_hw *hw = &hns->hw;
- struct rte_ether_addr *addr;
- int err = 0;
- int ret;
- int i;
-
- for (i = 0; i < hw->mc_addrs_num; i++) {
- addr = &hw->mc_addrs[i];
- if (!rte_is_multicast_ether_addr(addr))
- continue;
- if (del)
- ret = hns3_remove_mc_addr(hw, addr);
- else
- ret = hns3_add_mc_addr(hw, addr);
- if (ret) {
- err = ret;
- rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
- addr);
- hns3_dbg(hw, "%s mc mac addr: %s failed for pf: ret = %d",
- del ? "Remove" : "Restore", mac_str, ret);
- }
- }
- return err;
-}
-
static int
hns3_check_mq_mode(struct rte_eth_dev *dev)
{
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-10-19 00:28:56.559140958 +0100
+++ 0006-net-hns3-fix-flushing-multicast-MAC-address.patch 2023-10-19 00:28:56.193803887 +0100
@@ -1 +1 @@
-From 49d1ab205b033b6131fb895b5e4d9ebc14081e51 Mon Sep 17 00:00:00 2001
+From 04a3f8de6cc6d01e8d9223814afe0f53c96b2542 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 49d1ab205b033b6131fb895b5e4d9ebc14081e51 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- drivers/net/hns3/hns3_common.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
+ drivers/net/hns3/hns3_ethdev.c | 68 +++++++++++++++++++---------------
+ 1 file changed, 39 insertions(+), 29 deletions(-)
@@ -19,5 +20,40 @@
-diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
-index 043c7673b4..c4d47f43fe 100644
---- a/drivers/net/hns3/hns3_common.c
-+++ b/drivers/net/hns3/hns3_common.c
-@@ -444,6 +444,7 @@ hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
+diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
+index 08e2ae53db..b898c7b5a3 100644
+--- a/drivers/net/hns3/hns3_ethdev.c
++++ b/drivers/net/hns3/hns3_ethdev.c
+@@ -2037,12 +2037,42 @@ hns3_set_mc_addr_calc_addr(struct hns3_hw *hw,
+ *rm_addr_num = rm_num;
+ }
+
++static int
++hns3_configure_all_mc_mac_addr(struct hns3_adapter *hns, bool del)
++{
++ char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
++ struct hns3_hw *hw = &hns->hw;
++ struct rte_ether_addr *addr;
++ int err = 0;
++ int ret;
++ int i;
++
++ for (i = 0; i < hw->mc_addrs_num; i++) {
++ addr = &hw->mc_addrs[i];
++ if (!rte_is_multicast_ether_addr(addr))
++ continue;
++ if (del)
++ ret = hns3_remove_mc_addr(hw, addr);
++ else
++ ret = hns3_add_mc_addr(hw, addr);
++ if (ret) {
++ err = ret;
++ rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
++ addr);
++ hns3_dbg(hw, "%s mc mac addr: %s failed for pf: ret = %d",
++ del ? "Remove" : "Restore", mac_str, ret);
++ }
++ }
++ return err;
++}
++
+ static int
+ hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mc_addr_set,
@@ -28,4 +64,4 @@
- struct rte_ether_addr *addr;
- int cur_addr_num;
- int set_addr_num;
-@@ -451,6 +452,15 @@ hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
+ struct rte_ether_addr reserved_addr_list[HNS3_MC_MACADDR_NUM];
+ struct rte_ether_addr add_addr_list[HNS3_MC_MACADDR_NUM];
+ struct rte_ether_addr rm_addr_list[HNS3_MC_MACADDR_NUM];
+@@ -2055,6 +2085,15 @@ hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
@@ -46,0 +83,36 @@
+@@ -2102,35 +2141,6 @@ hns3_set_mc_mac_addr_list(struct rte_eth_dev *dev,
+ return 0;
+ }
+
+-static int
+-hns3_configure_all_mc_mac_addr(struct hns3_adapter *hns, bool del)
+-{
+- char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+- struct hns3_hw *hw = &hns->hw;
+- struct rte_ether_addr *addr;
+- int err = 0;
+- int ret;
+- int i;
+-
+- for (i = 0; i < hw->mc_addrs_num; i++) {
+- addr = &hw->mc_addrs[i];
+- if (!rte_is_multicast_ether_addr(addr))
+- continue;
+- if (del)
+- ret = hns3_remove_mc_addr(hw, addr);
+- else
+- ret = hns3_add_mc_addr(hw, addr);
+- if (ret) {
+- err = ret;
+- rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
+- addr);
+- hns3_dbg(hw, "%s mc mac addr: %s failed for pf: ret = %d",
+- del ? "Remove" : "Restore", mac_str, ret);
+- }
+- }
+- return err;
+-}
+-
+ static int
+ hns3_check_mq_mode(struct rte_eth_dev *dev)
+ {
next prev parent reply other threads:[~2023-10-18 23:59 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 23:58 patch 'mempool: fix default ops for an empty mempool' " luca.boccassi
2023-10-18 23:58 ` patch 'rawdev: fix device class in log message' " luca.boccassi
2023-10-18 23:58 ` patch 'net/bonding: fix header for C++' " luca.boccassi
2023-10-18 23:58 ` patch 'net/hns3: fix VF default MAC modified when set failed' " luca.boccassi
2023-10-18 23:58 ` patch 'net/hns3: fix error code for multicast resource' " luca.boccassi
2023-10-18 23:58 ` luca.boccassi [this message]
2023-10-18 23:58 ` patch 'app/test: fix reference to master in bonding test' " luca.boccassi
2023-10-18 23:58 ` patch 'net/hns3: fix order in NEON Rx' " luca.boccassi
2023-10-18 23:58 ` patch 'random: initialize state for unregistered non-EAL threads' " luca.boccassi
2023-10-18 23:58 ` patch 'bus/dpaa: fix build with asserts for GCC 13' " luca.boccassi
2023-10-18 23:59 ` patch 'hash: align SSE lookup to scalar implementation' " luca.boccassi
2023-10-18 23:59 ` patch 'net/netvsc: increase VSP response timeout to 60 seconds' " luca.boccassi
2023-10-18 23:59 ` patch 'net/txgbe: add Tx queue maximum limit' " luca.boccassi
2023-10-18 23:59 ` patch 'net/txgbe: reconfigure MAC Rx when link update' " luca.boccassi
2023-10-18 23:59 ` patch 'net/txgbe: keep link down after device close' " luca.boccassi
2023-10-18 23:59 ` patch 'net/txgbe: check process type in close operation' " luca.boccassi
2023-10-18 23:59 ` patch 'net/tap: use MAC address parse API instead of local parser' " luca.boccassi
2023-10-18 23:59 ` patch 'app/testpmd: fix help string' " luca.boccassi
2023-10-18 23:59 ` patch 'cryptodev: add missing doc for security context' " luca.boccassi
2023-10-18 23:59 ` patch 'doc: replace code blocks with includes in security guide' " luca.boccassi
2023-10-18 23:59 ` patch 'test/crypto: fix IV in some vectors' " luca.boccassi
2023-10-18 23:59 ` patch 'test/crypto: skip some synchronous tests with CPU crypto' " luca.boccassi
2023-10-19 10:22 ` Power, Ciara
2023-10-19 10:28 ` Power, Ciara
2023-10-18 23:59 ` patch 'test/crypto: fix typo in asym tests' " luca.boccassi
2023-10-18 23:59 ` patch 'bus/pci: fix device ID log' " luca.boccassi
2023-10-18 23:59 ` patch 'test/event: fix crypto null device creation' " luca.boccassi
2023-10-18 23:59 ` patch 'event/sw: remove obsolete comment' " luca.boccassi
2023-10-18 23:59 ` patch 'event/sw: fix ordering corruption with op release' " luca.boccassi
2023-10-18 23:59 ` patch 'net/i40e: fix FDIR queue receives broadcast packets' " luca.boccassi
2023-10-18 23:59 ` patch 'net/iavf: fix VLAN offload strip flag' " luca.boccassi
2023-10-18 23:59 ` patch 'net/i40e: fix buffer leak on Rx reconfiguration' " luca.boccassi
2023-10-18 23:59 ` patch 'net/iavf: fix port stats clearing' " luca.boccassi
2023-10-18 23:59 ` patch 'net/ice: fix initial link status' " luca.boccassi
2023-10-18 23:59 ` patch 'net/iavf: remove log from Tx prepare function' " luca.boccassi
2023-10-18 23:59 ` patch 'net/iavf: fix TSO with big segments' " luca.boccassi
2023-10-18 23:59 ` patch 'net/ice: remove log from Tx prepare function' " luca.boccassi
2023-10-18 23:59 ` patch 'net/ice: fix TSO with big segments' " luca.boccassi
2023-10-18 23:59 ` patch 'net/mlx5: fix leak in sysfs port name translation' " luca.boccassi
2023-10-18 23:59 ` patch 'fib: fix adding default route overwriting entire table' " luca.boccassi
2023-10-18 23:59 ` patch 'fib6: fix adding default route as first route' " luca.boccassi
2023-10-18 23:59 ` patch 'net/bonding: fix link status callback stop' " luca.boccassi
2023-10-18 23:59 ` patch 'app/procinfo: remove unnecessary rte_malloc' " luca.boccassi
2023-11-08 19:24 ` patch 'malloc: remove return from void functions' " luca.boccassi
2023-11-08 19:25 ` patch 'eventdev: fix device pointer for vdev-based devices' " luca.boccassi
2023-11-08 19:25 ` patch 'eventdev: fix missing driver names in info struct' " luca.boccassi
2023-11-08 19:25 ` patch 'net/virtio: fix missing next flag in Tx packed ring' " luca.boccassi
2023-11-08 19:25 ` patch 'net/virtio: fix link state interrupt vector setting' " luca.boccassi
2023-11-08 19:25 ` patch 'vhost: fix missing vring call check on virtqueue access' " luca.boccassi
2023-11-08 19:25 ` patch 'vhost: fix missing " luca.boccassi
2023-11-08 19:25 ` patch 'ethdev: fix function name in comment' " luca.boccassi
2023-11-08 19:25 ` patch 'app/testpmd: fix early exit from signal' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: fix unchecked Rx free threshold' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: fix crash for NEON and SVE' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: fix double stats for IMP and global reset' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: remove reset log in secondary' " luca.boccassi
2023-11-08 19:25 ` patch 'test/bonding: remove unreachable statement' " luca.boccassi
2023-11-08 19:25 ` patch 'test/bonding: add missing check' " luca.boccassi
2023-11-08 19:25 ` patch 'net/bonding: fix possible overrun' " luca.boccassi
2023-11-08 19:25 ` patch 'net/txgbe: add proper memory barriers in Rx' " luca.boccassi
2023-11-08 19:25 ` patch 'ethdev: fix 32-bit build with GCC 13' " luca.boccassi
2023-11-08 19:25 ` patch 'net/enic: avoid extra unlock in MTU set' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: fix setting DCB capability' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: fix some return values' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: fix some error logs' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: keep set/get algo key functions local' " luca.boccassi
2023-11-08 19:25 ` patch 'net/hns3: fix uninitialized hash algo value' " luca.boccassi
2023-11-08 19:25 ` patch 'net/tap: fix L4 checksum offloading' " luca.boccassi
2023-11-08 19:25 ` patch 'net/tap: fix IPv4 " luca.boccassi
2023-11-08 19:25 ` patch 'app/procinfo: fix RSS info' " luca.boccassi
2023-11-08 19:25 ` patch 'app/procinfo: adjust format of " luca.boccassi
2023-11-08 19:25 ` patch 'net/nfp: fix link status interrupt' " luca.boccassi
2023-11-08 19:25 ` patch 'net/nfp: fix DMA error after abnormal exit' " luca.boccassi
2023-11-08 19:25 ` patch 'net/tap: fix RSS for fragmented packets' " luca.boccassi
2023-11-08 19:25 ` patch 'common/mlx5: fix controller index parsing' " luca.boccassi
2023-11-08 19:25 ` patch 'net/ice: fix L1 check interval' " luca.boccassi
2023-11-08 19:25 ` patch 'net/ice: fix DCF port statistics' " luca.boccassi
2023-11-08 19:25 ` patch 'crypto/nitrox: fix panic with high number of segments' " luca.boccassi
2023-11-08 19:25 ` patch 'net/iavf: fix Tx preparation' " luca.boccassi
2023-11-08 19:25 ` patch 'net/ice: " luca.boccassi
2023-11-15 11:45 ` patch 'event/dlb2: fix name check in self-test' " luca.boccassi
2023-11-15 11:45 ` patch 'test/bbdev: fix Python script subprocess' " luca.boccassi
2023-11-15 11:45 ` patch 'test/bbdev: assert failed test for queue configure' " luca.boccassi
2023-11-15 11:45 ` patch 'event/dlb2: fix missing queue ordering capability flag' " luca.boccassi
2023-11-15 11:45 ` patch 'meter: fix RFC4115 trTCM API Doxygen' " luca.boccassi
2023-11-15 11:45 ` patch 'app/testpmd: remove useless check in TSO command' " luca.boccassi
2023-11-15 11:45 ` patch 'test/bonding: fix uninitialized RSS configuration' " luca.boccassi
2023-11-15 11:45 ` patch 'net/hns3: fix mailbox sync' " luca.boccassi
2023-11-15 11:45 ` patch 'app/testpmd: fix tunnel TSO capability check' " luca.boccassi
2023-11-15 11:45 ` patch 'app/testpmd: add explicit check for tunnel TSO' " luca.boccassi
2023-11-15 11:45 ` patch 'app/testpmd: fix tunnel TSO configuration' " luca.boccassi
2023-11-15 11:45 ` patch 'net/mlx5: fix hairpin queue unbind' " luca.boccassi
2023-11-15 11:45 ` patch 'net/mlx5: fix hairpin queue states' " luca.boccassi
2023-11-15 11:45 ` patch 'net/mlx5: fix multi-segment Tx inline data length' " luca.boccassi
2023-11-15 11:45 ` patch 'net/mlx5: zero UDP checksum over IPv4 in encapsulation' " luca.boccassi
2023-11-15 11:45 ` patch 'net/mlx5: fix MPRQ stride size check' " luca.boccassi
2023-11-23 16:17 ` patch 'net/txgbe: fix out of bound access' " luca.boccassi
2023-11-23 16:17 ` patch 'doc: update features in hns3 guide' " luca.boccassi
2023-11-23 16:17 ` patch 'doc: update versions recommendations for i40e and ice' " luca.boccassi
2023-11-23 16:17 ` patch 'examples/ipsec-secgw: fix partial overflow' " luca.boccassi
2023-11-23 16:17 ` patch 'eal/windows: fix build with recent MinGW' " luca.boccassi
2023-11-23 16:17 ` patch 'pdump: fix error number on IPC response' " luca.boccassi
2023-11-23 16:17 ` patch 'examples/ethtool: fix pause configuration' " luca.boccassi
2023-11-23 16:17 ` patch 'test/hash: fix creation error log' " luca.boccassi
2023-11-23 16:17 ` patch 'app/pipeline: add sigint handler' " luca.boccassi
2023-11-29 2:32 ` patch 'doc: remove restriction on ixgbe vector support' " luca.boccassi
2023-11-29 2:32 ` patch 'doc: fix some ordered lists' " luca.boccassi
2023-11-29 2:32 ` patch 'doc: remove number of commands in vDPA guide' " luca.boccassi
2023-11-29 2:32 ` patch 'mempool: fix get function documentation' " luca.boccassi
2023-11-29 2:32 ` patch 'mempool: clarify enqueue/dequeue ops " luca.boccassi
2023-11-29 2:32 ` patch 'ethdev: fix ESP packet type description' " luca.boccassi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231018235930.3144-6-luca.boccassi@gmail.com \
--to=luca.boccassi@gmail.com \
--cc=huangdengdui@huawei.com \
--cc=liudongdong3@huawei.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).