DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yang Ming <ming.1.yang@nokia-sbell.com>
To: Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Ian Stokes <ian.stokes@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>, Ke Zhang <ke1x.zhang@intel.com>
Cc: dev@dpdk.org, Yang Ming <ming.1.yang@nokia-sbell.com>, stable@dpdk.org
Subject: [PATCH] net/iavf: fix mbuf release bug for ARM Architecture
Date: Fri,  7 Mar 2025 13:40:22 +0800	[thread overview]
Message-ID: <20250307054023.911-1-ming.1.yang@nokia-sbell.com> (raw)

This patch addresses a bug related to mbuf release in the ARM
architecture. The previous patch resolved the mbuf release issue
in a multi-process environment but was only applicable to the
x86 architecture, leaving ARM unaddressed.
This patch extends the fix to include the ARM architecture,
ensuring consistent behavior across both x86 and ARM platforms.

Fixes: fced83c1229e ("net/iavf: fix mbuf release in multi-process")
Cc: ke1x.zhang@intel.com
Cc: stable@dpdk.org

Signed-off-by: Yang Ming <ming.1.yang@nokia-sbell.com>
---
 drivers/net/intel/iavf/iavf_rxtx.c          | 3 +++
 drivers/net/intel/iavf/iavf_rxtx.h          | 2 ++
 drivers/net/intel/iavf/iavf_rxtx_vec_neon.c | 8 ++------
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 657963750d..a999073691 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -380,6 +380,9 @@ struct iavf_rxq_ops iavf_rxq_release_mbufs_ops[] = {
 #ifdef RTE_ARCH_X86
 	[IAVF_REL_MBUFS_SSE_VEC].release_mbufs = iavf_rx_queue_release_mbufs_sse,
 #endif
+#ifdef RTE_ARCH_ARM64
+	[IAVF_REL_MBUFS_NEON_VEC].release_mbufs = iavf_rx_queue_release_mbufs_neon,
+#endif
 };
 
 static inline void
diff --git a/drivers/net/intel/iavf/iavf_rxtx.h b/drivers/net/intel/iavf/iavf_rxtx.h
index 6a54b446cf..823a6efa9a 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.h
+++ b/drivers/net/intel/iavf/iavf_rxtx.h
@@ -404,6 +404,7 @@ enum iavf_rxtx_rel_mbufs_type {
 	IAVF_REL_MBUFS_DEFAULT		= 0,
 	IAVF_REL_MBUFS_SSE_VEC		= 1,
 	IAVF_REL_MBUFS_AVX512_VEC	= 2,
+	IAVF_REL_MBUFS_NEON_VEC		= 3,
 };
 
 /* Receive Flex Descriptor profile IDs: There are a total
@@ -729,6 +730,7 @@ void iavf_set_default_ptype_table(struct rte_eth_dev *dev);
 void iavf_tx_queue_release_mbufs_avx512(struct ci_tx_queue *txq);
 void iavf_rx_queue_release_mbufs_sse(struct iavf_rx_queue *rxq);
 void iavf_tx_queue_release_mbufs_sse(struct ci_tx_queue *txq);
+void iavf_rx_queue_release_mbufs_neon(struct iavf_rx_queue *rxq);
 
 static inline
 void iavf_dump_rx_descriptor(struct iavf_rx_queue *rxq,
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_neon.c b/drivers/net/intel/iavf/iavf_rxtx_vec_neon.c
index 6bc8e1db2a..a583340f15 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_neon.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_neon.c
@@ -393,20 +393,16 @@ iavf_recv_pkts_vec(void *__rte_restrict rx_queue,
 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
-static void __rte_cold
+void __rte_cold
 iavf_rx_queue_release_mbufs_neon(struct iavf_rx_queue *rxq)
 {
 	_iavf_rx_queue_release_mbufs_vec(rxq);
 }
 
-static const struct iavf_rxq_ops neon_vec_rxq_ops = {
-	.release_mbufs = iavf_rx_queue_release_mbufs_neon,
-};
-
 int __rte_cold
 iavf_rxq_vec_setup(struct iavf_rx_queue *rxq)
 {
-	rxq->ops = &neon_vec_rxq_ops;
+	rxq->rel_mbufs_type = IAVF_REL_MBUFS_NEON_VEC;
 	rxq->mbuf_initializer = ci_rxq_mbuf_initializer(rxq->port_id);
 	return 0;
 }
-- 
2.34.1


                 reply	other threads:[~2025-03-07  5:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250307054023.911-1-ming.1.yang@nokia-sbell.com \
    --to=ming.1.yang@nokia-sbell.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=ke1x.zhang@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@intel.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).