Implement task #11620: Add outgoing VLAN PCP support for Ethernet level QoS

Apply rebased patch from Timmy Brolin
This commit is contained in:
Dirk Ziegelmeier
2018-10-19 22:30:17 +02:00
parent 64bc2c3df7
commit 95aba99f41
5 changed files with 66 additions and 34 deletions

View File

@@ -273,8 +273,16 @@ ethernet_output(struct netif * netif, struct pbuf * p,
struct eth_hdr *ethhdr;
u16_t eth_type_be = lwip_htons(eth_type);
#if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET)
s32_t vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type);
#if ETHARP_SUPPORT_VLAN
s32_t vlan_prio_vid;
#ifdef LWIP_HOOK_VLAN_SET
vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type);
#elif LWIP_VLAN_PCP
vlan_prio_vid = -1;
if (netif->hints && (netif->hints->tci >= 0)) {
vlan_prio_vid = (u16_t)netif->hints->tci;
}
#endif
if (vlan_prio_vid >= 0) {
struct eth_vlan_hdr *vlanhdr;