From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: No packets received if burst is too small in rte_eth_rx_burst Date: Mon, 19 Dec 2016 14:24:30 +0100 Message-ID: <1506956.nCsXY16HsG@xps13> References: <415214732.17903310.1481728244157.JavaMail.zimbra@ulg.ac.be> <1289578237.19546607.1481971405418.JavaMail.zimbra@ulg.ac.be> <20161219102504.GA170848@bricha3-MOBL3.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, tom.barbette@ulg.ac.be To: Bruce Richardson Return-path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id EDB80F936 for ; Mon, 19 Dec 2016 14:24:31 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id f82so100999828wmf.1 for ; Mon, 19 Dec 2016 05:24:31 -0800 (PST) In-Reply-To: <20161219102504.GA170848@bricha3-MOBL3.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-12-19 10:25, Bruce Richardson: > On Sat, Dec 17, 2016 at 11:43:25AM +0100, tom.barbette@ulg.ac.be wrote: > > Hi, > > > > Your comments made me saw the line "PMD: i40e_set_rx_function(): Vector rx enabled, please make sure RX burst size no less than 4 (port=0)." > > > > The problem was probably that I was under this limit... Is there a way to get that limit through a function or something? > > > > With 16.04 I received sometimes 5 or 7 packets with a burst_size of 4 which respects this limit. I see that "[dpdk-dev] net/i40e: fix out-of-bounds writes during vector Rx" fixed that, as the limit was in fact 32 no matter the message. > > > > At the end, what should be the minimal rx burst size? How to find it at runtime for any NIC? I imagine that vector rx will create a problem if I give a burst size of 1 even with a recent DPDK version, right? > > > > Sadly, there doesn't appear to be any way to discover this, and the i40e > driver requires at least a burst size of 4 even with the latest DPDK. > From i40e_rxtx_vec_sse.c: > > 243 /* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */ > 244 nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP); > 245 > > I think in this case the gap is not so much having a discovery mechanism > to determine min burst size, but rather a driver gap so as to allow some > form of slower-path fallback when we get below min-size bursts for the > vector driver. Yes this is a severe bug. Please Tom, could you keep asking/monitoring this bug until it is fixed? Thanks for reporting.