patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Igor Ryzhov <iryzhov@nfware.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, stable@dpdk.org
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix default MAC setting
Date: Tue, 2 May 2017 16:32:55 +0300	[thread overview]
Message-ID: <CAF+s_FybL5BjgyYVFvhXKE5TdtHVebdsnKNHXWTL8rW5KKJ7qQ@mail.gmail.com> (raw)
In-Reply-To: <1493714099-5225-1-git-send-email-wenzhuo.lu@intel.com>

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 <wenzhuo.lu@intel.com> 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 <wenzhuo.lu@intel.com>
> ---
>  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
>
>

  reply	other threads:[~2017-05-02 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02  8:34 [dpdk-stable] " Wenzhuo Lu
2017-05-02 13:32 ` Igor Ryzhov [this message]
2017-05-03  1:01   ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
2017-05-05 14:40 ` Thomas Monjalon

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=CAF+s_FybL5BjgyYVFvhXKE5TdtHVebdsnKNHXWTL8rW5KKJ7qQ@mail.gmail.com \
    --to=iryzhov@nfware.com \
    --cc=dev@dpdk.org \
    --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).