From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id B857B5689 for ; Sat, 15 Sep 2018 03:49:14 +0200 (CEST) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5B8253C644CE7 for ; Sat, 15 Sep 2018 09:49:12 +0800 (CST) Received: from localhost (10.177.20.134) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.399.0; Sat, 15 Sep 2018 09:49:02 +0800 From: Lilijun To: CC: Lilijun Date: Sat, 15 Sep 2018 09:48:57 +0800 Message-ID: <1536976137-13716-1-git-send-email-jerry.lilijun@huawei.com> X-Mailer: git-send-email 1.8.4.msysgit.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.20.134] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] [PATCH] bonding: add QinQ packet xmit hash support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2018 01:49:15 -0000 For QinQ packet with ether type 0x88a8, dpdk bond's xmit hash policy is not worked to get the ip or port field. Change-Id: Icb6843aff0a0d176b90ebe19a5c7125412fea5ce Signed-off-by: Lilijun --- 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.4.msysgit.0