On Wed, 25 Jul 2012 15:14:03 -0600
Chris Friesen <[email protected]> wrote:

> On 07/25/2012 02:44 PM, Greg Rose wrote:
> > Chris Friesen<[email protected]>  wrote:
> >
> >> Just noticed something suspicious in ixgbe_ndo_set_vf_mac().
> >>
> >> We set adapter->vfinfo[vf].pf_set_mac twice, once unconditionally
> >> and then once conditionally. Should that first one be deleted?
> > The first MAC address you set is overwritten and replaced with the
> > new one.
> >
> > Using the ip tool to set the VF MAC will only set its primary MAC
> > address.
> 
> Okay, but the pf_set_mac flag is just a bool.  Why are we setting it 
> twice?  Presumably if the call to ixgbe_set_vf_mac() fails then we
> don't want to set that flag and so the first call should be removed.
> If we do want to set it unconditionally, why are setting it a second
> time after the call to ixgbe_set_vf_mac()?

Ah, OK, I see what you're referring to.  You've detected a bit of a
bug, although a benign one for Linux since ixgbe_set_vf_mac never fails
on Linux.  This driver is also used on VMware ESX and in that scenario
the call may fail, thus the check and conditional assignment.  So this
is a *real* bug for ESX.

The second assignment within the conditional is the correct one.  We'll
remove the unconditional assignment.  Thanks for pointing that out!

Regards,

- Greg


> 
> Chris


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to