DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Long Wu <long.wu@corigine.com>,
	Chaoyong He <chaoyong.he@corigine.com>
Subject: [PATCH v3 4/4] net/nfp: vector Rx function supports parsing ptype
Date: Tue,  9 Jul 2024 15:29:21 +0800	[thread overview]
Message-ID: <20240709072921.246520-5-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240709072921.246520-1-chaoyong.he@corigine.com>

From: Long Wu <long.wu@corigine.com>

Vector AVX2 Rx function supports parsing packet type and set it to mbuf.

Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_net_common.c    | 2 +-
 drivers/net/nfp/nfp_rxtx.c          | 2 +-
 drivers/net/nfp/nfp_rxtx.h          | 3 +++
 drivers/net/nfp/nfp_rxtx_vec_avx2.c | 2 ++
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index 08693d5fba..3d916cd147 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -1455,7 +1455,7 @@ nfp_net_supported_ptypes_get(struct rte_eth_dev *dev, size_t *no_of_elements)
 		RTE_PTYPE_INNER_L4_SCTP,
 	};
 
-	if (dev->rx_pkt_burst != nfp_net_recv_pkts)
+	if (dev->rx_pkt_burst == NULL)
 		return NULL;
 
 	net_hw = dev->data->dev_private;
diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index 4fc3374987..da41a0e663 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -350,7 +350,7 @@ nfp_net_set_ptype(const struct nfp_ptype_parsed *nfp_ptype,
  * @param mb
  *   Mbuf to set the packet type.
  */
-static void
+void
 nfp_net_parse_ptype(struct nfp_net_rxq *rxq,
 		struct nfp_net_rx_desc *rxds,
 		struct rte_mbuf *mb)
diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
index fff8371991..c717d97003 100644
--- a/drivers/net/nfp/nfp_rxtx.h
+++ b/drivers/net/nfp/nfp_rxtx.h
@@ -245,5 +245,8 @@ void nfp_net_tx_queue_info_get(struct rte_eth_dev *dev,
 		uint16_t queue_id,
 		struct rte_eth_txq_info *qinfo);
 void nfp_net_recv_pkts_set(struct rte_eth_dev *eth_dev);
+void nfp_net_parse_ptype(struct nfp_net_rxq *rxq,
+		struct nfp_net_rx_desc *rxds,
+		struct rte_mbuf *mb);
 
 #endif /* __NFP_RXTX_H__ */
diff --git a/drivers/net/nfp/nfp_rxtx_vec_avx2.c b/drivers/net/nfp/nfp_rxtx_vec_avx2.c
index 7c18213624..508ec7faa5 100644
--- a/drivers/net/nfp/nfp_rxtx_vec_avx2.c
+++ b/drivers/net/nfp/nfp_rxtx_vec_avx2.c
@@ -111,6 +111,8 @@ nfp_vec_avx2_recv_set_rxpkt1(struct nfp_net_rxq *rxq,
 
 	nfp_net_meta_parse(rxds, rxq, hw, rx_pkt, &meta);
 
+	nfp_net_parse_ptype(rxq, rxds, rx_pkt);
+
 	/* Checking the checksum flag */
 	nfp_net_rx_cksum(rxq, rxds, rx_pkt);
 }
-- 
2.39.1


  parent reply	other threads:[~2024-07-09  7:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  2:59 [PATCH 0/4] support AVX2 instruction Rx/Tx function Chaoyong He
2024-06-19  2:59 ` [PATCH 1/4] net/nfp: export more interfaces of NFDk Chaoyong He
2024-06-19  2:59 ` [PATCH 2/4] net/nfp: support AVX2 Tx function Chaoyong He
2024-06-19  2:59 ` [PATCH 3/4] net/nfp: support AVX2 Rx function Chaoyong He
2024-06-19  2:59 ` [PATCH 4/4] net/nfp: vector Rx function supports parsing ptype Chaoyong He
2024-07-06 18:51 ` [PATCH 0/4] support AVX2 instruction Rx/Tx function Ferruh Yigit
2024-07-08  5:52   ` Chaoyong He
2024-07-08  5:58 ` [PATCH v2 " Chaoyong He
2024-07-08  5:58   ` [PATCH v2 1/4] net/nfp: export more interfaces of NFDk Chaoyong He
2024-07-08  5:58   ` [PATCH v2 2/4] net/nfp: support AVX2 Tx function Chaoyong He
2024-07-08  5:58   ` [PATCH v2 3/4] net/nfp: support AVX2 Rx function Chaoyong He
2024-07-08  5:58   ` [PATCH v2 4/4] net/nfp: vector Rx function supports parsing ptype Chaoyong He
2024-07-08 11:45   ` [PATCH v2 0/4] support AVX2 instruction Rx/Tx function Ferruh Yigit
2024-07-09  1:13     ` Chaoyong He
2024-07-09  7:29   ` [PATCH v3 " Chaoyong He
2024-07-09  7:29     ` [PATCH v3 1/4] net/nfp: export more interfaces of NFDk Chaoyong He
2024-07-09  7:29     ` [PATCH v3 2/4] net/nfp: support AVX2 Tx function Chaoyong He
2024-07-09  7:29     ` [PATCH v3 3/4] net/nfp: support AVX2 Rx function Chaoyong He
2024-07-09  7:29     ` Chaoyong He [this message]
2024-07-09  8:24     ` [PATCH v4 0/5] support AVX2 instruction Rx/Tx function Chaoyong He
2024-07-09  8:24       ` [PATCH v4 1/5] net/nfp: fix compile fail on 32-bit OS Chaoyong He
2024-07-09  8:24       ` [PATCH v4 2/5] net/nfp: export more interfaces of NFDk Chaoyong He
2024-07-09  8:24       ` [PATCH v4 3/5] net/nfp: support AVX2 Tx function Chaoyong He
2024-07-09  8:24       ` [PATCH v4 4/5] net/nfp: support AVX2 Rx function Chaoyong He
2024-07-09  8:24       ` [PATCH v4 5/5] net/nfp: vector Rx function supports parsing ptype Chaoyong He
2024-07-09 13:06       ` [PATCH v4 0/5] support AVX2 instruction Rx/Tx function Ferruh Yigit

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=20240709072921.246520-5-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=long.wu@corigine.com \
    --cc=oss-drivers@corigine.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).