From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BD12A056D; Fri, 13 Mar 2020 02:12:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 848F12BE6; Fri, 13 Mar 2020 02:12:11 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id EBCC22BE3; Fri, 13 Mar 2020 02:12:08 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 18:12:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,546,1574150400"; d="scan'208";a="278035623" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga002.fm.intel.com with ESMTP; 12 Mar 2020 18:12:05 -0700 Date: Fri, 13 Mar 2020 09:09:28 +0800 From: Ye Xiaolong To: Guinan Sun Cc: dev@dpdk.org, Wenzhuo Lu , Qiming Yang , stable@dpdk.org Message-ID: <20200313010928.GA44839@intel.com> References: <20200310025836.70492-1-guinanx.sun@intel.com> <20200311090651.4328-1-guinanx.sun@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200311090651.4328-1-guinanx.sun@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix setting VF MAC address X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 03/11, Guinan Sun wrote: >The reason why PF cannot receive data normally is that >vf performed the clear_rar operation through dev close >without adding a mac address.  >This will cause the association between the index and >rx address set by VMDq to be cancelled,thus affecting >the data reception of PF. >The correction method is to add a check action, and do >not perform the set_rar operation without adding a mac >address to prevent affecting the reception of data. > >Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove") >Cc: stable@dpdk.org > >Signed-off-by: Guinan Sun >--- >v2 changes: >* Modify commit log >--- > 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 > Acked-by: Xiaolong Ye Applied to dpdk-next-net-intel, Thanks.