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 021CFA09E0; Sat, 14 Nov 2020 19:31:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9593AC88E; Sat, 14 Nov 2020 19:31:52 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id 3AEC4C882 for ; Sat, 14 Nov 2020 19:31:49 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 14 Nov 2020 10:31:51 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 14 Nov 2020 18:31:47 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 14 Nov 2020 18:31:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQVOpknCqOolmocz7LshxTJWV6h4e6wdXt4CY6RHUDwdLShJR45cwlR2ZFebBsv4780YUmw/I0FcPJZre/PRBctZi/4/kxvf1NQpyBXPJcOHsAbRTdG8N3Dv/9Ss7I0G1KciZ2gUE4OfFl9InFmuxHjpfWad5oAUPB3ddn7Pq5W8ApgiKCFmo3uWHsrRWQV3P2p55dZNMJ1GWlsZ2a/g1W2KTwX1cOE23+G588T7E3eQ0Ay2wou8az3oiGGDQzIVoE2y47EuW6eZCMVxu33ShaJLVmx5JIu8HG2UHSn6jQ0QVfVxe3e2NebHTJ0de0dF/8sGd0pbM3Z8w+s3Pzt9Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sQAc11kvZDHxqauQK1qgr4xysNHGRULC+cgJ4Yaj1h0=; b=RAZ2m34I5GY6sIti8O9kMiHk4ovHbW/gS8qUgr81veN6LKRd9ddLzxo4RE2zGRljP1JRkMlY6iSIGdJkY2244RGfB+Wm5u9jk88Hmld+BoxEU9BtjAIT395J86Wn356v4AXpJGjOADqCOE77xgXNZmRS+klWgscQDOp0K5Rx1JLrKlqgpcvVKxXzNl/JHMm122dS97A0DaxDBo5klUGudRHzYnS5VD1tRUJzGCdi2R/TBQ8g3yc1N+yYJmKt+3DLvk+X/5nQo/SVjAqS9lqoUGKiXjQyYZtPd7yLx7GNgZ5ZVmcmMJoG/edZaLEkcJz5+MtVY045zqzp9Y/+yVnuPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MN2PR12MB4639.namprd12.prod.outlook.com (2603:10b6:208:a4::31) by MN2PR12MB3725.namprd12.prod.outlook.com (2603:10b6:208:162::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.25; Sat, 14 Nov 2020 18:31:45 +0000 Received: from MN2PR12MB4639.namprd12.prod.outlook.com ([fe80::e1c9:53d3:6bee:7ee4]) by MN2PR12MB4639.namprd12.prod.outlook.com ([fe80::e1c9:53d3:6bee:7ee4%6]) with mapi id 15.20.3541.025; Sat, 14 Nov 2020 18:31:45 +0000 From: Gregory Etelson To: NBU-Contact-Thomas Monjalon CC: Matan Azrad , Slava Ovsiienko , "dev@dpdk.org" , Raslan Darawsheh , "Shahaf Shuler" , Asaf Penso Thread-Topic: [dpdk-dev] [PATCH v2 5/5] net/mlx5: fix non-dv compilation errors Thread-Index: AQHWucyyqMqK6MOxrUuraGToZ9w0pKnHiZ+AgABa57CAAAYcAIAACIuA Date: Sat, 14 Nov 2020 18:31:45 +0000 Message-ID: References: <20201113145231.13154-1-getelson@nvidia.com> <2696445.BIzKWCxRHJ@thomas> <3521151.qGM00RRr3l@thomas> In-Reply-To: <3521151.qGM00RRr3l@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [176.230.226.39] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f5d18676-dd82-45b6-afbe-08d888cb8a8a x-ms-traffictypediagnostic: MN2PR12MB3725: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tlsJKQ58TkUcRg3630DEvusNQ0oxE8kn/emkJluuUzPmaxwUuLCsM0EduZP7FULTxWlwC+tWYHeVPdZZx2FAAW1euO6zQMoBPc5V102UzpCGeIlzWs+8fgRIFZtFK9JrttTJrmDBqvU7/eJ7a9HAA6zvPHUEzYMDxGgWMyDozI+IAaxkrtlVBajylSv/1kYzVDZfd/wXPw/wgOSNKm+g1m9P+FG+bLJ+8pS4hc9H2RX6Q/sAJDW9NOHivT2TFsXmszIevC05qkdBFWoY7Wf1+sdihYOJFtxbVz8HseD7fyA/juAEGH66S+Q/YBvJj/G1 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4639.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(376002)(396003)(136003)(39860400002)(54906003)(107886003)(55016002)(316002)(6506007)(5660300002)(2906002)(86362001)(64756008)(66556008)(478600001)(6916009)(7696005)(9686003)(26005)(4326008)(66476007)(83380400001)(66446008)(66946007)(76116006)(52536014)(8676002)(186003)(33656002)(71200400001)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: XA1Vccz6A+KZ1LTh9RqsdreWv6C8nfcgsxzYd8jZhCQi29iwKOPoZCI9cN37ydXyhaZ6+1TrljJbP6n/qyz5r616N4hldIFbs/uA8N9+P8OVrU1htM6NuZPGVIWCxI+gEKDUm1sgDuNPDVbfPPC2C4+WPU1SVJAqSF69fdm5YghgPD+qxo3hp67qMKlGEz/FRngLy2o+u7kFgnn99VsmZfMpu1/plTOy4+z8gAXUcUcyxuUmLjLzjeDF8DHEHg+ntE2C0kcsBJlznksmjXu37CwOtN2m5ZplOvl1ESRTg1JVfWN71TwHI40JLe0yyztAywrkq3rnPNVylXT9lH51P05d72JVcpK9O5AzqqOg+dNwvfviFA3fHyzl7xLrCd4M9kmztOjbhqBsQ5UlFSg7bWHe5vyIFf6ts013Yc1yQXJi8HBcplxzT1SucgCR+Nc2UKs21vPbf4LEnBCV0HlLAJvgVQVg/RqEy9C9+F7ZXRhBVCUm8Iz2sxhXxcavB2DkTVnTh6D7XeyYl3AqBGdaLBPDkgHZZhwZLlY4fyeweojv0FASgnRYHhivbyf6SDfc1O4PNljJq39N4rL//XHf5F/m6ajKcU+T04Qa3X9oYeEgIia1vx6hvvazIpKo1yNwT0VoS0w+UZTZMvdiJbR2Hg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4639.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5d18676-dd82-45b6-afbe-08d888cb8a8a X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2020 18:31:45.5509 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8HMJEny8ZK1uGjTU8VGto8pGHdkWnwfj9XwhlQXbp3bkyzWE9oICfwr1YB/uNuNeuns2b/KJgpGhuvy8P6Lnfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3725 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605378711; bh=sQAc11kvZDHxqauQK1qgr4xysNHGRULC+cgJ4Yaj1h0=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=YjVHh1RZIpq/o6pLLvLcRXFzfUMD9Ce44upXlIfGo9W8xX8/QFt+N/2DuhKaTpWLL oayPkWDIgVD4Pb0JtC9OguQDLBBQYbGTuj7pjuXWRv1pLtfzU4H/b+eb3fuecMJLKS QBwkFAUe96xwBedtKYmd+eObdo5JWNjr0j+qzoMsdKkOWjTEqR1LHBCE3W0pT5Mlam nhvrwym9NP+EBWgvbJh6cXBIy0dXthYctjuOt3oyUNgDn4aUqieF97CrNX3AN9rIyE Icwqa5vHTLDe8zZrqtQtF4ZymNMy0IlDUfSzwgM0GCJPck8S5luakLMtWH5k2MAj0w YE0rYKVoRgr2g== 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 =3D 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. >=20 > 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. > > > 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 >=20 > I recommend not following this bad code style. > Later other occurences should be fixed. >=20 > > > Matan, Slava, as maintainers, what are your policies in mlx5 code? >=20 >=20