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 6C6E1A09E0; Sat, 14 Nov 2020 20:24:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA3FFC88E; Sat, 14 Nov 2020 20:24:54 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id E1337C882 for ; Sat, 14 Nov 2020 20:24:52 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 8531B5C00B9; Sat, 14 Nov 2020 14:24:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 14 Nov 2020 14:24:49 -0500 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=fm2; bh= PDLazSeED3yxaRw59uzX+LNyUzqhkEUkurIHI4Jsuvo=; b=jbhJkMDJHoZBqRq7 XpUyeNiKvZMCwrbbSSh5LcG6s0xj6bPGFxazLdYDAGyXyMs2GCfNh7YRO3kKLChm jXFhWttlapkDj9XkxHdINdny0Wj80yeuYkr20206s7xPIPD1kippIcFubZJ+519X MEi2SNCoJiAjpCOdNqVl2YYsRCPgAVVHudgCbjODgUz5G7h/pJvEsAsBMXn5kwOo K/rLPIFinP3uumGU9pE6mmy+2v4nhL3aXne8KlXDmgWfN/5rJV22j9JyRyqVPEUO Zpe9TSvi712YXfUo5v3zBH//nAA2AT1vEwzC8a8cf31CBvmnMe2mQsLv7PO/oObo Sw6F9Q== 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=PDLazSeED3yxaRw59uzX+LNyUzqhkEUkurIHI4Jsu vo=; b=F/ZPrirAk5+MwkhG4VFw2/99Zkki7YaJjhXAUdoguuintn++W/GOEru2g FbiKtl1G6p3Z4d1XhGkJUK91ZlliBA4YHeciRCj2jIdNRZ6nL/aUXVXeUDDBRrDT ES5v6bRh+RSRpGAYx07KEaMF/trN5mI3qL8hJZ3CvSp63cL992xrErSEPoLG85fw CCEO4i99jmu35IXRrdWeNJV7mxDyY0zLGVF50olvoUScxFtcn8clDvR0vvnr+7+Y uKaSmlFSJ33PwR9+uiDZUD7HZ/uuHRobrWgxTou4/hfYuyMbFd7IRRqZKnBTKcMy cT/BH9QOpISJzgw4fELtlWfrXlI0w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvjedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 715AF3280060; Sat, 14 Nov 2020 14:24:48 -0500 (EST) From: Thomas Monjalon To: Gregory Etelson Cc: Matan Azrad , Slava Ovsiienko , dev@dpdk.org, Raslan Darawsheh , Shahaf Shuler , Asaf Penso Date: Sat, 14 Nov 2020 20:24:47 +0100 Message-ID: <41621094.tlia0Zn6mn@thomas> In-Reply-To: References: <20201113145231.13154-1-getelson@nvidia.com> <3521151.qGM00RRr3l@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 5/5] net/mlx5: fix non-dv compilation errors 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" 14/11/2020 19:31, Gregory Etelson: > > 14/11/2020 18:41, Gregory Etelson: > > > > 13/11/2020 15:52, Gregory Etelson: > > > > > + ret = mlx5_flow_group_to_table(dev, tunnel, jump_data- > > >group, > > > > > + &flow_table, grp_info, > > > > > + error); > > > > > > > > The parameter grp_info is a struct passed as value. > > > > I believe it should be passed as a pointer. > > > > > > struct flow_grp_info is a 64 bit-field: > > > struct flow_grp_info { > > > uint64_t external:1; > > > uint64_t transfer:1; > > > uint64_t fdb_def_rule:1; > > > /* force standard group translation */ > > > uint64_t std_tbl_fix:1; > > > uint64_t skip_scale:1; > > > }; > > > Since mlx5_flow_group_to_table() does not change bits configuration, > > > there is no need to pass this type as a pointer. > > > > I feel passing struct as pointer is a better practice. > > The parameter in question is 64 bit unsigned long value. > Structure coating is a syntactic sugar, because > C language does not have bit-field types. > In general, if structure size does not exceed 64 bit it can be passed > by value. > Passing it by reference would create unnecessary indirect access. Did you measure a performance difference? This current code triggers this compiler note: drivers/net/mlx5/mlx5_flow.c:7106:1: note: parameter passing for argument of type 'struct flow_grp_info' changed in GCC 9.1 I'm afraid it can be a problem. In general we don't have such note on the whole DPDK code base.