From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30025A0561; Fri, 5 Mar 2021 03:15:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F28C222A34A; Fri, 5 Mar 2021 03:15:00 +0100 (CET) Received: from smtpbg501.qq.com (smtpbg501.qq.com [203.205.250.101]) by mails.dpdk.org (Postfix) with ESMTP id 0DA9122A346 for ; Fri, 5 Mar 2021 03:14:57 +0100 (CET) X-QQ-mid: bizesmtp20t1614910489tnx3686i Received: from jiawenwu.trustnetic.com (unknown [183.129.236.74]) by esmtp6.qq.com (ESMTP) with id ; Fri, 05 Mar 2021 10:14:49 +0800 (CST) X-QQ-SSF: 01400000002000C0D000B00A0000000 X-QQ-FEAT: vCa7dv7JIu4Pzi1WUbKDBh20Ns3Cs/iZzaPkAFDFNYIvQsCucuWYftmNZ9YYP MJPjle3OJyJu4uvXISzBJ49MlXC4iCWcFZYUDYhHidRhC3XvBJ5EGd94KRi8MtWN9CR5Doz kyX+QHLd0IxujknWsWmoJCGf/Jnvussab9NTh7/gJiaJRsRwqD7l71tBsJ6zgri6IsFiR4G f8+rIMnEJ0RET3QCPFGLKyFXBllu8gNRCp3+gvjYPmyQy5BGmRb1+MoDmqDFAdtLSLjHe/S xJZ1I70eGWLMbTtorHpxxovj2y9LljutKsuNwhkdZrr5bAkDFOm5+cnXyZ26ScF8Z7vscq7 1lAavgdmlsI6QjgcFb5zecja0wKDg== X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Date: Fri, 5 Mar 2021 10:14:37 +0800 Message-Id: <20210305021438.10144-4-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210305021438.10144-1-jiawenwu@trustnetic.com> References: <20210305021438.10144-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 Subject: [dpdk-dev] [PATCH v2 3/4] net/txgbe: update packet type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update the packet type lookup table according to the HW design. Fix the bug that inner L3 and L4 type can not be parsed when QINQ insert in tunnel packet. Fixes: 9e30b88f60b2 ("net/txgbe: support packet type") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ptypes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/txgbe/txgbe_ptypes.c b/drivers/net/txgbe/txgbe_ptypes.c index cd160ebba..7009f2082 100644 --- a/drivers/net/txgbe/txgbe_ptypes.c +++ b/drivers/net/txgbe/txgbe_ptypes.c @@ -50,6 +50,7 @@ static u32 txgbe_ptype_lookup[TXGBE_PTID_MAX] __rte_cache_aligned = { /* L2:0-3 L3:4-7 L4:8-11 TUN:12-15 EL2:16-19 EL3:20-23 EL2:24-27 */ /* L2: ETH */ + TPTE(0x10, ETHER, NONE, NONE, NONE, NONE, NONE, NONE), TPTE(0x11, ETHER, NONE, NONE, NONE, NONE, NONE, NONE), TPTE(0x12, ETHER_TIMESYNC, NONE, NONE, NONE, NONE, NONE, NONE), TPTE(0x13, ETHER_FIP, NONE, NONE, NONE, NONE, NONE, NONE), @@ -67,6 +68,7 @@ static u32 txgbe_ptype_lookup[TXGBE_PTID_MAX] __rte_cache_aligned = { TPTE(0x1E, ETHER_FILTER, NONE, NONE, NONE, NONE, NONE, NONE), TPTE(0x1F, ETHER_FILTER, NONE, NONE, NONE, NONE, NONE, NONE), /* L3: IP */ + TPTE(0x20, ETHER, IPV4, NONFRAG, NONE, NONE, NONE, NONE), TPTE(0x21, ETHER, IPV4, FRAG, NONE, NONE, NONE, NONE), TPTE(0x22, ETHER, IPV4, NONFRAG, NONE, NONE, NONE, NONE), TPTE(0x23, ETHER, IPV4, UDP, NONE, NONE, NONE, NONE), @@ -339,7 +341,7 @@ txgbe_encode_ptype_tunnel(u32 ptype) break; case RTE_PTYPE_INNER_L2_ETHER_QINQ: ptid |= TXGBE_PTID_TUN_EIGMV; - return ptid; + break; default: break; } -- 2.21.0.windows.1