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
Unknown Object (File)
Feb 9 2024, 9:28 AM
Unknown Object (File)
Jan 28 2024, 5:02 PM
Unknown Object (File)
Jan 1 2024, 11:01 AM
Unknown Object (File)
Dec 20 2023, 1:31 AM
Unknown Object (File)
Dec 13 2023, 3:16 PM
Unknown Object (File)
Dec 12 2023, 12:28 PM
Unknown Object (File)
Dec 12 2023, 3:03 AM
Unknown Object (File)
Dec 11 2023, 2:20 PM
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.