From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0617FA00BE; Fri, 1 Nov 2019 23:22:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 590351E876; Fri, 1 Nov 2019 23:22:43 +0100 (CET) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id EDAE81E874 for ; Fri, 1 Nov 2019 23:22:41 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 2D9416733; Fri, 1 Nov 2019 18:22:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 01 Nov 2019 18:22:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=UzVJrtVO/yqnBDdOmUVzH3/AYbeGbAZAG9UsjUZ59o8=; b=hW8nGQBuB77+ 19cc41uOvlQHtpfs/gDo3WBH/uFILzFJdXGho7vAESPc4z8Q5YYl4Yq4K/PeYLcx rtMgeKrMbglvT62X+lSPh9WtYzfawcGOCdatUWKAhvffZ+URiG6XRud9Y647JZMK ZDnsKU1LjN3xniDUhqv7nTJnkpH2uf4= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=UzVJrtVO/yqnBDdOmUVzH3/AYbeGbAZAG9UsjUZ59 o8=; b=rzvjJiAtNCQoUZJTR86Ihpku1DYZEHuIwhgcS2rJ5bFK8D+wWInmd/FO8 uG6VJLqDYf0UzLFUxQm5qd+RJJ6vxY96kNJzfk5lqE7HbOq3i6ecc7WbJWjkzsPQ gODBDVWJdm2gH0kE5Vvzttho65iZc/y/shujvr67pmtwog3k8H1XERsQqfWEOS+S EgG6lmnB9GaI89o9j8wsSMwwhyTfdLkSuKrYgUhxdTlQHYimp7zfS/g8IAkr54IM fWnHcKdAEhEjq0kHTfr0gEfCLXOlRttDX9IC5QXMK+BS3XSrXbNLjMHYhkQgGaXm cPgsG+dcottBpbdEClsW2+gZW/myQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddtjedgudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc fkphepleefrdeirddugeelrdduudegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (114.149.6.93.rev.sfr.net [93.6.149.114]) by mail.messagingengine.com (Postfix) with ESMTPA id BD29D80063; Fri, 1 Nov 2019 18:22:30 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko , Pavan Nikhilesh Bhagavatula Cc: "dev@dpdk.org" , "ferruh.yigit@intel.com" , Jerin Jacob Kollanukkaran , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , Wenzhuo Lu , John Daley , Hyong Youb Kim , Qi Zhang , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Beilei Xing , Jingjing Wu , Qiming Yang , Konstantin Ananyev , Shijith Thotton , Srisivasubramanian Srinivasan , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , Alejandro Lucero , Nithin Kumar Dabilpuram , Kiran Kumar Kokkilagadda , Rasesh Mody , Shahed Shaikh , Maciej Czekaj , Yong Wang Date: Fri, 01 Nov 2019 23:22:26 +0100 Message-ID: <2161046.gJxxHVMKQ0@xps> In-Reply-To: References: <20191029050312.2715-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v15 4/7] drivers/net: update Rx RSS hash offload capabilities 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 01/11/2019 12:11, Andrew Rybchenko: > On 10/31/19 7:51 PM, Pavan Nikhilesh Bhagavatula wrote: > > > >> 29/10/2019 16:37, pbhagavatula@marvell.com: > >>> From: Pavan Nikhilesh > >>> > >>> Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash delivery. > >>> > >>> Signed-off-by: Pavan Nikhilesh > >>> Reviewed-by: Andrew Rybchenko > >>> Reviewed-by: Hemant Agrawal > >>> Acked-by: Jerin Jacob > >>> Acked-by: Ajit Khaparde > >>> --- > >>> + if (!(dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_RSS_HASH)) > >>> + dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; > >> > >> Excuse me, I miss why you need a check before setting the bit. > > > > Currently, none of the PMDs support disabling RSS_HASH (except octeontx2) since it involves > > adding an if check in Rx routine that might lead to perf impact. > > So, we are implicitly enabling the offload for all the PMDs if an application decides to disable > > RSS_HASH. In future if PMD maintainer decides to add this feature she/he can remove the check. > > As I understand Thomas says that it is just sufficient to do: > dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; > without any if before. > > Yes, it is true since right now it looks a bit strange. > I guess it is the result of code evolution. Initially > it was logging inside if, but logging is moved to ethdev. > > (Of course, it is true for such trivial checks only) Yes exactly, this "if" can be removed in several places.