> -----Original Message----- > From: dev <[email protected]> On Behalf Of Morten Brørup > Sent: Thursday, August 27, 2020 20:38 > To: Guo, Jia <[email protected]>; Yang, Qiming <[email protected]>; Xing, > Beilei > <[email protected]>; Zhao1, Wei <[email protected]>; Zhang, Qi Z > <[email protected]>; Wu, > Jingjing <[email protected]> > Cc: Richardson, Bruce <[email protected]>; [email protected]; Zhang, > Helin <[email protected]>; > Yigit, Ferruh <[email protected]>; [email protected] > Subject: Re: [dpdk-dev] [PATCH v2 0/5] maximize vector rx burst for PMDs > > > From: Jeff Guo [mailto:[email protected]] > > Sent: Thursday, August 27, 2020 12:10 PM > > > > The limitation of burst size in vector rx was removed, since it should > > retrieve as much received packets as possible. And also the scattered > > receive path should use a wrapper function to achieve the goal of > > burst maximizing. > > > > This patch set aims to maximize vector rx burst for for > > ixgbe/i40e/ice/iavf/fm10k PMDs. > > > > v2->v1: > > 1:add fm10k driver case > > 2:refine some doc > > > > I now noticed that the vector functions also does: > nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP); > > 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. > That is, unless the rte_eth_rx_burst() API is extended with requirements to > nb_pkts, as discussed in > the other thread: > http://inbox.dpdk.org/dev/20200827114117.GD569@bricha3- > MOBL.ger.corp.intel.com/T/#mc8051e9022d6aeb20c51c5a226b2274d3d6d4266 > > > Med venlig hilsen / kind regards > - Morten Brørup > >

