Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164839567
D39536.id126647.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
946 B
Referenced Files
None
Subscribers
None
D39536.id126647.diff
View Options
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -461,6 +461,22 @@
return (false);
}
+static inline bool
+ether_do_pcp(struct ifnet *ifp, const struct mbuf *m)
+{
+ if (ifp->if_type == IFT_L2VLAN)
+ return (false);
+
+ if (ifp->if_pcp != IFNET_PCP_NONE || (m->m_flags & M_VLANTAG))
+ return (true);
+
+ if (V_vlan_mtag_pcp &&
+ m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL) != NULL)
+ return (true);
+
+ return (false);
+}
+
/*
* Ethernet link layer output routine to send a raw frame to the device.
*
@@ -470,11 +486,7 @@
int
ether_output_frame(struct ifnet *ifp, struct mbuf *m)
{
- uint8_t pcp;
-
- pcp = ifp->if_pcp;
- if (pcp != IFNET_PCP_NONE && ifp->if_type != IFT_L2VLAN &&
- !ether_set_pcp(&m, ifp, pcp))
+ if (ether_do_pcp(ifp, m) && !ether_set_pcp(&m, ifp, ifp->if_pcp))
return (0);
if (PFIL_HOOKED_OUT(V_link_pfil_head))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 6:56 AM (8 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35970881
Default Alt Text
D39536.id126647.diff (946 B)
Attached To
Mode
D39536: net: Check per-flow priority code point for untagged traffic
Attached
Detach File
Event Timeline
Log In to Comment