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

Chaoyong He chaoyong.he at corigine.com
Mon Jun 5 05:12:07 CEST 2023


From: Qin Ke <qin.ke at 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 at corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
---
 drivers/net/nfp/nfp_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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",
-- 
2.39.1



More information about the dev mailing list