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)
Fri, May 10, 2:01 AM
Unknown Object (File)
Sun, Apr 21, 3:25 AM
Unknown Object (File)
Apr 8 2024, 1:38 AM
Unknown Object (File)
Jan 19 2024, 10:27 AM
Unknown Object (File)
Dec 20 2023, 2:01 AM
Unknown Object (File)
Nov 19 2023, 1:21 PM
Unknown Object (File)
Oct 31 2023, 5:32 PM
Unknown Object (File)
Oct 19 2023, 12:05 PM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #46792)

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 ↗(On Diff #46792)

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.