DPDK patches and discussions
 help / color / mirror / Atom feed
From: Morten Brørup <mb@smartsharesystems.com>
To: "Wenzhuo Lu" <wenzhuo.lu@intel.com>, <dev@dpdk.org>
Cc: "Bruce Richardson" <bruce.richardson@intel.com>,
	"Leyi Rong" <leyi.rong@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 3/3] net/iavf: enable AVX512 for TX
Date: Mon, 21 Sep 2020 21:10:34 +0200
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C6131B@smartserver.smartshare.dk> (raw)
In-Reply-To: <1600676033-95774-4-git-send-email-wenzhuo.lu@intel.com>

> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Monday, September 21, 2020 10:14 AM
> 
> To enhance the per-core performance, this patch adds some AVX512
> instructions to the data path to handle the TX descriptors.
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>

[...]

> +static inline void
> +iavf_vtx(volatile struct iavf_tx_desc *txdp,
> +	 struct rte_mbuf **pkt, uint16_t nb_pkts,  uint64_t flags)
> +{
> +	const uint64_t hi_qw_tmpl = (IAVF_TX_DESC_DTYPE_DATA |
> +			((uint64_t)flags  << IAVF_TXD_QW1_CMD_SHIFT));
> +
> +	/* if unaligned on 32-bit boundary, do one to align */
> +	if (((uintptr_t)txdp & 0x1F) != 0 && nb_pkts != 0) {
> +		iavf_vtx1(txdp, *pkt, flags);
> +		nb_pkts--, txdp++, pkt++;
> +	}
> +
> +	/* do two at a time while possible, in bursts */

It looks like four at a time, not two.

> +	for (; nb_pkts > 3; txdp += 4, pkt += 4, nb_pkts -= 4) {
> +		__m512i desc4 =
> +			_mm512_set_epi64
> +				((uint64_t)pkt[3]->data_len,
> +				 pkt[3]->buf_iova,
> +				 (uint64_t)pkt[2]->data_len,
> +				 pkt[2]->buf_iova,
> +				 (uint64_t)pkt[1]->data_len,
> +				 pkt[1]->buf_iova,
> +				 (uint64_t)pkt[0]->data_len,
> +				 pkt[0]->buf_iova);
> +		__m512i hi_qw_tmpl_4 = _mm512_set1_epi64(hi_qw_tmpl);
> +		__m512i data_off_4 =
> +			_mm512_set_epi64
> +				(0,
> +				 pkt[3]->data_off,
> +				 0,
> +				 pkt[2]->data_off,
> +				 0,
> +				 pkt[1]->data_off,
> +				 0,
> +				 pkt[0]->data_off);
> +
> +		desc4 = _mm512_mask_slli_epi64(desc4, IAVF_TX_LEN_MASK,
> desc4,
> +					       IAVF_TXD_QW1_TX_BUF_SZ_SHIFT);
> +		desc4 = _mm512_mask_or_epi64(desc4, IAVF_TX_LEN_MASK,
> desc4,
> +					     hi_qw_tmpl_4);
> +		desc4 = _mm512_mask_add_epi64(desc4, IAVF_TX_OFF_MASK,
> desc4,
> +					      data_off_4);
> +		_mm512_storeu_si512((void *)txdp, desc4);
> +	}
> +
> +	/* do any last ones */
> +	while (nb_pkts) {
> +		iavf_vtx1(txdp, *pkt, flags);
> +		txdp++, pkt++, nb_pkts--;
> +	}
> +}

  reply	other threads:[~2020-09-21 19:10 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  5:59 [dpdk-dev] [PATCH 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-09-10  5:59 ` [dpdk-dev] [PATCH 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-10  9:29   ` Bruce Richardson
2020-09-11  3:06     ` Lu, Wenzhuo
2020-09-10  5:59 ` [dpdk-dev] [PATCH 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-10  5:59 ` [dpdk-dev] [PATCH 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-09-15  1:17   ` Wang, Haiyue
2020-09-17  1:29     ` Lu, Wenzhuo
2020-09-17  1:39 ` [dpdk-dev] [PATCH v2 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-09-17  1:39   ` [dpdk-dev] [PATCH v2 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-17  1:39   ` [dpdk-dev] [PATCH v2 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-17  1:39   ` [dpdk-dev] [PATCH v2 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-09-17  7:37   ` [dpdk-dev] [PATCH v2 0/3] enable AVX512 for iavf Morten Brørup
2020-09-17  9:13     ` Bruce Richardson
2020-09-17  9:35       ` Morten Brørup
2020-09-21  8:13 ` [dpdk-dev] [PATCH v3 " Wenzhuo Lu
2020-09-21  8:13   ` [dpdk-dev] [PATCH v3 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-21  8:13   ` [dpdk-dev] [PATCH v3 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-21  8:13   ` [dpdk-dev] [PATCH v3 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-09-21 19:10     ` Morten Brørup [this message]
2020-09-22  1:34       ` Lu, Wenzhuo
2020-09-27  1:30 ` [dpdk-dev] [PATCH v4 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-09-27  1:30   ` [dpdk-dev] [PATCH v4 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-09-27  1:30   ` [dpdk-dev] [PATCH v4 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-09-27  1:30   ` [dpdk-dev] [PATCH v4 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-10-21  7:47 ` [dpdk-dev] [PATCH v5 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-10-21  7:47   ` [dpdk-dev] [PATCH v5 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-10-21  7:47   ` [dpdk-dev] [PATCH v5 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-10-21  7:47   ` [dpdk-dev] [PATCH v5 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-10-28  5:14 ` [dpdk-dev] [PATCH v6 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-10-28  5:14   ` [dpdk-dev] [PATCH v6 1/3] net/iavf: enable AVX512 for legacy RX Wenzhuo Lu
2020-10-28  5:14   ` [dpdk-dev] [PATCH v6 2/3] net/iavf: enable AVX512 for flexible RX Wenzhuo Lu
2020-10-28  5:15   ` [dpdk-dev] [PATCH v6 3/3] net/iavf: enable AVX512 for TX Wenzhuo Lu
2020-10-29  1:24 ` [dpdk-dev] [PATCH v7 0/3] enable AVX512 for iavf Wenzhuo Lu
2020-10-29  1:24   ` [dpdk-dev] [PATCH v7 1/3] net/iavf: enable AVX512 for legacy Rx Wenzhuo Lu
2020-10-29  1:24   ` [dpdk-dev] [PATCH v7 2/3] net/iavf: enable AVX512 for flexible Rx Wenzhuo Lu
2020-10-29  1:24   ` [dpdk-dev] [PATCH v7 3/3] net/iavf: enable AVX512 for Tx Wenzhuo Lu
2020-10-30 23:29     ` Ferruh Yigit
2020-10-29  4:00   ` [dpdk-dev] [PATCH v7 0/3] enable AVX512 for iavf Zhang, Qi Z

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=98CBD80474FA8B44BF855DF32C47DC35C6131B@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=leyi.rong@intel.com \
    --cc=wenzhuo.lu@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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git