[Differential] D7710: net/vlan: Shift for pri is 13 (pri mask 0xe000) not 1.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Apr 2023 07:15:55 UTC
zlei added inline comments. Herald added subscribers: melifaro, ae, imp. INLINE COMMENTS > ethernet.h:95 > #define EVL_MAKETAG(vlid, pri, cfi) \ > - ((((((pri) & 7) << 1) | ((cfi) & 1)) << 12) | ((vlid) & EVL_VLID_MASK)) > `pri` is indeed shift with 13 bits. It is left shifted 1 bit and then 12 bits. Beware the parentheses. Left a comment in case someone reach this confusion. REPOSITORY rS FreeBSD src repository - subversion CHANGES SINCE LAST ACTION https://reviews.freebsd.org/D7710/new/ REVISION DETAIL https://reviews.freebsd.org/D7710 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, bms, hselasky, glebius, araujo, gnn, bz, rwatson Cc: imp, ae, melifaro, zlei, hselasky, freebsd-net-list, krzysztof.galazka_intel.com