DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Liang, Cunming" <cunming.liang@intel.com>
To: Zoltan Kiss <zoltan.kiss@linaro.org>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] ixgbe: remove vector pmd burst size restriction
Date: Mon, 3 Aug 2015 02:40:12 +0000	[thread overview]
Message-ID: <D0158A423229094DA7ABF71CF2FA0DA3119B2F77@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <55BB47FB.3000409@linaro.org>

Hi, 

[...]
> > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> > index 3f808b3..dbdb761 100644
> > --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> > @@ -4008,7 +4008,8 @@ ixgbe_set_rx_function(struct rte_eth_dev *dev)
> >   	 */
> >   	} else if (adapter->rx_vec_allowed) {
> >   		PMD_INIT_LOG(DEBUG, "Vector rx enabled, please make sure
> RX "
> > -				   "burst size no less than 32.");
> > +				    "burst size no less than 4 (port=%d).",
> > +			     dev->data->port_id);
> 
> I think it would be better to use RTE_IXGBE_DESCS_PER_LOOP instead of a
> constant 4.
> >
[...]
> >
> >   /*
> > - * vPMD receive routine, now only accept (nb_pkts ==
> RTE_IXGBE_VPMD_RX_BURST)
> > - * in one loop
> > + * vPMD raw receive routine
> I would keep some warning there, like "(if nb_pkts <
> RTE_IXGBE_DESCS_PER_LOOP, won't receive anything)"
> 
> >    *
> >    * Notice:
> > - * - nb_pkts < RTE_IXGBE_VPMD_RX_BURST, just return no packet
> > - * - nb_pkts > RTE_IXGBE_VPMD_RX_BURST, only scan
> RTE_IXGBE_VPMD_RX_BURST
> > - *   numbers of DD bit
> > + * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
> > + * - 'nb_pkts < 4' causes 0 packet receiving
> Again, RTE_IXGBE_DESCS_PER_LOOP would be better than 4
> 
[...]
> >   uint16_t
> >   ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
> >   		uint16_t nb_pkts)
> >   {
> >   	struct ixgbe_rx_queue *rxq = rx_queue;
> > -	uint8_t split_flags[RTE_IXGBE_VPMD_RX_BURST] = {0};
> > +	uint8_t split_flags[nb_pkts];
> > +
> > +	memset(split_flags, 0, nb_pkts);
> >
> >   	/* get some new buffers */
> >   	uint16_t nb_bufs = _recv_raw_pkts_vec(rxq, rx_pkts, nb_pkts,
> 
> After this _recv_raw_pkts_vec it checks 32 bytes in split_flags (4x8
> bytes), that can overrun or miss some flags.
> Btw. Bruce just fixed that part in "ixgbe: fix check for split packets"
> 
> 
Thanks for all these valuable comments, will keep the max burst size 32.

  parent reply	other threads:[~2015-08-03  2:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31  8:17 Cunming Liang
2015-07-31  9:21 ` Ananyev, Konstantin
2015-07-31 10:03 ` Zoltan Kiss
2015-07-31 10:21   ` Ananyev, Konstantin
2015-07-31 11:57     ` Zoltan Kiss
2015-07-31 14:49       ` Zoltan Kiss
2015-08-03  7:41     ` Liang, Cunming
2015-08-03  9:59       ` Liang, Cunming
2015-08-03  2:40   ` Liang, Cunming [this message]
2015-08-04  7:32 ` [dpdk-dev] [PATCH v2] " Cunming Liang
2015-08-04  9:02   ` Zoltan Kiss
2015-08-04 11:15     ` Liang, Cunming
2015-08-04 11:47   ` [dpdk-dev] [PATCH v3] " Cunming Liang
2015-08-04 16:26     ` Zoltan Kiss
2015-08-05  6:28       ` Liang, Cunming
2015-08-05 15:59         ` Zoltan Kiss
2015-08-05  9:31     ` Ananyev, Konstantin
2015-09-09 13:16       ` 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=D0158A423229094DA7ABF71CF2FA0DA3119B2F77@shsmsx102.ccr.corp.intel.com \
    --to=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=zoltan.kiss@linaro.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).