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 A9FDCA0527; Sun, 15 Nov 2020 06:48:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FA20C86C; Sun, 15 Nov 2020 06:48:15 +0100 (CET) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id A1E5D4CA6 for ; Sun, 15 Nov 2020 06:48:12 +0100 (CET) Received: from HKMAIL104.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 15 Nov 2020 13:48:10 +0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 15 Nov 2020 05:48:09 +0000 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.59) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 15 Nov 2020 05:48:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZdAMzq5szxwwHuAh6gZQq9tHtBNElLYAhZWKW9UOfVy7+Vcp1H2ubvLAAnJnm0kA4CnEJLJwSuN5jpB2BXV+NO/RrG4Tkh5U2PZ7LubSbn+JDfZkE5xFZxxcyoHdeEREZo80K9QtFPr0AkD+M5bu34QiEP9U0QjAPdG7yLbmLGJKgtWmQQvofkaorYnr8UvdclXjQLXxxHTmoI8iHKz4zUeWB+MgCMv2JvgqCkKNm4GOeMOjc2fqsKR4puQz4tY059c4yt7kco+06Ab2W/tKByTqLrqTO1mnf0RsrBj8KeLJZcm+Estxgt9p1f7yvo+NVwpAUsA47ggujrc45/DlA== 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=aZQbxLcFoLbhpQfXF2nktB2ec1c+asfT3kq1PHLgniU=; b=oEKaGCGkwgy+KA8KHh/OqBDe4pkhjOYeua+OWMlnltREGmxG77vg5BTHDnXFBJZZ+nO9C7ZRxEVIF5NTo9dVKAdROuNFYRbiWEj/xrm4oY3nW6eQZTPLV/a8sGI57zLy7VqNRB8giT4/N3HlHzYtYmnlodqql19O3YA6RYzYY8yp8J2G4fuSFd670p9Wt95BfsFR8vZAuyKU7ZQUC4fU26bfywslu5GfQWdRtKo16RoMgyBBSgGjJq18BLZIvrPXdbelYQzK1BVQOrqXaiiw1kWnFavVKLlHS0m2cz2cfAmpO9FfFCroyemfiA6G0beAduqkp/Z66yBYGriAEci5gw== 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 BL0PR12MB2354.namprd12.prod.outlook.com (2603:10b6:207:44::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Sun, 15 Nov 2020 05:48:00 +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.3564.028; Sun, 15 Nov 2020 05:47:59 +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+AgABa57CAAAYcAIAACIuAgAAQ2oCAAK3DoA== Date: Sun, 15 Nov 2020 05:47:59 +0000 Message-ID: References: <20201113145231.13154-1-getelson@nvidia.com> <3521151.qGM00RRr3l@thomas> <41621094.tlia0Zn6mn@thomas> In-Reply-To: <41621094.tlia0Zn6mn@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: b799c100-209b-49f2-1875-08d8892a027c x-ms-traffictypediagnostic: BL0PR12MB2354: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: utDZvibP1exAr4qWlEPEXzdOGn2Ttl0qAVl559Z6aYjew3m5BRm2fPCwT1IESqnSvBiID9GVLdqNB7O/I2HpCR8au8OtjdY+Tgt/1DlSqNaxz6dZwZqFNLpJKNpv0Hjo6aucDYsj7Ye+CGVtXIt3qg7o4kr1fcjAXd8IWfakveLWtaTr8omlN1YJYRCGgJn2lb8MH71NLLpVxEXXucMkVdX2RVVlTGT+1CjcWhGcyeIwUhSIN4JZ9GeNwtibV9c5OoOnA4Mn0fQpEayPIpNnokRsPHireYJGOxHFrV/eApAx8XZEvxokugA9PY/GDHLt 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)(39850400004)(396003)(346002)(376002)(366004)(136003)(2906002)(478600001)(5660300002)(6916009)(55016002)(186003)(8936002)(8676002)(316002)(33656002)(9686003)(54906003)(71200400001)(86362001)(6506007)(7696005)(76116006)(66446008)(66476007)(26005)(66946007)(64756008)(66556008)(83380400001)(107886003)(4326008)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: AlxGpCUgZ/SHhPICNh307nS319p35fOjaHcZMtRuDchX0jxwGNli2ttqj6oD5SQjQ2lGkva1mCeMoLU9YwwSlyGra0Jbt5/b0iKA2Awq7WbTMA1u9lf6Z+0Y+GzMN3NhA7ndsr/v8pOBBQnC9KtuCbVHMWWLGXhAxFYe6qaGK6X6BiNxmZHKQss9wucZ9bOOA80Vl6CR45nsmvYRNBwnEzj0BYvmj8obvjyzuBrqAV+33Q78a2yPex/gXtBjSEVCTpvZhFII+CiH/SqvJtZH09F1IR9mMAnxN7+rrHeVDVY9HHGgcIfcVinmS4fumOjzrEK3+hmthfN8ChAWOHRJm5giCY/mnmE4cIpEsynge3tzPS4aYP4xwZAUgZJ6+FQ0XPYtNy2IRkwEizegPRi8w5itOBkU1ktyUBx874MMPm37t2Xqcfd3Gmi3y3KtOtHp+MojrGkRYqP4iJ4OsnMljXaT143Xn+PdtHr3XYHbNR/UIYrX06D2pUobv3cE46lpdhKj9TxlYFVR1nbkvWZ2PxiYlB4HymOlYECtndO601yBe5v05rxHeSnacybTx3ZpFwKnM7eAuCRZf4uFcnAwv/T65ToexGMA2RoqolRshgkLwDd5+u09T13nc1uMbJtOoNXwGBdA7qPGslws9zqD1A== 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: b799c100-209b-49f2-1875-08d8892a027c X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2020 05:47:59.2276 (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: 2g6CnljjC33I5QlBIZjYYNVdJDirB5nHLjACSjDsrb5pwC78iUaSGfxPCA4hq0iGEzk3c63zUmU7plARDBpB0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2354 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605419290; bh=aZQbxLcFoLbhpQfXF2nktB2ec1c+asfT3kq1PHLgniU=; 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=e8+zsSeNx/Yc0oh3HjOWkTKzMAurLPdupyk4H4BDjJWF1UPn/GJSiE6AwMmxZ8nYF oKI9XjOch4wpYlZbVl9ATlj1Cnw7pBu+nf3SUgwJWfIGJfVwexbl4dZLn/AwlY79Bf XAtaEjX+fCxxj5gie9mwEhiQetHLoWeOqvYtluY6MAjoAxiba/E+NyLi9ALkZvf07f xxzn6yDV1DVslv+09oEnfmktQngrS+JX1f9vmddeSRhWrw58qgwdA9Fq7CG99FfSVP bKvB4XdVz3v+mWVgk7UCtsg3x9KaF9ikX4qxqlHbWPA4GZ/Ln7iNlr5FbzRxvkJK1I dQUiy9l9Sfk8g== 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 =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. > > > > > > 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. >=20 > Did you measure a performance difference? >=20 > 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 >=20 > I'm afraid it can be a problem. > In general we don't have such note on the whole DPDK code base. >=20 I'll handle this issue in DV compilation patch.