DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Shaiq Wani <shaiq.wani@intel.com>
Cc: <dev@dpdk.org>, <aman.deep.singh@intel.com>
Subject: Re: [PATCH v2 2/3] common/idpf: enable AVX2 for single queue Tx
Date: Wed, 29 Jan 2025 16:53:26 +0000	[thread overview]
Message-ID: <Z5pdBnPdr9RrJcbC@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20250129121856.1040065-3-shaiq.wani@intel.com>

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.wani@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

  reply	other threads:[~2025-01-29 16:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 12:17 [PATCH 0/2] enable AVX2 for IDPF single queue Shaiq Wani
2025-01-08 12:17 ` [PATCH 1/2] common/idpf: enable AVX2 for single queue Rx Shaiq Wani
2025-01-20 14:15   ` Bruce Richardson
2025-01-27  8:19     ` Wani, Shaiq
2025-01-29 12:18   ` [PATCH v2 0/3] enable AVX2 for single queue Rx/Tx Shaiq Wani
2025-01-29 12:18     ` [PATCH v2 1/3] common/idpf: enable AVX2 for single queue Rx Shaiq Wani
2025-01-29 16:48       ` Bruce Richardson
2025-01-30  8:24       ` [PATCH v3 0/2] enable AVX2 for single queue Rx/Tx Shaiq Wani
2025-01-30  8:24         ` [PATCH v3 1/2] common/idpf: enable AVX2 for single queue Rx Shaiq Wani
2025-01-30  8:21           ` David Marchand
2025-01-30  8:24         ` [PATCH v3 2/2] common/idpf: enable AVX2 for single queue Tx Shaiq Wani
2025-01-29 12:18     ` [PATCH v2 2/3] " Shaiq Wani
2025-01-29 16:53       ` Bruce Richardson [this message]
2025-01-29 12:18     ` [PATCH v2 3/3] doc: documentaion update for idpf pmd Shaiq Wani
2025-01-29 16:55       ` Bruce Richardson
2025-01-08 12:17 ` [PATCH 2/2] common/idpf: enable AVX2 for single queue Tx Shaiq Wani
2025-01-20 14:23   ` Bruce Richardson
2025-01-27  9:46     ` Wani, Shaiq

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=Z5pdBnPdr9RrJcbC@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=shaiq.wani@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).