From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id F20342BF4 for ; Wed, 9 Mar 2016 15:27:32 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id p65so194732075wmp.1 for ; Wed, 09 Mar 2016 06:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=gbNXaeejBvMOBEe0PRpcIVstFyffhWJmImoFEpp/kl0=; b=eGkvY7wibOqALgGjFTwx7U586Gk/wFp+ax9+JOk03dx3BkDteMrSrIhk4qdPnjrype wMkbAajo72roaJb9imkdXr/UKRDuSVpbnw3+CKq7iPFUZjG1VHrlb5ixGKbexgqrCPO2 pIhJKlFZMhx8Xr+9f9C1YeC56pg3OOVWF9zuv1o/PUAHvK3G4aEJbDI5dlxelkOBzRr5 A97h/6OaTgz+tYHuXrP+4X1nf5bk/nGjYwOb0nL4noreNecsvaLuUFo/jplsel/P1sWe j/LDgfW8+csZrlJ0ETXW9UpdEWhcl4VILmglBX0fuJ3qbYTGeAk6IBgb9Drdwdx9ayy7 JarA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=gbNXaeejBvMOBEe0PRpcIVstFyffhWJmImoFEpp/kl0=; b=cl9Y1D4TszvExSfZ76/Uvg0C3aDf7xYt07Rm+HldKz9pE3/byf/4vEaLT9EP3PvgpR DsZFd7lVGT8ydnFAulNPI2SjllDswJ3sgH39NsJw5w5OR7N5/nRkQ/FqrqEn7kPb/3Xb tvGoRJQQbRxG1AnmFyTl43Vc+aWUnOEJ2u9HxDxEDTAIQGn7z30NyyFRiLfmkOBAGyYm eRKNWQJdvg69stgBEAFE9YBmjvql6BJfmr3TJAmQn+7BFEejIENpqVQ21X3A0Kbrb765 OYsqCoTgS2mUdgi+9hhWqHzzr7ZXmsCj2yH2krltbaOTEN1OxnLK4G95o/IkO0d+VSz1 lKzQ== X-Gm-Message-State: AD7BkJKempJlZJQfBHV3YqF6iiGxOl5ELDz2YlPfRDW9AEO/nJgqSyery0GPKeFnIfHzYbYS X-Received: by 10.194.185.237 with SMTP id ff13mr38760517wjc.129.1457533652800; Wed, 09 Mar 2016 06:27:32 -0800 (PST) Received: from xps13.localnet (171.36.101.84.rev.sfr.net. [84.101.36.171]) by smtp.gmail.com with ESMTPSA id gt7sm8175814wjc.1.2016.03.09.06.27.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2016 06:27:32 -0800 (PST) From: Thomas Monjalon To: "Ananyev, Konstantin" Date: Wed, 09 Mar 2016 15:25:52 +0100 Message-ID: <1964417.t7N6HDkJH0@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <2601191342CEEE43887BDE71AB97725836B1A4A2@irsmsx105.ger.corp.intel.com> References: <1452869038-9140-1-git-send-email-tomaszx.kulasek@intel.com> <4446137.g0qt5Fe5Df@xps13> <2601191342CEEE43887BDE71AB97725836B1A4A2@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2016 14:27:33 -0000 2016-03-09 13:36, Ananyev, Konstantin: > > > + if (to_send == 0) > > > + return 0; > > > > Why this check is done in the lib? > > What is the performance gain if we are idle? > > It can be done outside if needed. > > Yes, that could be done outside, but if user has to do it anyway, > why not to put it inside? > I don't expect any performance gain/loss because of that - > just seems a bit more convenient to the user. It is handling an idle case so there is no gain obviously. But the condition branching is surely a loss. So why the user would you like to do this check?