DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix mac counting error
@ 2021-08-23  8:00 Qiming Chen
  0 siblings, 0 replies; only message in thread
From: Qiming Chen @ 2021-08-23  8:00 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, Qiming Chen, stable

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@dpdk.org

Signed-off-by: Qiming Chen <chenqiming_huawei@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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-23  8:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23  8:00 [dpdk-dev] [PATCH] net/i40e: fix mac counting error Qiming Chen

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).