From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
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 <dev@dpdk.org>; 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: <xms:tBmwX7-_eefpMhJJOSHpCxZ1SEcRPe9nPim0W-3zWSlcVMcC9f2saA>
 <xme:tBmwX3taJp8VcI7kJ42qmLiTub2G7jQDFPNcXqDxR9Qawts9nEofPq5NxIxmtN2-e
 T-xQcOc01VJz9F_tg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvjedguddtjecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej
 ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh
 fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr
 lhhonhdrnhgvth
X-ME-Proxy: <xmx:tBmwX5BgY0MS3HIXfD9ou7oadZHfuTWaLNOWzPCF7yuSc4mc6fK26g>
 <xmx:tBmwX3fptCPkeZMueKiAavCihD4iuDO725an1nkUzcXkC1g-spXjyQ>
 <xmx:tBmwXwMWwGWrwO2dEzpfM6Fav-x7xZDcogWmQY-a5DArAFfwt4l8Aw>
 <xmx:tRmwX9rq_BtgkvfZYQd6aY9Y8ra3EULDxEA7BsQOFtOq7SKw3hPnRw>
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 <thomas@monjalon.net>
To: Gregory Etelson <getelson@nvidia.com>
Cc: Matan Azrad <matan@nvidia.com>, Slava Ovsiienko <viacheslavo@nvidia.com>,
 "dev@dpdk.org" <dev@dpdk.org>, Raslan Darawsheh <rasland@nvidia.com>,
 Shahaf Shuler <shahafs@nvidia.com>, Asaf Penso <asafp@nvidia.com>
Date: Sat, 14 Nov 2020 18:53:54 +0100
Message-ID: <3521151.qGM00RRr3l@thomas>
In-Reply-To: <MN2PR12MB463985D7E84540418232CE2EA5E50@MN2PR12MB4639.namprd12.prod.outlook.com>
References: <20201113145231.13154-1-getelson@nvidia.com>
 <2696445.BIzKWCxRHJ@thomas>
 <MN2PR12MB463985D7E84540418232CE2EA5E50@MN2PR12MB4639.namprd12.prod.outlook.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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?