These are generally useful to anything dealing with 802.1q and aren't
specific to if_vlan, so move them to <net/ethernet.h> and remove the
_KERNEL gate.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 64501 Build 61385: arc lint + arc unit
Event Timeline
There should be tab, and not space, between '#define' and the starting char of the symbol.
sys/net/ethernet.h | ||
---|---|---|
88 | What do DEF_PVID and DEF_SR_PVID mean? |
sys/net/ethernet.h | ||
---|---|---|
88 | i had the same question, and it turns out these come from 802.1Q-2014 table 9-2:
i will add some comments for these. |
add some comments.
also fix the value of DOT1Q_VID_MAX, which has been wrong since it was
introduced: it should be 0xffe (4094), not 0xfff (4095). it doesn't
seem to be used anywhere (yet) where this would have any actual impact.
rebase on top of D50576. this moves the DOT1Q_VID_MAX fix to a separate commit so it can be MFC'd.
sys/net/ethernet.h | ||
---|---|---|
88 | PVID and SR_PVID repeated in comments do not explain much. PVID port VLAN Identifier SR_PVID Stream Reservation Port VLAN Identifier And from what I understand, PVID is the vlan assigned to packets without vlan tag. |
sys/net/ethernet.h | ||
---|---|---|
88 | i'm not sure we want to reproduce all of 802.1q in the comments :-) at least there's now enough information for an interested reader to look up more detail. yes, PVID is the VLAN untagged packets go to, but DEF_PVID is only the default PVID, i.e., if the admin doesn't configure it. the default pvid in bridge(4) is effectively 0 (not 1) and we can't easily change that without breaking everyone's bridges, so i'm not sure we will ever use this... but it doesn't hurt to have it. |
sys/net/ethernet.h | ||
---|---|---|
89 |
sys/net/ethernet.h | ||
---|---|---|
89 | I think it's reasonable to expect that anyone reading this code already knows what a PVID is. |