From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by dpdk.org (Postfix) with ESMTP id 0C20737A2 for ; Tue, 2 May 2017 15:32:56 +0200 (CEST) Received: by mail-pf0-f196.google.com with SMTP id g23so33229733pfj.1 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=W+OINdDsxPp6GUZa4lW4D7xfA83OCD01l+g5wklbH1yRvUY2ht4oVsJhym+JLZU9wX AsO+XZXHBDbPPhyEP4FlMdgTfOVpHRdt/v97niKAOs5wk/x7kho5Bh6C9F7/CHtUFYvh g6Mq9xHxbgMMwGtjOBqeEPHPVAoQwMBaWzn+zSrSaL71G7dNX/QkLGWcrxxtsNUJeAyH QD0FhJJALlZOC/6tCGr2aQAi+ZpeN/p7S3SRdMTC2zw1HxYlpW81U/3YPFYR3Lq4yGMs VbNkc0vWwNiyEsAMa6Rs61Dyr745YDJuz8GX9ZDw9xF9DJ9mW58OGjXSDly/UbzsEkcG IYBw== X-Gm-Message-State: AN3rC/4R7Gn3dSUZXmYjT0uE/WKvfaNqk47aScqxPOuFBHaGzZi5RurJ jS/KV0x5XNHRDUziTbyeRtnR2U3eKeKY 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-dev] [PATCH] net/ixgbe: fix default MAC setting 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: , 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 > >