From 763e450ae24d88b87f1eb86643a2897b141d9c07 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 7 Aug 2018 16:10:46 +0800 Subject: [PATCH] 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 --- drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.20.1