54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
From 3e96668301de4168ef51a6b43535b851c25290da Mon Sep 17 00:00:00 2001
|
|
From: Huisong Li <lihuisong@huawei.com>
|
|
Date: Fri, 22 Oct 2021 17:19:58 +0800
|
|
Subject: [PATCH 09/33] net/hns3: remove redundant multicast removal interface
|
|
|
|
This patch removes redundant hns3_remove_mc_addr_common(), which can be
|
|
replaced by hns3_remove_mc_mac_addr().
|
|
|
|
Signed-off-by: Huisong Li <lihuisong@huawei.com>
|
|
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
|
|
---
|
|
drivers/net/hns3/hns3_ethdev.c | 18 +-----------------
|
|
1 file changed, 1 insertion(+), 17 deletions(-)
|
|
|
|
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
|
|
index 485995a43..a2d365a28 100644
|
|
--- a/drivers/net/hns3/hns3_ethdev.c
|
|
+++ b/drivers/net/hns3/hns3_ethdev.c
|
|
@@ -1632,22 +1632,6 @@ hns3_find_duplicate_mc_addr(struct hns3_hw *hw, struct rte_ether_addr *mc_addr)
|
|
return false;
|
|
}
|
|
|
|
-static int
|
|
-hns3_remove_mc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
|
|
-{
|
|
- char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
|
|
- int ret;
|
|
-
|
|
- ret = hns3_remove_mc_mac_addr(hw, mac_addr);
|
|
- if (ret) {
|
|
- hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
|
|
- mac_addr);
|
|
- hns3_err(hw, "failed to remove mc mac addr(%s), ret = %d",
|
|
- mac_str, ret);
|
|
- }
|
|
- return ret;
|
|
-}
|
|
-
|
|
static int
|
|
hns3_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
|
|
__rte_unused uint32_t idx, __rte_unused uint32_t pool)
|
|
@@ -1730,7 +1714,7 @@ hns3_remove_mac_addr(struct rte_eth_dev *dev, uint32_t idx)
|
|
rte_spinlock_lock(&hw->lock);
|
|
|
|
if (rte_is_multicast_ether_addr(mac_addr))
|
|
- ret = hns3_remove_mc_addr_common(hw, mac_addr);
|
|
+ ret = hns3_remove_mc_mac_addr(hw, mac_addr);
|
|
else
|
|
ret = hns3_remove_uc_mac_addr(hw, mac_addr);
|
|
rte_spinlock_unlock(&hw->lock);
|
|
--
|
|
2.33.0
|
|
|