Page MenuHomeFreeBSD

igb(4): Fix VLAN support on VFs
ClosedPublic

Authored by kgalazka on Tue, Oct 21, 4:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 9, 6:37 PM
Unknown Object (File)
Sat, Nov 8, 2:07 PM
Unknown Object (File)
Mon, Nov 3, 10:00 AM
Unknown Object (File)
Sat, Nov 1, 5:22 PM
Unknown Object (File)
Sat, Nov 1, 4:33 AM
Unknown Object (File)
Sat, Oct 25, 7:15 PM
Unknown Object (File)
Sat, Oct 25, 5:18 PM
Unknown Object (File)
Sat, Oct 25, 2:59 PM

Details

Summary

Virtual Functions are considered untrusted and have no control
over VLAN filtering configuration in HW. To allow using
VLANs on VF intreface driver has to assume that VLAN HW Filtering
is always enabled and pass requests for adding or removing VLAN
tags to Physical Function driver using Mailbox API.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/e1000/if_em.c
4108

Are you sure that you want to KASSERT() here? Could this be called by a PF that doesn't have the vf_ifp pointer set?

sys/dev/e1000/if_em.c
4108

We might have misunderstanding here. vf_ifp is not a pointer. It's a flag set in em_identify_hardware: https://cgit.freebsd.org/src/tree/sys/dev/e1000/if_em.c#n2387
I agree that it is quite confusing, and some refactoring would make sense.

Fix assertion condition. It should be the expected state, not the opposite.

sys/dev/e1000/if_em.c
4108

It turns out you had a good hunch. The condition was actually incorrect.

This revision is now accepted and ready to land.Tue, Nov 11, 7:38 AM
This revision was automatically updated to reflect the committed changes.