Page MenuHomeFreeBSD

Add the ability to lookup the 3b PCP of a VLAN interface. Use it in toe_l2_resolve to fill up the complete vtag and not just the vid.
ClosedPublic

Authored by np on Aug 16 2018, 6:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 22 2024, 11:49 AM
Unknown Object (File)
Oct 5 2024, 6:11 AM
Unknown Object (File)
Oct 4 2024, 2:43 AM
Unknown Object (File)
Oct 2 2024, 6:53 PM
Unknown Object (File)
Oct 2 2024, 3:23 PM
Unknown Object (File)
Oct 2 2024, 2:24 PM
Unknown Object (File)
Oct 2 2024, 11:21 AM
Unknown Object (File)
Oct 2 2024, 9:57 AM
Subscribers

Diff Detail

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

Event Timeline

This is modeled after VLAN_TAG (which is mislabeled and just returns the
vid instead of the entire tag). I'm ok with changing the behavior of
VLAN_TAG to return the full tag including pcp but I went with a separate
VLAN_PCP to avoid surprising existing users of VLAN_TAG.

I am fine with that, but I am not quite sure why do you want VLAN_PCP() at all. if_pcp can be directly accessed and used when it is != IFNET_PCP_NONE.

This revision is now accepted and ready to land.Aug 16 2018, 10:10 PM
mjoras added inline comments.
sys/net/if_vlan.c
768

Do you want this to be safe across vlan interface removal? If so you need to have locked access here.

I decided to grab the PCP from the ifvlan (like VLAN_TAG does). I believe ifconfig ... vlanpcp <foo> updates this field.
ifconfig ... pcp <foo> updates the if_pcp field but I don't see any code that attempts to keep the ifvlan's pcp
and the ifnet's pcp in sync when the ifnet is a vlan ifnet.

np marked an inline comment as done.Aug 16 2018, 10:42 PM
np added inline comments.
sys/net/if_vlan.c
768

I want this to be as similar as possible to the vlan_tag a few lines above :-)

This revision was automatically updated to reflect the committed changes.
np marked an inline comment as done.