[ipxe-devel] [PATCH 1/2] igbvf: Assign random MAC address if none is set

Michael Brown mcb30 at ipxe.org
Thu Jun 12 16:44:26 UTC 2014


On 03/06/14 13:01, Hannes Reinecke wrote:
> If the VF doesn't have a MAC address assigned we should create
> a random MAC address. Not doing so results in the probe function
> to abort and an unuseable device.

Applied (with modifications); thank you:

   http://git.ipxe.org/ipxe.git/commitdiff/f63ec19

I removed what appeared to be the now wholly-redundant duplicate check 
that the MAC address is valid.

It appears as though the code will fail if hw->mac.ops.reset_hw() 
returns an error, but that pre-existing code path looks to be 
fundamentally broken anyway: it fills in netdev->hw_addr, then 
overwrites it with adapter->hw.mac.addr (which is presumably not yet 
filled in), then tests the result.  This doesn't seem likely to be correct.

Michael



More information about the ipxe-devel mailing list