From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: Requirement of minimum Rx burst size for PMDs Date: Fri, 20 Oct 2017 09:13:49 +0100 Message-ID: <20171020081349.GA15108@bricha3-MOBL3.ger.corp.intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" To: Yongseok Koh Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8F3C87D06 for ; Fri, 20 Oct 2017 10:13:53 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Oct 20, 2017 at 01:18:18AM +0000, Yongseok Koh wrote: > Hi, > > In some rx_burst functions, especially for vectorized ones (e.g. i40e_rxtx_vec* > or mlx5_rxtx_vec*), there's actually a requirement of min burst size. > > As it manipulates 4 packets simultaneously in a loop, if nb_pkts of > rte_eth_rx_burst() is less than 4, it just returns without sending a packet. > > One way to handle it could be falling back to regular rx_burst in such cases but > the burst size isn't a fixed/static parameter but applications can dynamically > change it when it polls a device. So, it might not be a good option. > > Therefore, how about adding min_rx/tx_burst_sz in struct rte_eth_dev_info and > have PMDs fill it in on dev_ops->dev_infos_get() so as to make apps comply with > it. > > Because the max size of a burst can be handled well by PMD, it may not be > necessary. > > Thoughts? > For a short term fix, having the min burst size in the device info is a good enough fix, I think. Medium to long term, we need to remove this limitation in the vector drivers. /Bruce