From: "Stokes, Ian" <ian.stokes@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH 2/4] net/ice: fix AVX-512 pointer copy on 32-bit
Date: Mon, 30 Sep 2024 13:29:09 +0000 [thread overview]
Message-ID: <MW6PR11MB8309D6089CC0329E6CC0CD7192762@MW6PR11MB8309.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20240906141127.628873-3-bruce.richardson@intel.com>
> The size of a pointer on 32-bit is only 4 rather than 8 bytes, so
> copying 32 pointers only requires half the number of AVX-512 load store
> operations.
>
> Fixes: a4e480de268e ("net/ice: optimize Tx by using AVX512")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> drivers/net/ice/ice_rxtx_vec_avx512.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c
> b/drivers/net/ice/ice_rxtx_vec_avx512.c
> index 04148e8ea2..add095ef06 100644
> --- a/drivers/net/ice/ice_rxtx_vec_avx512.c
> +++ b/drivers/net/ice/ice_rxtx_vec_avx512.c
> @@ -907,6 +907,7 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
> uint32_t copied = 0;
> /* n is multiple of 32 */
> while (copied < n) {
> +#ifdef RTE_ARCH_64
> const __m512i a =
> _mm512_loadu_si512(&txep[copied]);
> const __m512i b = _mm512_loadu_si512(&txep[copied
> + 8]);
> const __m512i c = _mm512_loadu_si512(&txep[copied +
> 16]);
> @@ -916,6 +917,12 @@ ice_tx_free_bufs_avx512(struct ice_tx_queue *txq)
> _mm512_storeu_si512(&cache_objs[copied + 8], b);
> _mm512_storeu_si512(&cache_objs[copied + 16], c);
> _mm512_storeu_si512(&cache_objs[copied + 24], d);
> +#else
> + const __m512i a =
> _mm512_loadu_si512(&txep[copied]);
> + const __m512i b = _mm512_loadu_si512(&txep[copied
> + 16]);
> + _mm512_storeu_si512(&cache_objs[copied], a);
> + _mm512_storeu_si512(&cache_objs[copied + 16], b);
> +#endif
> copied += 32;
> }
> cache->len += n;
> --
LGTM, Acked.
Thanks
Ian
next prev parent reply other threads:[~2024-09-30 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240906141127.628873-1-bruce.richardson@intel.com>
2024-09-06 14:11 ` [PATCH 1/4] net/i40e: " Bruce Richardson
2024-09-30 13:27 ` Stokes, Ian
2024-09-06 14:11 ` [PATCH 2/4] net/ice: " Bruce Richardson
2024-09-30 13:29 ` Stokes, Ian [this message]
2024-09-06 14:11 ` [PATCH 3/4] net/iavf: " Bruce Richardson
2024-09-06 14:11 ` [PATCH 4/4] common/idpf: " Bruce Richardson
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=MW6PR11MB8309D6089CC0329E6CC0CD7192762@MW6PR11MB8309.namprd11.prod.outlook.com \
--to=ian.stokes@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).