Hi, > -----Original Message----- > From: Morten Brørup <[email protected]> > Sent: Thursday, July 16, 2020 12:03 AM > To: Zhao1, Wei <[email protected]>; Guo, Jia <[email protected]> > Cc: [email protected]; Thomas Monjalon <[email protected]>; Yigit, Ferruh > <[email protected]>; Andrew Rybchenko <[email protected]> > Subject: ixgbe vector rx does not conform to rte_eth_rx_burst() API > > Wei, Jeff, > > For the ixgbe driver using vector functions, i.e. ixgbe_recv_pkts_vec(), > calling > rte_eth_rx_burst() with nb_pkts > RTE_IXGBE_MAX_RX_BURST only returns > RTE_IXGBE_MAX_RX_BURST packets. E.g. calling rte_eth_rx_burst() with > nb_pkts=64 only returns 32 packets. > > > The API description of rte_eth_rx_burst() says: > > <quote> > The rte_eth_rx_burst() function returns the number of packets actually > retrieved, which is the number of rte_mbuf data structures effectively > supplied > into the rx_pkts array. A return value equal to nb_pkts indicates that the RX > queue contained at least rx_pkts packets, and this is likely to signify that > other > received packets remain in the input queue. Applications implementing a > "retrieve as much received packets as possible" policy can check this specific > case and keep invoking the rte_eth_rx_burst() function until a value less than > nb_pkts is returned. > </quote> > > The driver implementation does not conform to the documented behavior for > "retrieve as much received packets as possible" applications.
It seems not an issue, this function has comment bellow, it is design work in that way. /* * vPMD receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP) * * Notice: * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan RTE_IXGBE_MAX_RX_BURST * numbers of DD bit * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two */ > > > Med venlig hilsen / kind regards > - Morten Brørup

