DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2 3/4] net/txgbe: update packet type
Date: Fri,  5 Mar 2021 10:14:37 +0800	[thread overview]
Message-ID: <20210305021438.10144-4-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20210305021438.10144-1-jiawenwu@trustnetic.com>

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 <jiawenwu@trustnetic.com>
---
 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




  parent reply	other threads:[~2021-03-05  2:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  2:14 [dpdk-dev] [PATCH v2 0/4] bug fixes for txgbe Jiawen Wu
2021-03-05  2:14 ` [dpdk-dev] [PATCH v2 1/4] net/txgbe: remove unused functions Jiawen Wu
2021-03-05  2:14 ` [dpdk-dev] [PATCH v2 2/4] net/txgbe: fix Rx missed packet counter Jiawen Wu
2021-03-05  2:14 ` Jiawen Wu [this message]
2021-03-05  2:14 ` [dpdk-dev] [PATCH v2 4/4] net/txgbe: fix the process of adding crypto SA Jiawen Wu
2021-03-05  9:59 ` [dpdk-dev] [PATCH v2 0/4] bug fixes for txgbe Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210305021438.10144-4-jiawenwu@trustnetic.com \
    --to=jiawenwu@trustnetic.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).