Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_ethersubr.c
Show First 20 Lines • Show All 1,382 Lines • ▼ Show 20 Lines | if (n > 0) { | ||||
m_freem(*mp); | m_freem(*mp); | ||||
*mp = NULL; | *mp = NULL; | ||||
if_printf(ife, "cannot pad short frame"); | if_printf(ife, "cannot pad short frame"); | ||||
return (false); | return (false); | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* If PCP is set in mbuf, use it | |||||
*/ | |||||
if ((*mp)->m_flags & M_VLANTAG) { | |||||
pcp = EVL_PRIOFTAG((*mp)->m_pkthdr.ether_vtag); | |||||
} | |||||
/* | |||||
* If underlying interface can do VLAN tag insertion itself, | * If underlying interface can do VLAN tag insertion itself, | ||||
* just pass the packet along. However, we need some way to | * just pass the packet along. However, we need some way to | ||||
* tell the interface where the packet came from so that it | * tell the interface where the packet came from so that it | ||||
* knows how to find the VLAN tag to use, so we attach a | * knows how to find the VLAN tag to use, so we attach a | ||||
* packet tag that holds it. | * packet tag that holds it. | ||||
*/ | */ | ||||
if (vlan_mtag_pcp && (mtag = m_tag_locate(*mp, MTAG_8021Q, | if (vlan_mtag_pcp && (mtag = m_tag_locate(*mp, MTAG_8021Q, | ||||
MTAG_8021Q_PCP_OUT, NULL)) != NULL) | MTAG_8021Q_PCP_OUT, NULL)) != NULL) | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |