From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id 09E70374F for ; Tue, 2 May 2017 15:32:56 +0200 (CEST) Received: by mail-pf0-f194.google.com with SMTP id v14so33181658pfd.3 for ; Tue, 02 May 2017 06:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LFCTnfrOgVmaLGhGGaFLGwFP/Y2mQPpyateKQGTjb44=; b=AV2KJuV6wndwRKmkBVU2KiMGP+GqK7cSDqvHY6oTCt0un5sBg3+xxJfINknBXBuNEe A1lztGo6C5z/f+bpYBxjHGGwdS6tvrGIc49Qq8l0zoUYr+4CH1Ve8XzuV//yWNEysN8K /yZh954Sgq6tfeh474jJuMNJFQGBrwqu9YFau+P4Au3ZHpdIH4CX1cLUJu+FaEY/xa1q GLFlpXOQR359bmuYkDfSRGG2+PMcwk+W94/3j9lvNxbVCg6+RMzjW902fruz2kePhIH6 rv0ie12w2KLrbQOo0RK2ZnezSmZMPTTNxn3UyQU5XHY2PW7RAXjJtaXd+M8LFamUsVAi deZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LFCTnfrOgVmaLGhGGaFLGwFP/Y2mQPpyateKQGTjb44=; b=YR52vpO8jNAS0vZpajWi9DuKTFxExZtlJbTlaDaFQsFqIlGtX6j6CI5g8k7Jr0VNs+ 7P8kPxk1mkl4+poz8CGxDRhxLIL4tG6xT3EeuLVDBfRl2a+gpntu/1DdcHwxMRhXaxUE rlgZF7DTZDlPScPYbSS8yCjiYjELu6QDMfwJWEcFRkcbzm+LmjZpsqDOAOlKwD3t0Qud 2GIHuDmWX5XmvReMH2hPwXlqfDT+rvsUbadOhBDB6xKU6h6G9QJTos2PdWuZPWMK85hg cwMg7WZ1zNfv9/J0d93H8ju33n3AHcp5venIQMRbGZA+BUWFmXE5EKGRWpfAN82oH4/P 4niA== X-Gm-Message-State: AN3rC/6iEbtbK7Z4G2pHGKc5fRU0opQI35u7ZMFkUpWqi3g6UIeLTDRw 8zqljCAbufBTQI+px3RJe0mu8kb+Hg== X-Received: by 10.99.56.25 with SMTP id f25mr1459289pga.108.1493731976204; Tue, 02 May 2017 06:32:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.170.10 with HTTP; Tue, 2 May 2017 06:32:55 -0700 (PDT) X-Originating-IP: [195.34.30.205] In-Reply-To: <1493714099-5225-1-git-send-email-wenzhuo.lu@intel.com> References: <1493714099-5225-1-git-send-email-wenzhuo.lu@intel.com> From: Igor Ryzhov Date: Tue, 2 May 2017 16:32:55 +0300 Message-ID: To: Wenzhuo Lu Cc: "dev@dpdk.org" , stable@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix default MAC setting X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 May 2017 13:32:57 -0000 Hello Wenzhuo, How about also delete meaningless "ixgbe_remove_rar(dev, 0);"? Best regards, Igor On Tue, May 2, 2017 at 11:34 AM, Wenzhuo Lu wrote: > Pool 0 is not PF, it's VF 0. So the MAC is set for VF 0 > but not PF. > The code introduced a weird issue. In the scenario PF + VF, > when only starting PF, the default PF MAC address is working. > But after starting a VF, the default PF MAC address becomes > the VF's address. > > Use the pool which is not occupied by VFs for PF to fix it. > > Fixes: 8164fe82846b ("ixgbe: add default mac address modifier") > Cc: stable@dpdk.org > > Signed-off-by: Wenzhuo Lu > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ > ethdev.c > index bbae4f9..9ddd685 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -4658,9 +4658,11 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused > struct rte_eth_dev *dev, > static void > ixgbe_set_default_mac_addr(struct rte_eth_dev *dev, struct ether_addr > *addr) > { > + struct rte_pci_device *pci_dev = IXGBE_DEV_TO_PCI(dev); > + > ixgbe_remove_rar(dev, 0); > > - ixgbe_add_rar(dev, addr, 0, 0); > + ixgbe_add_rar(dev, addr, 0, pci_dev->max_vfs); > } > > static bool > -- > 1.9.3 > >