DPDK patches and discussions
 help / color / mirror / Atom feed
From: Guinan Sun <guinanx.sun@intel.com>
To: dev@dpdk.org
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Guinan Sun <guinanx.sun@intel.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix setting VF MAC address
Date: Tue, 10 Mar 2020 02:58:36 +0000	[thread overview]
Message-ID: <20200310025836.70492-1-guinanx.sun@intel.com> (raw)

This problem occurs because clear_rar is executed at the wrong time,
 so PF cannot receive data normally.
This patch is used to modify the calling logic of clear_rar.

Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index afae21f81..67b5bef44 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -783,8 +783,10 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		hw->mac.ops.set_rar(hw, vf_info[vf].mac_count,
 				new_mac, vf, IXGBE_RAH_AV);
 	} else {
-		hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
-		vf_info[vf].mac_count = 0;
+		if (vf_info[vf].mac_count) {
+			hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count);
+			vf_info[vf].mac_count = 0;
+		}
 	}
 	return 0;
 }
-- 
2.17.1


             reply	other threads:[~2020-03-10  3:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10  2:58 Guinan Sun [this message]
2020-03-11  7:29 ` Ye Xiaolong
2020-03-11  9:06 ` [dpdk-dev] [PATCH v2] " Guinan Sun
2020-03-13  1:09   ` Ye Xiaolong

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=20200310025836.70492-1-guinanx.sun@intel.com \
    --to=guinanx.sun@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /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).