[dpdk-dev] [PATCH] net/i40e: fix mac counting error
Qiming Chen
chenqiming_huawei at 163.com
Mon Aug 23 10:00:09 CEST 2021
The i40evf_add_del_all_mac_addr function implements the mac batch delete
or add function. The vsi mac_num variable should be determined according
to the value of the variable add to add j or subtract j.
Fixes: 185993420249 ("net/i40e: fix VF add/del MAC")
Cc: stable at dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei at 163.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 5b1c8e76ab..12e69a3233 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2153,9 +2153,9 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
"OP_DEL_ETHER_ADDRESS");
} else {
if (add)
- vf->vsi.mac_num++;
+ vf->vsi.mac_num += j;
else
- vf->vsi.mac_num--;
+ vf->vsi.mac_num -= j;
}
rte_free(list);
begin = next_begin;
--
2.30.1.windows.1
More information about the dev
mailing list