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 568A0A09E0; Sat, 14 Nov 2020 18:54:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32746C88E; Sat, 14 Nov 2020 18:54:01 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id 30FEDC88A for ; Sat, 14 Nov 2020 18:54:00 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id BCE2D864; Sat, 14 Nov 2020 12:53:57 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 14 Nov 2020 12:53:58 -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= FOM63+MNnca/utCsNik6VsrdId4IvVVDox24RtgycU4=; b=gslW6cpYQPYb9p6u WvIg8yC9piz0hpTnOGFr2VX/ReVlvt+oi54Paovof+ns6iikeSj2AI31q+BqzeYg JxTMtzZYtZOnrtVYsgHkkExjm+TJgST+s4YPl6d38f/zB0eM6ABdIdYnWIJeIpdS BN7PAhqwgnCM9MtFYSsOJP2a4VI42C88Eilwu0yowObKXneIwP7eQG/UyAwUC14P b4c7euDTl4YtZxnsjmHgo6ILG6Xxjc2w7XPfMGsE7BHQmst9YyOlYyQDKXSrMrMI U4CDBBc0zxJ4MvVht88c3MOCM7uUzyEHp0xPGxfc/oZlhcji86jRejlFeq0hxEfH sPNLvg== 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=FOM63+MNnca/utCsNik6VsrdId4IvVVDox24Rtgyc U4=; b=aa4ZW88mmiz7fLTHDBQ8yopzOuAVl1JXiJEpYwhhodwPdOPaBzg8moyOP D9YoSNisLi+yQAyIw0KT2HYg56oLi9xmdYDOXMBPap1xaWDx523TI5lbpeC2mJQt BUvEb5qoU4nwWwLamqxaeS0h4mGiMthg4a97L18B2JaEsusozzlK1+qzK1dc7i4i nrEymVUxjDehEL3aN7nqmxm2xVmoGohpgG2LyUFc28APmHt5NveiWtB1tztku1xw nFixuQHm4g367IQYMNEhyPXOImN49c8oypqNJPkmBJqC9EQ16xrhhLRdt0UHv5t7 CmhwMmxxVbFTO3y1Y6hF9q9wQ6PCQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvjedguddtjecutefuodetggdotefrod 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 11D2C3064AA6; Sat, 14 Nov 2020 12:53:55 -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 18:53:54 +0100 Message-ID: <3521151.qGM00RRr3l@thomas> In-Reply-To: References: <20201113145231.13154-1-getelson@nvidia.com> <2696445.BIzKWCxRHJ@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 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. > > I see some other functions are passing arrays with [] syntax, which does > > not make sense in parameters. I should be a simple pointer. > > I agree that arrays should not be passed with [] syntax. > However, I kept existing rte flow style - see rte_flow_create I recommend not following this bad code style. Later other occurences should be fixed. > > Matan, Slava, as maintainers, what are your policies in mlx5 code?