On Wed, Jan 29, 2025 at 05:48:55PM +0530, Shaiq Wani wrote: > In case some CPUs don't support AVX512. Enable AVX2 for them to > get better per-core performance. > > The single queue model processes all packets in order while > the split queue model separates packet data and metadata into > different queues for parallel processing and improved performance > > Signed-off-by: Shaiq Wani <shaiq.w...@intel.com> > --- > doc/guides/rel_notes/release_25_03.rst | 7 + > drivers/common/idpf/idpf_common_device.h | 1 + > drivers/common/idpf/idpf_common_rxtx.h | 4 + > drivers/common/idpf/idpf_common_rxtx_avx2.c | 224 ++++++++++++++++++++ > drivers/common/idpf/version.map | 1 + > drivers/net/idpf/idpf_rxtx.c | 13 ++ > 6 files changed, 250 insertions(+) > > diff --git a/doc/guides/rel_notes/release_25_03.rst > b/doc/guides/rel_notes/release_25_03.rst > index 85986ffa61..a075bdf695 100644 > --- a/doc/guides/rel_notes/release_25_03.rst > +++ b/doc/guides/rel_notes/release_25_03.rst > @@ -63,6 +63,13 @@ New Features > and even substantial part of its code. > It can be viewed as an extension of rte_ring functionality. > > +* **Added support of AVX2 instructions on IDPF.** > + > + Support for AVX2 instructions in IDPF single queue RX and TX path > + added.The single queue model processes all packets in order within > + one RX queue, while the split queue model separates packet data and > + metadata into different queues for parallel processing and improved > performance. > + >
Good to see the release note update here. Please also merge in the other doc updates into this patch too. > Removed Items > ------------- > diff --git a/drivers/common/idpf/idpf_common_device.h > b/drivers/common/idpf/idpf_common_device.h > index 734be1c88a..5f3e4a4fcf 100644 > --- a/drivers/common/idpf/idpf_common_device.h > +++ b/drivers/common/idpf/idpf_common_device.h > @@ -124,6 +124,7 @@ struct idpf_vport { > bool rx_vec_allowed; > bool tx_vec_allowed; > bool rx_use_avx2; > + bool tx_use_avx2; > bool rx_use_avx512; > bool tx_use_avx512; > > diff --git a/drivers/common/idpf/idpf_common_rxtx.h > b/drivers/common/idpf/idpf_common_rxtx.h > index f50cf5ef46..e19e1878f3 100644 > --- a/drivers/common/idpf/idpf_common_rxtx.h > +++ b/drivers/common/idpf/idpf_common_rxtx.h > @@ -306,5 +306,9 @@ __rte_internal > uint16_t idpf_dp_singleq_recv_pkts_avx2(void *rx_queue, > struct rte_mbuf **rx_pkts, > uint16_t nb_pkts); > +__rte_internal > +uint16_t idpf_dp_singleq_xmit_pkts_avx2(void *tx_queue, > + struct rte_mbuf **tx_pkts, > + uint16_t nb_pkts); > > #endif /* _IDPF_COMMON_RXTX_H_ */ > diff --git a/drivers/common/idpf/idpf_common_rxtx_avx2.c > b/drivers/common/idpf/idpf_common_rxtx_avx2.c > index de76f01ff8..f82b6d7f4b 100644 > --- a/drivers/common/idpf/idpf_common_rxtx_avx2.c > +++ b/drivers/common/idpf/idpf_common_rxtx_avx2.c > @@ -483,3 +483,227 @@ idpf_dp_singleq_recv_pkts_avx2(void *rx_queue, struct > rte_mbuf **rx_pkts, uint16 > { > return _idpf_singleq_recv_raw_pkts_vec_avx2(rx_queue, rx_pkts, nb_pkts); > } > +static __rte_always_inline void > +idpf_tx_backlog_entry(struct idpf_tx_entry *txep, > + struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > +{ > + int i; > + > + for (i = 0; i < (int)nb_pkts; ++i) > + txep[i].mbuf = tx_pkts[i]; > +} > + I don't think it should block this patch - since other paths already use idpf-specific versions - but in next release we must look to switch this driver over to using the common tx (and rx) primitives now in net/intel/common. /Bruce