From: David Marchand <david.marchand@redhat.com>
To: Shaiq Wani <shaiq.wani@intel.com>
Cc: dev@dpdk.org, bruce.richardson@intel.com,
aman.deep.singh@intel.com,
Andre Muezerie <andremue@linux.microsoft.com>
Subject: Re: [PATCH v3 1/2] common/idpf: enable AVX2 for single queue Rx
Date: Thu, 30 Jan 2025 09:21:35 +0100 [thread overview]
Message-ID: <CAJFAV8x7V28rr0qF_Oenn5zBAnWvn_0gUu3V-WuCs8XodV__0Q@mail.gmail.com> (raw)
In-Reply-To: <20250130082445.1112043-2-shaiq.wani@intel.com>
On Thu, Jan 30, 2025 at 9:12 AM Shaiq Wani <shaiq.wani@intel.com> 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>
> ---
> drivers/common/idpf/idpf_common_device.h | 1 +
> drivers/common/idpf/idpf_common_rxtx.h | 4 +
> drivers/common/idpf/idpf_common_rxtx_avx2.c | 485 ++++++++++++++++++++
> drivers/common/idpf/meson.build | 7 +
> drivers/common/idpf/version.map | 1 +
> drivers/net/intel/idpf/idpf_rxtx.c | 11 +
> 6 files changed, 509 insertions(+)
> create mode 100644 drivers/common/idpf/idpf_common_rxtx_avx2.c
>
> diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/common/idpf/idpf_common_device.h
> index bfa927a5ff..734be1c88a 100644
> --- a/drivers/common/idpf/idpf_common_device.h
> +++ b/drivers/common/idpf/idpf_common_device.h
> @@ -123,6 +123,7 @@ struct idpf_vport {
>
> bool rx_vec_allowed;
> bool tx_vec_allowed;
> + bool rx_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 eeeeed12e2..f50cf5ef46 100644
> --- a/drivers/common/idpf/idpf_common_rxtx.h
> +++ b/drivers/common/idpf/idpf_common_rxtx.h
> @@ -302,5 +302,9 @@ uint16_t idpf_dp_splitq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pk
> __rte_internal
> uint16_t idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
> uint16_t nb_pkts);
> +__rte_internal
> +uint16_t idpf_dp_singleq_recv_pkts_avx2(void *rx_queue,
> + struct rte_mbuf **rx_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
> new file mode 100644
> index 0000000000..de76f01ff8
> --- /dev/null
> +++ b/drivers/common/idpf/idpf_common_rxtx_avx2.c
> @@ -0,0 +1,485 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2023 Intel Corporation
> + */
> +
> +#include <rte_vect.h>
> +
> +#include "idpf_common_rxtx.h"
> +#include "idpf_common_device.h"
> +
> +#ifndef __INTEL_COMPILER
> +#pragma GCC diagnostic ignored "-Wcast-qual"
> +#endif
Please, use newly introduced macros and stop ignoring such warnings.
For example, look at:
https://git.dpdk.org/dpdk/diff/drivers/net/i40e/i40e_rxtx_vec_avx2.c?id=43fd3624fdfe3a33904a9b64d94306dd3d4f2c13
--
David Marchand
next prev parent reply other threads:[~2025-01-30 8:21 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 [this message]
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
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=CAJFAV8x7V28rr0qF_Oenn5zBAnWvn_0gUu3V-WuCs8XodV__0Q@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=aman.deep.singh@intel.com \
--cc=andremue@linux.microsoft.com \
--cc=bruce.richardson@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).