net/iavf: fix mbuf release bug for ARM Architecture

Message ID 20250307054023.911-1-ming.1.yang@nokia-sbell.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers
Series net/iavf: fix mbuf release bug for ARM Architecture |

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/iol-marvell-Functional success Functional Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Yang Ming March 7, 2025, 5:40 a.m. UTC
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(-)
  

Comments

Bruce Richardson March 10, 2025, 5 p.m. UTC | #1
On Fri, Mar 07, 2025 at 01:40:22PM +0800, Yang Ming wrote:
> 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(-)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied to dpdk-next-net-intel.

Thanks,
/Bruce
  

Patch

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;
 }