summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-09-12 08:14:11 +0000
committerLuiz Souza <luiz@netgate.com>2017-07-17 21:00:43 -0500
commitaa9e8f1e1d0ea6187bf3227c702b788877774673 (patch)
tree16e5ce7345815947c22f3b1b38c671f8925bc37b
parentded5357984b1ce3d00b141005e695e1113a1169b (diff)
downloadFreeBSD-src-aa9e8f1e1d0ea6187bf3227c702b788877774673.zip
FreeBSD-src-aa9e8f1e1d0ea6187bf3227c702b788877774673.tar.gz
MFC 305177
net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1. Reviewed by: araujo, hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7710 (cherry picked from commit 860932ee33fe82330891c9acc939827c05f20999)
-rw-r--r--sys/net/ethernet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h
index 52d8f61..fca54b9 100644
--- a/sys/net/ethernet.h
+++ b/sys/net/ethernet.h
@@ -89,7 +89,7 @@ struct ether_vlan_header {
#define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7)
#define EVL_CFIOFTAG(tag) (((tag) >> 12) & 1)
#define EVL_MAKETAG(vlid, pri, cfi) \
- ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
+ ((((((pri) & 7) << 13) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK))
/*
* NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
OpenPOWER on IntegriCloud