From: Alejandro Lucero <alejandro.lucero@netronome.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: fix MAC changes when live change not supported
Date: Fri, 24 Aug 2018 14:45:46 +0200 [thread overview]
Message-ID: <CAD+H990rusVJkDCzNaQJBL89YmZ+500VR3PfxRmtvDa+k6HT+g@mail.gmail.com> (raw)
In-Reply-To: <53aa42d1-0c1c-e2e6-643c-be50e1c9873d@intel.com>
On Fri, Aug 24, 2018 at 2:27 PM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:
> On 8/24/2018 12:15 PM, Alejandro Lucero wrote:
> > Current code assumes a MAC change can occur when the port has been
> > started. In fact, there are some NICs which require this port state
> > for being successful, but other NICs not always support MAC change
> > in that case.
> >
> > This patch supports a new device flag for a device advertising this
> > limitation, and if the flag is set, the MAC is changed before the
> > port starts.
> >
> > Fixes: af75078fece3 ("first public release")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>
> <...>
>
> > @@ -2839,6 +2841,10 @@ int rte_eth_dev_mac_addr_add(uint16_t port_id,
> struct ether_addr *mac_addr,
> > /**
> > * Set the default MAC address.
> > *
> > + * A NIC not supporting MAC change after started should set
> > + * RTE_ETH_DEV_NOLIVE_MAC_ADDR and this function should check such a
> flag
> > + * and NIC state.
> > + *
>
> Only rte_eth_dev_start() API effected from this change, API behavior
> changes
> based on if PMD provides this flag or not, I was thinking to document this
> in
> rte_eth_dev_start(), something like:
> "Driver RTE_ETH_DEV_NOLIVE_MAC_ADDR flag cause MAC address to be set before
> start dev_ops"
>
> As you mentioned in cover letter, rte_eth_dev_mac_addr_add() will return an
> error if not supported, this is not changed with
> RTE_ETH_DEV_NOLIVE_MAC_ADDR
> flag, so I think no need to add this comment.
>
Ok. I will send another version.
Thanks
next prev parent reply other threads:[~2018-08-24 12:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-24 11:15 [dpdk-dev] support MAC changes when no live changes allowed Alejandro Lucero
2018-08-24 11:15 ` [dpdk-dev] [PATCH v2 1/3] ethdev: fix MAC changes when live change not supported Alejandro Lucero
2018-08-24 12:27 ` Ferruh Yigit
2018-08-24 12:45 ` Alejandro Lucero [this message]
2018-08-24 12:29 ` Ferruh Yigit
2018-08-24 11:15 ` [dpdk-dev] [PATCH v2 2/3] net/nfp: fix live MAC changes " Alejandro Lucero
2018-08-24 11:15 ` [dpdk-dev] [PATCH v2 3/3] doc: comment rte_eth_dev_start change Alejandro Lucero
2018-08-24 12:28 ` Ferruh Yigit
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=CAD+H990rusVJkDCzNaQJBL89YmZ+500VR3PfxRmtvDa+k6HT+g@mail.gmail.com \
--to=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
/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).