diff options
author | araujo <araujo@FreeBSD.org> | 2016-06-06 09:51:58 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-06-06 09:51:58 +0000 |
commit | af4ff984e7cfca491e9ec471fce250785ae30126 (patch) | |
tree | 1938243f62e9f5f3b385cc9bd67a15eddd77283a /sys/net/if.h | |
parent | 98d178b10fd06a8808149d24284eae69936f61e9 (diff) | |
download | FreeBSD-src-af4ff984e7cfca491e9ec471fce250785ae30126.zip FreeBSD-src-af4ff984e7cfca491e9ec471fce250785ae30126.tar.gz |
Add support to priority code point (PCP) that is an 3-bit field
which refers to IEEE 802.1p class of service and maps to the frame
priority level.
Values in order of priority are: 1 (Background (lowest)),
0 (Best effort (default)), 2 (Excellent effort),
3 (Critical applications), 4 (Video, < 100ms latency),
5 (Video, < 10ms latency), 6 (Internetwork control) and
7 (Network control (highest)).
Example of usage:
root# ifconfig em0.1 create
root# ifconfig em0.1 vlanpcp 3
Note:
The review D801 includes the pf(4) part, but as discussed with kristof,
we won't commit the pf(4) bits for now.
The credits of the original code is from rwatson.
Differential Revision: https://reviews.freebsd.org/D801
Reviewed by: gnn, adrian, loos
Discussed with: rwatson, glebius, kristof
Tested by: many including Matthew Grooms <mgrooms__shrew.net>
Obtained from: pfSense
Relnotes: Yes
Diffstat (limited to 'sys/net/if.h')
-rw-r--r-- | sys/net/if.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 792704a..98ae0a8 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -393,6 +393,7 @@ struct ifreq { caddr_t ifru_data; int ifru_cap[2]; u_int ifru_fib; + u_char ifru_vlan_pcp; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ @@ -410,6 +411,7 @@ struct ifreq { #define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */ #define ifr_index ifr_ifru.ifru_index /* interface index */ #define ifr_fib ifr_ifru.ifru_fib /* interface fib */ +#define ifr_vlan_pcp ifr_ifru.ifru_vlan_pcp /* VLAN priority */ }; #define _SIZEOF_ADDR_IFREQ(ifr) \ |