Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115871733
D39536.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39536.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
@@ -123,6 +123,8 @@
struct sockaddr *);
static int ether_requestencap(struct ifnet *, struct if_encap_req *);
+static inline bool ether_do_pcp(struct ifnet *, struct mbuf *);
+
#define senderr(e) do { error = (e); goto bad;} while (0)
static void
@@ -470,11 +472,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))
@@ -1400,6 +1398,19 @@
&VNET_NAME(vlan_mtag_pcp), 0,
"Retain VLAN PCP information as packets are passed up the stack");
+static inline bool
+ether_do_pcp(struct ifnet *ifp, struct mbuf *m)
+{
+ if (ifp->if_type == IFT_L2VLAN)
+ return (false);
+ if (ifp->if_pcp != IFNET_PCP_NONE || (m->m_flags & M_VLANTAG) != 0)
+ return (true);
+ if (V_vlan_mtag_pcp &&
+ m_tag_locate(m, MTAG_8021Q, MTAG_8021Q_PCP_OUT, NULL) != NULL)
+ return (true);
+ return (false);
+}
+
bool
ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, struct ifnet *p,
const struct ether_8021q_tag *qtag)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 30, 8:13 PM (14 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17864369
Default Alt Text
D39536.diff (1 KB)
Attached To
Mode
D39536: net: Check per-flow priority code point for untagged traffic
Attached
Detach File
Event Timeline
Log In to Comment