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 5622AA057D; Wed, 18 Mar 2020 15:46:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BD2925D9; Wed, 18 Mar 2020 15:46:26 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130050.outbound.protection.outlook.com [40.107.13.50]) by dpdk.org (Postfix) with ESMTP id A3B7E1AFF for ; Wed, 18 Mar 2020 15:46:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mKNXJfiy3fE7FGjK0oJGwCnszDL7xfqi0/ihBv9L7IXhz/rioR64l+3ff6CjfKWwdCGGepGBchPFFrh++VhZ/mcNjp+ZlCbUyr7n2sAuNOYKBisA58MUhvGHvztusUCXDoZfSopMbFFu4ccgOX8+BHzlGxw2NUk7VO6a+l47ixLiUjemNlM/r52pUxdLRftRBYxTkO2hQiyC+lXn7Jd2Cy2EhLt9N6URswVNz7kQ+RrwIagej/0X5WMj8W7bkceXuxox7531ekDZSZu1oBQZcMTjzAgjTnBdPkmFD5cBMVvn1I4mBa6OHrz4sEBmo7prSDjijXNW2VY7jUfSUmbBXw== 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=m3J57yeQkb6/loaCdolkgPd5kg4T5tpyrs6ioV0/x/o=; b=fZsFaUj1xIHeujmyveAKgbF61X6Whds49SpboEQVZne+erbe4WoyZjYyQwOy/1i0fFIwNb2dglov+kEN7TBF+qWRi5ZJhQEmXchHzgCFYPb7TFfUnqLLfdQ/9j9U1vBCsKiKDJxxKCw7Cc5vM+TjwYfyV/1ihyUbHCMwV+JWmIIzmmLiVY3qQ/jmGfws6ZQjuViyjpxwefTEmy7Y/BLIqXCixEMfgFyDXeuakkwe1UDZWh0NKctEVV6S2FDDV7D2NDu1CI5YxVL2bKFsFxcKnV9Bylglc8tB+HGadL0m1e86J7L/orW8nzf0uNUBeJ7/+J+KyZbsYlZE2nsG+zAkbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m3J57yeQkb6/loaCdolkgPd5kg4T5tpyrs6ioV0/x/o=; b=ZGz/uHT1cTIcdg76FDcEUnhXUv8zzmPNwgEqa03vDxhTjBhx1BLWlHL9TZGURfziRJYsBafwz2iExwuMVuPLkCcjFCMHloLe5S9EXKRa99xedqjaJGr/DDOOtXxygmS51Bd7ed1u8d2Itf7rtlyeKrLoJqDOwIF1cEmudSWEb/Q= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (10.186.174.145) by AM0PR05MB4514.eurprd05.prod.outlook.com (52.133.55.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.15; Wed, 18 Mar 2020 14:46:22 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9%7]) with mapi id 15.20.2814.021; Wed, 18 Mar 2020 14:46:22 +0000 From: Raslan Darawsheh To: Rahul Lakkireddy , Ferruh Yigit CC: Karra Satwik , "dev@dpdk.org" , Xueming Zhang Thread-Topic: [PATCH] net/cxgbe: fix build with clang 3.4.2 Thread-Index: AQHV/SQd+zqYZLP8nUu5Hwhxnzmfd6hOXWsAgAAPhUA= Date: Wed, 18 Mar 2020 14:46:21 +0000 Message-ID: References: <20200318125236.652514-1-ferruh.yigit@intel.com> <20200318134805.GA25012@chelsio.com> In-Reply-To: <20200318134805.GA25012@chelsio.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-originating-ip: [84.242.49.134] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 84c56e12-374f-484d-8600-08d7cb4b2050 x-ms-traffictypediagnostic: AM0PR05MB4514: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 03468CBA43 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(396003)(376002)(346002)(39860400002)(199004)(66476007)(66446008)(66556008)(64756008)(71200400001)(4326008)(186003)(55016002)(26005)(66946007)(76116006)(8936002)(81156014)(7696005)(81166006)(86362001)(8676002)(54906003)(110136005)(33656002)(5660300002)(52536014)(6506007)(316002)(478600001)(2906002)(9686003)(53546011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4514; H:AM0PR05MB6707.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yfeI7kBADZCbRzKc7530VSBxBpgYFLSVqxG/2yyqrRkoEgiMLFTB/ohGE0yIfSx7vQD9wyi+PunkQaPPbs+VUN+Wn8cvDSLgNm5mCW7HWiW289kz5Gu0Z1nH+8HURurEGQItqiMBkxTYFElTJsxdvrSHwA3/7R4QOuRWkdVuB2h+//vz7F7mMb4/AsP50qkotlLs4GyRXXolEUcZv0AupfcqBbUAsvh6YfYvanWamPNlUkFdIZpan+iQAhIWQL+iE3CiwWem62S1h7ib93HjSB21NzUD3RJLz8N1KHHuAiHYeNEWP4I6PIGtZqDMcIAd5fTkX6g+gamGx9auuAJZ6YlIgK8YoJd/2S6rWdRj/LVLivCqn7H5UfbZYP/Hp5MplrPJos84D/ej+zfve35VPIjRUjlG8GJrrIvFWq1Spdh567fz7tSkbuIi6WYzj/Ns x-ms-exchange-antispam-messagedata: gSw2FPbo88D4ehOs6Qi8CktZRQmuCkec4gRjMyYra7d0dJC3UQD7rom2YVw9vnCLP1+0NAJP/HZfNNMZHKqKWNcodZfnTM8PT5NxSoZ4cumM/CJfJyjG0vZ2UK2gWvKpWbBUFdbh000UjEgTXQWGEQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84c56e12-374f-484d-8600-08d7cb4b2050 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2020 14:46:22.0273 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vHclFFv92PftMLCqzPCeKUze79PxnEpztHhcu7bre0KCffP2Y8wTtjyC/NiFgi1UiGDWlCCvmWCZjLmIEohRPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4514 Subject: Re: [dpdk-dev] [PATCH] net/cxgbe: fix build with clang 3.4.2 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" Hi, > -----Original Message----- > From: Rahul Lakkireddy > Sent: Wednesday, March 18, 2020 3:48 PM > To: Ferruh Yigit > Cc: Karra Satwik ; dev@dpdk.org; Raslan > Darawsheh ; Xueming Zhang > > Subject: Re: [PATCH] net/cxgbe: fix build with clang 3.4.2 >=20 > On Wednesday, March 03/18/20, 2020 at 12:52:36 +0000, Ferruh Yigit wrote: > > Build error: > > .../drivers/net/cxgbe/cxgbe_flow.c:315:2: > > error: implicit truncation from 'int' to bitfield changes value > > from -1 to 7 [-Werror,-Wbitfield-constant-conversion] > > CXGBE_FILL_FS(adap->pf, ~0, pf); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > .../drivers/net/cxgbe/cxgbe_flow.c:25:2: > > note: expanded from macro 'CXGBE_FILL_FS' > > __CXGBE_FILL_FS(v, m, fs, elem, e) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > .../drivers/net/cxgbe/cxgbe_flow.c:15:18: note: > > expanded from macro '__CXGBE_FILL_FS' > > (fs)->mask.elem =3D (__m); \ > > ^ ~~~~~ > > Commit in fixes line changes 'PF_BITWIDTH' to '3', which makes 'fs->pf' > > bitfield size '3', changing '~0' to '0x7' to prevent truncation in > > assignment. > > > > Fixes: dcd456abe46f ("net/cxgbe: support flow API for matching all pack= ets > on PF") > > > > Reported-by: Raslan Darawsheh > > Reported-by: Xueming Zhang > > Signed-off-by: Ferruh Yigit >=20 > I've tested CLANG compilation with 9.0.1 without this patch, > but couldn't hit the above mentioned error. >=20 > # clang --version > clang version 9.0.1 (Fedora 9.0.1-2.fc31) >=20 > However, after grabbing CLANG 3.4.2, I could see the error. >=20 > # clang --version > clang version 3.4.2 (tags/RELEASE_34/dot2-final) >=20 > This patch fixes it and the fix is correct too. >=20 > Thanks for fixing it. >=20 Working just fine for me as well, thanks for the update Tested-by: Raslan Darawsheh > Acked-by: Rahul Lakkireddy >=20 > > --- > > Cc: kaara.satwik@chelsio.com > > --- > > drivers/net/cxgbe/cxgbe_flow.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/cxgbe/cxgbe_flow.c > b/drivers/net/cxgbe/cxgbe_flow.c > > index 13fd78aaf..a46515d3b 100644 > > --- a/drivers/net/cxgbe/cxgbe_flow.c > > +++ b/drivers/net/cxgbe/cxgbe_flow.c > > @@ -312,7 +312,7 @@ ch_rte_parsetype_pf(const void *dmask > __rte_unused, > > > > CXGBE_FILL_FS(1, 1, pfvf_vld); > > > > - CXGBE_FILL_FS(adap->pf, ~0, pf); > > + CXGBE_FILL_FS(adap->pf, 0x7, pf); > > return 0; > > } > > > > -- > > 2.25.1 > >