Page MenuHomeFreeBSD

igb driver to generate random MAC address for VF interface when none assigned
ClosedPublic

Authored by skoumjian_juniper.net on Oct 31 2016, 1:40 PM.
Tags
None
Referenced Files
F102593326: D8399.diff
Thu, Nov 14, 1:01 PM
Unknown Object (File)
Fri, Nov 8, 5:24 AM
Unknown Object (File)
Thu, Nov 7, 5:29 PM
Unknown Object (File)
Thu, Oct 31, 3:11 AM
Unknown Object (File)
Fri, Oct 18, 9:07 PM
Unknown Object (File)
Oct 3 2024, 7:07 PM
Unknown Object (File)
Oct 3 2024, 1:09 PM
Unknown Object (File)
Oct 2 2024, 10:48 AM
Subscribers

Details

Summary

The igb driver currently requires a VF interface to have a non-zero MAC
address, but the associated PF is giving the VF an all zeros MAC address
when one is not administratively assigned. The driver should check for
this case and generate a random address, similar to how the linux igbvf
driver does.

Test Plan

My test setup is a linux host OS (for the PF) with a freebsd10 guest OS
running in a VM (for the VF). The VM has an application that creates
the igb interface and sets a MAC address for it.

I performed the following two tests.

Host OS has administratively assigned address 02:00:00:00:00:04 for igb
vf 0. Guest OS creates igb interface and attempts to assign address
02:00:00:01:00:04. Host OS rejects the set (VF 0 attempted to override
administratively set MAC address) and retains the original address.
This is expected results.

Host OS has no assigned address for igb vf 0. Guest OS creates igb
interface and attempts to assign address 02:00:00:01:00:04. Host OS
accepts the set and assigns the new address. This is expected results.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5761
Build 6065: arc lint + arc unit

Event Timeline

skoumjian_juniper.net retitled this revision from to igb driver to generate random MAC address for VF interface when none assigned.
skoumjian_juniper.net updated this object.
skoumjian_juniper.net edited the test plan for this revision. (Show Details)

This seems a sensible implementation. I have no objection.

skoumjian_juniper.net edited edge metadata.

Remove inadvertant whitespace addition.

Remove inadvertant debug device_printf.

sbruno edited edge metadata.

Do you want me to commit this as is?

This revision is now accepted and ready to land.Nov 2 2016, 2:52 PM

I was hoping for some feedback from the Intel folks about this change. To me, it seems to make sense given that's how the other VF drivers work. If there are no other comments, then yes please commit as is. Thanks.

Please proceed to commit this as is. Thanks.

This revision was automatically updated to reflect the committed changes.

I was late to commenting on it, but it looked fine to me. It looks like it's similar to the ixgbe code.