DPDK patches and discussions
 help / color / mirror / Atom feed
From: Lingyu Liu <lingyu.liu@intel.com>
To: dev@dpdk.org, qi.z.zhang@intel.com, olivier.matz@6wind.com,
	thomas@monjalon.net, david.marchand@redhat.com
Cc: Lingyu Liu <lingyu.liu@intel.com>
Subject: [dpdk-dev] [PATCH V3 2/2] net/iavf: update PTYPE mapping for eCPRI
Date: Tue, 20 Apr 2021 08:38:17 +0000
Message-ID: <20210420083817.10741-3-lingyu.liu@intel.com> (raw)
In-Reply-To: <20210420083817.10741-1-lingyu.liu@intel.com>

1.Map IPV4/IPV6 UDP eCPRI to L4_UDP_TUNNEL_ECPRI ptype.
2.Add L2_ETHER_ECPRI ptype and map ETHER eCPRI to L2_ETHER_ECPRI ptype.

Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 52 ++++++++++++++++++++++--------------
 1 file changed, 32 insertions(+), 20 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 3f3cf6306c..30a8497c45 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3349,49 +3349,61 @@ iavf_get_default_ptype_table(void)
 			RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
 			RTE_PTYPE_INNER_L4_ICMP,
 
+		/* Ether --> ECPRI */
+		[362] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[363] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[364] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[365] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[366] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[367] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[368] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[369] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[370] = RTE_PTYPE_L2_ETHER_ECPRI,
+		[371] = RTE_PTYPE_L2_ETHER_ECPRI,
+
 		/* IPv4 --> UDP ECPRI */
 		[372] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[373] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[374] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[375] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[376] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[377] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[378] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[379] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[380] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[381] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 
 		/* IPV6 --> UDP ECPRI */
 		[382] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[383] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[384] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[385] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[386] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[387] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[388] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[389] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[390] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		[391] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
-			RTE_PTYPE_L4_UDP,
+			RTE_PTYPE_TUNNEL_ECPRI | RTE_PTYPE_L4_UDP,
 		/* All others reserved */
 	};
 
-- 
2.25.1


      parent reply	other threads:[~2021-04-20  2:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17  9:04 [dpdk-dev] [PATCH v1] mbuf: support eCPRI hardware packet type Add L2_ETHER_ECPRI and L4_UDP_TUNNEL_ECPRI in RTE_PTYPE Lingyu Liu
2021-04-17  9:25 ` [dpdk-dev] [PATCH v2] mbuf: support eCPRI hardware packet type Lingyu Liu
2021-04-19 14:24   ` Olivier Matz
2021-04-20  2:17     ` Liu, Lingyu
2021-04-20  7:51       ` Thomas Monjalon
2021-04-20 10:06         ` Andrew Rybchenko
2021-04-22 11:09         ` Liu, Lingyu
2021-04-20 13:01       ` Bing Zhao
2021-04-20  8:38   ` [dpdk-dev] [PATCH V3 0/2] mbuf:add eCPRI hardware packet type mapping Lingyu Liu
2021-04-20  8:38     ` [dpdk-dev] [PATCH V3 1/2] mbuf: support eCPRI hardware packet type Lingyu Liu
2021-04-20  9:57       ` Andrew Rybchenko
2021-04-20  8:38     ` Lingyu Liu [this message]

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=20210420083817.10741-3-lingyu.liu@intel.com \
    --to=lingyu.liu@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=qi.z.zhang@intel.com \
    --cc=thomas@monjalon.net \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git