From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 4E62E3772 for ; Thu, 6 Jul 2017 01:00:59 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id DA49C20ACB; Wed, 5 Jul 2017 19:00:58 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 05 Jul 2017 19:00:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=iD+Ch29HZVFCTir klIiUo/7o4x0w5MvxMQYOiToHkMc=; b=qD96dh80O8hF0g2qJPqQBpU2ay4n4uG Y7QId768b7pE2XCTLjgqkxQfPXFZxKPMk71aooqcSTGoWohGmFyA+zALUc6SezYv gm/vr4wReRqbTa5vXrue9xQkxLJJF0NqHJPB9rhmOJXCGMFqBtZ7NGv7hlARc36N ej0C7LY2KJ6I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=iD+Ch29HZVFCTirklIiUo/7o4x0w5MvxMQYOiToHkMc=; b=FulfBJiE z8TtDqyMUAh9XMKB4EO0NHdXGVv9B+8MVc+mZjYsaiB0b1orMCB9jTYLl+NkjDIB SNVi88GiUATwVGnVEi2l04i6gI+1Yr73tl55pyv1UowaeY9ZYDjB9IcmBl4yO5Ts WG81O5g4k8GqJ+zI/fcyIKiJmsRklUNJvxvb2lGzT/yUshkNFyor0ZIUcPAJNtlv DNywHVAotX9EWv+63YktT95zhlajp4uRzn1jOptNN+4ErSTYe7r0VlwNtyAa+PnL sjfY6lAa1m/Ar5N6KRyP8GrKpmRYQEzOHQFYT9CVEC300rbu1pnsOOVB9skrXaNH LmzuZnzsMQ8PCA== X-ME-Sender: X-Sasl-enc: viXBBOsEK8uvsD2VkCRdl9EZk4uyxMrrS6c1X2Z0xBSJ 1499295658 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7A189240AF; Wed, 5 Jul 2017 19:00:58 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org, Stephen Hemminger Cc: Andrew Rybchenko , Sergio Gonzalez Monroy , Remy Horton , Jianfeng Tan , Declan Doherty , Ferruh Yigit , Yuanhan Liu , Maxime Coquelin , Konstantin Ananyev , Bruce Richardson , Reshma Pattan , Cristian Dumitrescu , Byron Marohn , Pablo de Lara Guarch , Pawel Wodkowski , Tomasz Kantecki , John McNamara , Daniel Mrzyglod , Roman Zhukov Date: Thu, 06 Jul 2017 01:00:57 +0200 Message-ID: <9753207.xkvjPXifed@xps> In-Reply-To: References: <1488459935-13273-2-git-send-email-arybchenko@solarflare.com> <20170525104033.43a6e02f@xeon-e3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add function to adjust number of descriptors 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: Wed, 05 Jul 2017 23:00:59 -0000 14/06/2017 12:37, Andrew Rybchenko: > On 05/25/2017 08:40 PM, Stephen Hemminger wrote: > > On Thu, 25 May 2017 16:57:53 +0100 > > Andrew Rybchenko wrote: > > > >> From: Roman Zhukov > >> > >> Check that numbers of Rx and Tx descriptors satisfy descriptors limits > >> from the Ethernet device information, otherwise adjust them to boundaries. > >> > >> Signed-off-by: Roman Zhukov > >> Signed-off-by: Andrew Rybchenko > > Seems like new added complexity. > > It looks like there is no more comments. > > > Why not just allow devices to take the request as a hint and truncate or pad > > as needed. > > Yes, it is possible solution. In this case rte_eth_rx_queue_info_get() > may be used > to get real values. If so, first of all it should be clearly documented > in the > rte_eth_rx_queue_setup()/rte_eth_tx_queue_setup() and > rte_eth_rx_queue_info_get()/rte_eth_tx_queue_info_get(). > However, the problem of such approach is non-obvious modification of > values specified by the ethdev API caller. Some applications use ring sizes > to estimate mbuf pool size and other resources and if real values differ > from specified (and it is not taken into account since everything happens > silently without any errors) it could be tricky to find out root cause of > possible problems. That's why we have chosen approach with extra > helper function which does the adjustment. Any more comment on this? If not, it will be applied soon. > > IMHO to be successful DPDK must have as simple as possible API for application. > > Good enough and as little more as possible. But other people seem to think > > that having the richest and most complex possible API is a good thing. I agree it is better to have a simple API. However the community process is in favor of code writers. We cannot reject a solution if there is no other solution proposed in a reasonnable timeframe.