DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Jianbo Liu <jianbo.liu@linaro.org>
Cc: <dev@dpdk.org>, <helin.zhang@intel.com>, <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/ixgbe: calculate correct number of received packets for ARM NEON-version vPMD
Date: Wed, 21 Dec 2016 15:38:51 +0530	[thread overview]
Message-ID: <20161221100848.GA4506@localhost.localdomain> (raw)
In-Reply-To: <1482127758-4904-2-git-send-email-jianbo.liu@linaro.org>

On Mon, Dec 19, 2016 at 11:39:18AM +0530, Jianbo Liu wrote:

Hi Jianbo,

> vPMD will check 4 descriptors in one time, but the statuses are not consistent
> because the memory allocated for RX descriptors is cacheable huagepage.
Is it different in X86 case ?i.e Is x86 creating non cacheable hugepages?
I am just looking at what it takes to fix similar issues for all drivers wrt armv8.

Are you able to reproduce this issue any armv8 platform. If so, could
you please the platform detail and commands to reproduce this issue?

> This patch is to calculate the number of received packets by scanning DD bit
> sequentially, and stops when meeting the first packet with DD bit unset.
> 
> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
> ---
>  drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
> index f96cc85..0b1338d 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
> @@ -196,7 +196,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
>  	struct ixgbe_rx_entry *sw_ring;
>  	uint16_t nb_pkts_recd;
>  	int pos;
> -	uint64_t var;
>  	uint8x16_t shuf_msk = {
>  		0xFF, 0xFF,
>  		0xFF, 0xFF,  /* skip 32 bits pkt_type */
> @@ -255,6 +254,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
>  		uint64x2_t mbp1, mbp2;
>  		uint8x16_t staterr;
>  		uint16x8_t tmp;
> +		uint32_t var = 0;
>  		uint32_t stat;
>  
>  		/* B.1 load 1 mbuf point */
> @@ -349,11 +349,19 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
>  		vst1q_u8((uint8_t *)&rx_pkts[pos]->rx_descriptor_fields1,
>  			 pkt_mb1);
>  
> +		stat &= IXGBE_VPMD_DESC_DD_MASK;
> +
>  		/* C.4 calc avaialbe number of desc */
> -		var =  __builtin_popcount(stat & IXGBE_VPMD_DESC_DD_MASK);
> -		nb_pkts_recd += var;
> -		if (likely(var != RTE_IXGBE_DESCS_PER_LOOP))
> +		if (likely(var != IXGBE_VPMD_DESC_DD_MASK)) {
> +			while (stat & 0x01) {
> +				++var;
> +				stat = stat >> 8;
> +			}
> +			nb_pkts_recd += var;
>  			break;
> +		} else {
> +			nb_pkts_recd += RTE_IXGBE_DESCS_PER_LOOP;
> +		}
>  	}
>  
>  	/* Update our internal tail pointer */
> -- 
> 2.4.11
> 

  reply	other threads:[~2016-12-21 10:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19  6:09 [dpdk-dev] [PATCH 1/2] net/ixgbe: calculate the correct number of received packets in bulk alloc function Jianbo Liu
2016-12-19  6:09 ` [dpdk-dev] [PATCH 2/2] net/ixgbe: calculate correct number of received packets for ARM NEON-version vPMD Jianbo Liu
2016-12-21 10:08   ` Jerin Jacob [this message]
2016-12-21 11:03     ` Bruce Richardson
2016-12-22  1:18       ` Jianbo Liu
2016-12-22  1:05     ` Jianbo Liu
2017-02-01 16:19 ` [dpdk-dev] [PATCH 1/2] net/ixgbe: calculate the correct number of received packets in bulk alloc function Ananyev, Konstantin
2017-02-03  6:22   ` Jianbo Liu
2017-02-03 11:38     ` Ananyev, Konstantin
2017-02-04  3:37       ` Jianbo Liu
2017-02-04  9:37 ` [dpdk-dev] [PATCH v2 " Jianbo Liu
2017-02-04  9:37   ` [dpdk-dev] [PATCH v2 2/2] net/ixgbe: calculate correct number of received packets for ARM NEON-version vPMD Jianbo Liu
2017-02-04 13:26   ` [dpdk-dev] [PATCH v2 1/2] net/ixgbe: calculate the correct number of received packets in bulk alloc function Ananyev, Konstantin
2017-02-08 18:02     ` Ferruh Yigit
2017-02-08 18:53       ` Ananyev, Konstantin
2017-02-08 19:53         ` Ananyev, Konstantin
2017-02-09  3:49           ` Jianbo Liu
2017-02-04 16:37 ` [dpdk-dev] [PATCH v3 " Jianbo Liu
2017-02-04 16:37   ` [dpdk-dev] [PATCH v3 2/2] net/ixgbe: calculate correct number of received packets for ARM NEON-version vPMD Jianbo Liu
2017-02-04 16:39   ` [dpdk-dev] [PATCH v3 1/2] net/ixgbe: calculate the correct number of received packets in bulk alloc function Jianbo Liu
2017-02-09  4:05 ` [dpdk-dev] [PATCH v4 " Jianbo Liu
2017-02-09  4:05   ` [dpdk-dev] [PATCH v4 2/2] net/ixgbe: calculate correct number of received packets for ARM NEON-version vPMD Jianbo Liu
2017-02-09 12:43     ` Ferruh Yigit
2017-02-09 12:39   ` [dpdk-dev] [PATCH v4 1/2] net/ixgbe: calculate the correct number of received packets in bulk alloc function Ferruh Yigit
2017-02-09 12:42     ` Ferruh Yigit

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=20161221100848.GA4506@localhost.localdomain \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=jianbo.liu@linaro.org \
    --cc=konstantin.ananyev@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).