FreeBSD Bugzilla – Attachment 122171 Details for
Bug 165296
[vlan] [patch] Fix EVL_APPLY_VLID, update EVL_APPLY_PRI macro
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.26 KB, created by
Ivan Rozhuk
on 2012-02-19 17:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2012-02-19 17:50:01 UTC
Size:
1.26 KB
patch
obsolete
>--- ./if_vlan_var.h.orig 2011-09-23 09:51:37.000000000 +0900 >+++ ./if_vlan_var.h 2012-02-20 02:28:50.000000000 +0900 >@@ -52,27 +52,24 @@ > #define EVL_APPLY_VLID(m, vlid) \ > do { \ > if ((m)->m_flags & M_VLANTAG) { \ >- (m)->m_pkthdr.ether_vtag &= EVL_VLID_MASK; \ >- (m)->m_pkthdr.ether_vtag |= (vlid); \ >+ (m)->m_pkthdr.ether_vtag &= ~EVL_VLID_MASK; \ > } else { \ >- (m)->m_pkthdr.ether_vtag = (vlid); \ >+ (m)->m_pkthdr.ether_vtag = 0; \ > (m)->m_flags |= M_VLANTAG; \ > } \ >+ (m)->m_pkthdr.ether_vtag |= ((vlid) & EVL_VLID_MASK); \ > } while (0) > > /* Set the priority ID in an mbuf packet header non-destructively. */ > #define EVL_APPLY_PRI(m, pri) \ > do { \ > if ((m)->m_flags & M_VLANTAG) { \ >- uint16_t __vlantag = (m)->m_pkthdr.ether_vtag; \ >- (m)->m_pkthdr.ether_vtag |= EVL_MAKETAG( \ >- EVL_VLANOFTAG(__vlantag), (pri), \ >- EVL_CFIOFTAG(__vlantag)); \ >+ (m)->m_pkthdr.ether_vtag &= ~EVL_PRI_MASK; \ > } else { \ >- (m)->m_pkthdr.ether_vtag = \ >- EVL_MAKETAG(0, (pri), 0); \ >+ (m)->m_pkthdr.ether_vtag = 0; \ > (m)->m_flags |= M_VLANTAG; \ > } \ >+ (m)->m_pkthdr.ether_vtag |= (((pri) & 7) << 1); \ > } while (0) > > /* sysctl(3) tags, for compatibility purposes */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165296
: 122171 |
122172