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)
Nov 22 2024, 5:37 PM
Unknown Object (File)
Nov 16 2024, 10:43 PM
Unknown Object (File)
Nov 14 2024, 8:46 PM
Unknown Object (File)
Nov 14 2024, 1:01 PM
Unknown Object (File)
Nov 8 2024, 5:24 AM
Unknown Object (File)
Nov 7 2024, 5:29 PM
Unknown Object (File)
Oct 31 2024, 3:11 AM
Unknown Object (File)
Oct 18 2024, 9:07 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 Not Applicable
Unit
Tests Not Applicable

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.