From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Wu, Jingjing" <jingjing.wu@intel.com>,
"Zhang, Helin" <helin.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: no more initial VF MAC address
Date: Wed, 22 Feb 2017 04:52:03 +0000 [thread overview]
Message-ID: <039ED4275CED7440929022BC67E706115305EAE6@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <a04f7f66-dcb0-0d17-30dd-85b6ecb09e2c@intel.com>
Hi Ferruh:
Sorry to reply this late, I think I missed your email.
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Saturday, January 21, 2017 1:39 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/i40e: no more initial VF MAC address
>
> On 1/18/2017 1:45 AM, Qi Zhang wrote:
> > During PF initialization, PF will generate an initial mac address for
> > VFs, the purpose is to help VF keep a constant mac address between
> > startup/shutdown cycles.
>
> I believe below does not provide permanent MAC address, PF assign a random
> mac address to its VFs on each PF initialization.
Yes, this is for VF's startup /shutdown cycles only, but that's the original concern from customer.
>
> > Now this is not
> > necessary, since we already provide an API to set VF mac address from
> > PF side (rte_pmd_i40e_set_vf_addr).
>
> rte_pmd_i40e_set_vf_mac_addr?
Exactly!
>
> > Application
> > can use this API to lock down VF's mac address.
>
> As far as I can see how it was (before this patch):
>
> 1- During PF init, assign random MAC to VFs.
> 2- Application can overwrite VF MAC address with above API.
> 3- During VF init, if there is a valid MAC assigned by PF use it.
> 4- During VF init, if PF not assigned MAC, assign a random one.
>
> So this patch removes above step 1.
Yes, we remove step 1 intentionally to align with kernel PF driver's behavior,
because for kernel VF, during initialization, once it found PF already assigned a valid MAC, it cannot be changed from VF anymore
but if it is not a valid address, VF is given the permission to change it.
>
> Overall even if application will explicitly assign a MAC to VF or not, VF will have
> a valid MAC address. So patch looks good, just please reword commit log to
> describe above.
Sure, I will update the commit log
>
> > This change also sync DPDK PF's behavior with kernel driver.
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> > drivers/net/i40e/i40e_pf.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
> > index ddfc140..4e05dca 100644
> > --- a/drivers/net/i40e/i40e_pf.c
> > +++ b/drivers/net/i40e/i40e_pf.c
> > @@ -1053,7 +1053,6 @@ i40e_pf_host_init(struct rte_eth_dev *dev)
> > ret = i40e_pf_host_vf_reset(&pf->vfs[i], 0);
> > if (ret != I40E_SUCCESS)
> > goto fail;
> > - eth_random_addr(pf->vfs[i].mac_addr.addr_bytes);
> > }
> >
> > /* restore irq0 */
> >
Regards
Qi
next prev parent reply other threads:[~2017-02-22 4:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 1:45 Qi Zhang
2017-01-20 17:39 ` Ferruh Yigit
2017-02-22 4:52 ` Zhang, Qi Z [this message]
2017-02-21 22:45 ` [dpdk-dev] [PATCH v2] " Qi Zhang
2017-03-05 22:22 ` 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=039ED4275CED7440929022BC67E706115305EAE6@SHSMSX103.ccr.corp.intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@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).