From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangyunjian Subject: [PATCH] net/bonding: add support to match on 0x88A8 ethertype Date: Tue, 7 Aug 2018 16:10:46 +0800 Message-ID: <1533629446-5712-1-git-send-email-wangyunjian@huawei.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , Yunjian Wang To: Return-path: Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id 2BFF81B152 for ; Tue, 7 Aug 2018 10:11:06 +0200 (CEST) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1EB1420D2B8B6 for ; Tue, 7 Aug 2018 16:11:02 +0800 (CST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Yunjian Wang We assume VLAN ethtertype is 0x8100 in get_vlan_offset() function, but it could be 0x88A8 if QinQ is supported. Signed-off-by: Yunjian Wang --- 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 58f7377..4417422 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -37,7 +37,8 @@ { 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); -- 1.8.3.1