From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2017 01:13:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,405,1503385200"; d="scan'208";a="140336843" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.32]) by orsmga004.jf.intel.com with SMTP; 20 Oct 2017 01:13:50 -0700 Received: by (sSMTP sendmail emulation); Fri, 20 Oct 2017 09:13:49 +0100 Date: Fri, 20 Oct 2017 09:13:49 +0100 From: Bruce Richardson To: Yongseok Koh Cc: "dev@dpdk.org" Message-ID: <20171020081349.GA15108@bricha3-MOBL3.ger.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-dev] Requirement of minimum Rx burst size for PMDs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 08:13:54 -0000 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