DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qiming Chen <chenqiming_huawei@163.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, Qiming Chen <chenqiming_huawei@163.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/i40e: fix mac counting error
Date: Mon, 23 Aug 2021 16:00:09 +0800	[thread overview]
Message-ID: <20210823080009.8603-1-chenqiming_huawei@163.com> (raw)

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


                 reply	other threads:[~2021-08-23  8:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210823080009.8603-1-chenqiming_huawei@163.com \
    --to=chenqiming_huawei@163.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --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).