DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Zhe Tao <zhe.tao@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/4] add vector PMD RX for FVL
Date: Tue, 29 Sep 2015 15:27:41 +0100	[thread overview]
Message-ID: <20150929142741.GD6748@bricha3-MOBL3> (raw)
In-Reply-To: <1443373527-28948-2-git-send-email-zhe.tao@intel.com>

On Mon, Sep 28, 2015 at 01:05:24AM +0800, Zhe Tao wrote:
> The vPMD RX function uses the multi-buffer and SSE instructions to
> accelerate the RX speed, but now the pktype cannot be supported by the vPMD RX,
> because it will decrease the performance heavily.
> 
> Signed-off-by: Zhe Tao <zhe.tao@intel.com>
> ---
>  config/common_bsdapp              |   2 +
>  config/common_linuxapp            |   2 +
>  drivers/net/i40e/Makefile         |   1 +
>  drivers/net/i40e/base/i40e_type.h |   3 +
>  drivers/net/i40e/i40e_rxtx.c      |  28 ++-
>  drivers/net/i40e/i40e_rxtx.h      |  20 +-
>  drivers/net/i40e/i40e_rxtx_vec.c  | 484 ++++++++++++++++++++++++++++++++++++++
>  7 files changed, 535 insertions(+), 5 deletions(-)
>  create mode 100644 drivers/net/i40e/i40e_rxtx_vec.c
> 
<snip>
> +
> + /* vPMD receive routine, now only accept (nb_pkts == RTE_I40E_VPMD_RX_BURST)
> + * in one loop
> + *
> + * Notice:
> + * - nb_pkts < RTE_I40E_VPMD_RX_BURST, just return no packet

I don't think this comment matches the implementation below. I think you are
allowed to request bursts as small as RTE_I40E_DESCS_PER_LOOP.

> + * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
> + *   numbers of DD bits
> +
> + */
> +static inline uint16_t
> +_recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
> +		   uint16_t nb_pkts, uint8_t *split_packet)
> +{
> +	volatile union i40e_rx_desc *rxdp;
> +	struct i40e_rx_entry *sw_ring;
> +	uint16_t nb_pkts_recd;
> +	int pos;
> +	uint64_t var;
> +	__m128i shuf_msk;
> +
> +	__m128i crc_adjust = _mm_set_epi16(
> +				0, 0, 0,    /* ignore non-length fields */
> +				-rxq->crc_len, /* sub crc on data_len */
> +				0,          /* ignore high-16bits of pkt_len */
> +				-rxq->crc_len, /* sub crc on pkt_len */
> +				0, 0            /* ignore pkt_type field */
> +			);
> +	__m128i dd_check, eop_check;
> +
> +	/* nb_pkts shall be less equal than RTE_I40E_MAX_RX_BURST */
> +	nb_pkts = RTE_MIN(nb_pkts, RTE_I40E_MAX_RX_BURST);
> +
> +	/* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */
> +	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP);

/Bruce

  parent reply	other threads:[~2015-09-29 14:27 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27 17:05 [dpdk-dev] [PATCH 0/4] i40e: add vector PMD support " Zhe Tao
2015-09-27 17:05 ` [dpdk-dev] [PATCH 1/4] add vector PMD RX " Zhe Tao
2015-09-27 23:15   ` Ananyev, Konstantin
     [not found]   ` <2601191342CEEE43887BDE71AB97725836A9CE35@irsmsx105.ger.corp.intel.com>
2015-09-29 13:06     ` [dpdk-dev] FW: " Ananyev, Konstantin
2015-09-29 14:27   ` Bruce Richardson [this message]
2015-09-27 17:05 ` [dpdk-dev] [PATCH 2/4] add vector PMD TX " Zhe Tao
2015-09-27 17:05 ` [dpdk-dev] [PATCH 3/4] add vector PMD scatter RX " Zhe Tao
2015-09-27 17:05 ` [dpdk-dev] [PATCH 4/4] add RX and TX selection function " Zhe Tao
2015-10-30 10:52 ` [dpdk-dev] [PATCH 0/8 v2] i40e: add vector PMD support " Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 1/8 v2] add vector PMD RX " Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 2/8 v2] add vector PMD TX " Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 3/8 v2] add vector PMD scatter RX " Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 4/8 v2] add RX and TX selection function " Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 5/8 v2] edit the comments Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 6/8 v2] change the postion of data prefetch for splitter packets Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 7/8 v2] move all the extra definition out of share code Zhe Tao
2015-10-30 10:52   ` [dpdk-dev] [PATCH 8/8 v2] update the release note Zhe Tao
2015-10-30 13:01   ` [dpdk-dev] [PATCH 0/4 v3] i40e: add vector PMD support for FVL Zhe Tao
2015-10-30 13:01     ` [dpdk-dev] [PATCH 1/4 v3] add vector PMD RX " Zhe Tao
2015-10-30 13:40       ` Liang, Cunming
2015-10-30 13:01     ` [dpdk-dev] [PATCH 2/4 v3] add vector PMD TX " Zhe Tao
2015-10-30 13:29       ` Liang, Cunming
2015-11-03 21:20       ` Stephen Hemminger
2015-10-30 13:01     ` [dpdk-dev] [PATCH 3/4 v3] add vector PMD scatter RX " Zhe Tao
2015-10-30 13:46       ` Liang, Cunming
2015-10-30 13:01     ` [dpdk-dev] [PATCH 4/4 v3] add RX and TX selection function " Zhe Tao
2015-10-30 14:16     ` [dpdk-dev] [PATCH 0/4 v4] i40e: add vector PMD support " Zhe Tao
2015-10-30 14:16       ` [dpdk-dev] [PATCH 1/4 v4] add vector PMD RX " Zhe Tao
2015-10-30 15:33         ` Thomas Monjalon
2015-10-30 14:16       ` [dpdk-dev] [PATCH 2/4 v4] add vector PMD TX " Zhe Tao
2015-10-30 14:16       ` [dpdk-dev] [PATCH 3/4 v4] add vector PMD scatter RX " Zhe Tao
2015-10-30 14:16       ` [dpdk-dev] [PATCH 4/4 v4] add RX and TX selection function " Zhe Tao
2015-10-30 15:59         ` Thomas Monjalon
2015-10-30 14:24       ` [dpdk-dev] [PATCH 0/4 v4] i40e: add vector PMD support " Liang, Cunming
2015-10-30 15:41         ` Thomas Monjalon
2015-10-30 16:02           ` Thomas Monjalon

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=20150929142741.GD6748@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=zhe.tao@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).