From: Yunjian Wang Date: Tue, 7 Aug 2018 08:10:46 +0000 (+0800) Subject: net/bonding: support matching QinQ ethertype X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=763e450ae24d88b87f1eb86643a2897b141d9c07;p=dpdk.git net/bonding: support matching QinQ ethertype We assume VLAN ethtertype is 0x8100 in get_vlan_offset() function, but it could be 0x88A8 if QinQ is supported. Fixes: 06fe78b98ccd ("bond: add mode 6") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Chas Williams --- diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 58f7377c60..4417422581 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -37,7 +37,8 @@ get_vlan_offset(struct ether_hdr *eth_hdr, uint16_t *proto) { size_t vlan_offset = 0; - if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto) { + if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto || + rte_cpu_to_be_16(ETHER_TYPE_QINQ) == *proto) { struct vlan_hdr *vlan_hdr = (struct vlan_hdr *)(eth_hdr + 1); vlan_offset = sizeof(struct vlan_hdr);