[4/5] net/nfp: remove logic of reporting packet type by hash type

Message ID 20230522080500.2014001-5-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series Add support of report packet type |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chaoyong He May 22, 2023, 8:04 a.m. UTC
  From: Qin Ke <qin.ke@corigine.com>

Firstly, the hash type is originally used as the keyword to calculate
rss hash value, not packet type itself.
Secondly, there are some issues in the existing logic and it is conflict
with packet type offload which to do next.

Removes the logic of reporting packet type by hash type.

Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_rxtx.c | 26 --------------------------
 1 file changed, 26 deletions(-)
  

Patch

diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index 2f7369315d..26bf1543ac 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -167,32 +167,6 @@  nfp_net_parse_meta_hash(const struct nfp_meta_parsed *meta,
 
 	mbuf->hash.rss = meta->hash;
 	mbuf->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
-
-	switch (meta->hash_type) {
-	case NFP_NET_RSS_IPV4:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV4;
-		break;
-	case NFP_NET_RSS_IPV6:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6;
-		break;
-	case NFP_NET_RSS_IPV6_EX:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT;
-		break;
-	case NFP_NET_RSS_IPV4_TCP:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT;
-		break;
-	case NFP_NET_RSS_IPV6_TCP:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT;
-		break;
-	case NFP_NET_RSS_IPV4_UDP:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT;
-		break;
-	case NFP_NET_RSS_IPV6_UDP:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L3_IPV6_EXT;
-		break;
-	default:
-		mbuf->packet_type |= RTE_PTYPE_INNER_L4_MASK;
-	}
 }
 
 /*