DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jeff Guo <jia.guo@intel.com>
Cc: "Wang, Haiyue" <haiyue.wang@intel.com>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Yang, Qiming" <qiming.yang@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Zhao1, Wei" <wei.zhao1@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Zhang, Helin" <helin.zhang@intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"barbette@kth.se" <barbette@kth.se>
Subject: Re: [dpdk-dev] [PATCH v2 0/5] maximize vector rx burst for PMDs
Date: Fri, 28 Aug 2020 13:30:50 -0700	[thread overview]
Message-ID: <20200828133050.74e38bf3@hermes.lan> (raw)
In-Reply-To: <77c760bb-7034-72b6-d4ba-c970764b7f3d@intel.com>

On Fri, 28 Aug 2020 14:39:33 +0800
Jeff Guo <jia.guo@intel.com> wrote:

> >> I am not sure about this, but if I read it correctly, calling rte_eth_rx_burst() with nb_pkts = 33
> >> (not 32) would only return 32 packets, even if more packets are available. (I assume that
> >> RTE_I40E_DESCS_PER_LOOP is 32.) In this case, I guess that you need to read the remaining of the
> >> requested packets using the non-vector function in order to support any nb_pkts value.
> >>  
> > This is vector instruction handling design requirement, like for avx2: #define ICE_DESCS_PER_LOOP_AVX 8,
> > if deep into the real loop handling, you will get the point why doing RTE_ALIGN_FLOOR. ;-)
> >
> > _ice_recv_raw_pkts_vec_avx2:
> > for (i = 0, received = 0; i < nb_pkts; i += ICE_DESCS_PER_LOOP_AVX, rxdp += ICE_DESCS_PER_LOOP_AVX)
> >
> > Maybe it is worth to tell PMD to stop using vector by calling rte_eth_rx_queue_setup with the application
> > burst size it wants.

There is no need for yet another nerd knob in DPDK.

The driver must accept any burst size > 0.
If it wants to optimize for certain multiples, then it can do so in its burst handler.
Like any optimized checksum calculator does.

Let the CPU branch predictor do its job and find the best path through the
driver code.

Something like:

my_driver_recv_burst((void *prxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
	if (nb_pkts == 32)
		return my_driver_recv_burst32(prxq, rx_pkts, nb_pkts);
		return my_driver_recv_burstN(prxq, rx_pkts, nb_pkts);


You could repeatedly call the burst32 if passed large nb_pkts.

  parent reply	other threads:[~2020-08-28 20:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 10:10 Jeff Guo
2020-08-27 10:10 ` [dpdk-dev] [PATCH v2 1/5] net/ixgbe: maximize vector rx burst for ixgbe Jeff Guo
2020-08-27 10:10 ` [dpdk-dev] [PATCH v2 2/5] net/i40e: maximize vector rx burst for i40e Jeff Guo
2020-08-27 10:10 ` [dpdk-dev] [PATCH v2 3/5] net/ice: maximize vector rx burst for ice Jeff Guo
2020-08-31  4:41   ` Zhang, Qi Z
2020-08-31  5:24     ` Jeff Guo
2020-08-27 10:10 ` [dpdk-dev] [PATCH v2 4/5] net/iavf: maximize vector rx burst for iavf Jeff Guo
2020-08-27 10:10 ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: maximize vector rx burst for fm10k Jeff Guo
2020-08-27 12:38 ` [dpdk-dev] [PATCH v2 0/5] maximize vector rx burst for PMDs Morten Brørup
2020-08-28  2:06   ` Wang, Haiyue
2020-08-28  6:39     ` Jeff Guo
2020-08-28 11:45       ` Morten Brørup
2020-08-28 20:30       ` Stephen Hemminger [this message]
2020-08-31 14:27         ` Wang, Haiyue

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200828133050.74e38bf3@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=barbette@kth.se \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=haiyue.wang@intel.com \
    --cc=helin.zhang@intel.com \
    --cc=jia.guo@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=mb@smartsharesystems.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=wei.zhao1@intel.com \


* 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).