diff mbox series

[V3,2/2] net/iavf: update PTYPE mapping for eCPRI

Message ID 20210420083817.10741-3-lingyu.liu@intel.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers show
Series mbuf:add eCPRI hardware packet type mapping | expand

Checks

Context Check Description
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Lingyu Liu April 20, 2021, 8:38 a.m. UTC
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 mbox series

Patch

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 */
 	};