[2/2] net/nfp: add default process to report outer L4 packet type

Message ID 20230605031207.3381300-3-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series report the outer L3 and L4 packet type |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Chaoyong He June 5, 2023, 3:12 a.m. UTC
  From: Qin Ke <qin.ke@corigine.com>

The parsing of outer layer 4 packet type by Rx descriptor is not
supported, add default process to report the outer layer 4 packet
type for VXLAN and GENEVE packets.

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index a36efd3aa9..0ac9d6db03 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -340,13 +340,13 @@  nfp_net_set_ptype(const struct nfp_ptype_parsed *nfp_ptype, struct rte_mbuf *mb)
 	case NFP_NET_PTYPE_TUNNEL_NONE:
 		break;
 	case NFP_NET_PTYPE_TUNNEL_VXLAN:
-		mbuf_ptype |= RTE_PTYPE_TUNNEL_VXLAN;
+		mbuf_ptype |= RTE_PTYPE_TUNNEL_VXLAN | RTE_PTYPE_L4_UDP;
 		break;
 	case NFP_NET_PTYPE_TUNNEL_NVGRE:
 		mbuf_ptype |= RTE_PTYPE_TUNNEL_NVGRE;
 		break;
 	case NFP_NET_PTYPE_TUNNEL_GENEVE:
-		mbuf_ptype |= RTE_PTYPE_TUNNEL_GENEVE;
+		mbuf_ptype |= RTE_PTYPE_TUNNEL_GENEVE | RTE_PTYPE_L4_UDP;
 		break;
 	default:
 		PMD_RX_LOG(DEBUG, "Unrecognized nfp tunnel packet type: %u",