From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0066.outbound.protection.outlook.com [104.47.2.66]) by dpdk.org (Postfix) with ESMTP id 806F04C96 for ; Tue, 16 Oct 2018 08:51:16 +0200 (CEST) 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=fN1CZ19/S4AXiMbb4Olx9EnUNl5nmjJxGRZPr1CkpZE=; b=TbcHe7UZ7ZbrrgcSEmzQyrl6neWF7mhE3c5zttVj3i+gAzPaF5v/Cam7x1nssaa/8UFbXIxcoky+u+ISePRnfSORiq7mhO4sfkRTGB+ToE5xbPN3HF/DRBBFYfuPbOL/sc2BPpYNVCbamLZR92qEKjB+/nuqohj6KmRAx2sgzeM= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB3251.eurprd05.prod.outlook.com (10.171.186.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.31; Tue, 16 Oct 2018 06:51:15 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::fdeb:3890:f0f0:2202]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::fdeb:3890:f0f0:2202%4]) with mapi id 15.20.1228.027; Tue, 16 Oct 2018 06:51:15 +0000 From: Ori Kam To: Shahaf Shuler , Yongseok Koh CC: "dev@dpdk.org" , "Xueming(Steven) Li" Thread-Topic: [dpdk-dev] [PATCH v2] net/mlx5: fix compilation issue on ARM SOC Thread-Index: AQHUZRZEepL2O5ZVXUeUK2K1MdGA56UhbwEw Date: Tue, 16 Oct 2018 06:51:14 +0000 Message-ID: References: <20181015082352.81673-1-shahafs@mellanox.com> <20181016060517.122247-1-shahafs@mellanox.com> In-Reply-To: <20181016060517.122247-1-shahafs@mellanox.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=orika@mellanox.com; x-originating-ip: [37.122.157.213] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3251; 6:0B97jTh8hXK8dQ+UOkFcnOJancJcQ0FUe7Khws2x/ooRYbBHjzWE5Jd/flCRXmX06YfORMaYSTHp1fys7AAEzIE+w8XZ888jtgSWj1iEcg3fvzBNT0L8APmBWUV9mgrAp4Pe9dQQ2fwlGKTFur97wrnbiPsfopbzCCEN06ReQ9g7gP1l61xOj+zkTHLAJkZDwDSjcrZjH65rznDANU9/L+Bxq3ZxfRCti7xoeXXJnwgvv+512kzlP1qIx6yTXv6l3LWiFxOrZn9LA+xGLoMTKwhXrKCwd9bkET38JJmpL3wrOiZjSXxZ+x9oYQmmzrtb9Aia5T8KLzaQP7+VHQK1LrtvV0ufAmMGRfq9ZgJp4fY8AQ7HlCtWZHFo0INL5n1n1ML1w4s/S87FaIR5rXDEa0T1rPB+NsFSQQKRYAaRnOvVRIZk/NnbwVO1avg3eopyzRlOssv2ooUINuNOAnu2fA==; 5:fDZikjAbd5qaFm6weU4SlxV2vC2Jw0vK3ITK7wHmAvmwfPvmNJ8Y5q1PHNLPvel7XkJJOB6E1JEAMeZbKvcnqu7ZdBkROoXy2kD0Wy7GSuxoaafHQLCETVWJauqRDkfLVy8xLrIo4nRejV9CXKgl7JJsUfUQjb59qcm+m8UoB+o=; 7:IgEzeXO3r+PyJFXgY/ZWk63osu6kgEM1KRQ6SOmn6xKrKrIrT575B7Pw3rUIsQ+STHEQVzOXMqJh3+LaHtFKn6MntfwwnBZHWCwrVXiljZCCuZWUQwBIVlzvEV/p1I5e95apGpjTKharB2NJRSWas1C3PuFRycpusufVSRkEhkA9X2IyEhjDh0poEoYY5kDoIUmNohkgC7y7dkFvb1OuE7EbU0T7djhtDW1o8Gh2CzXHl84xowIT0hngRgwoKsdh x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: d17d42d0-0fb5-433e-38a8-08d63333c472 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM4PR05MB3251; x-ms-traffictypediagnostic: AM4PR05MB3251: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699051); SRVR:AM4PR05MB3251; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3251; x-forefront-prvs: 0827D7ACB9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(366004)(396003)(346002)(376002)(189003)(199004)(13464003)(14454004)(6506007)(76176011)(53546011)(74316002)(97736004)(7696005)(102836004)(9686003)(26005)(316002)(478600001)(86362001)(486006)(256004)(6636002)(81166006)(81156014)(2900100001)(14444005)(25786009)(99286004)(68736007)(8676002)(4326008)(8936002)(446003)(107886003)(7736002)(3846002)(305945005)(6116002)(2906002)(106356001)(5660300001)(33656002)(11346002)(71200400001)(6246003)(71190400001)(186003)(66066001)(229853002)(55016002)(53936002)(6436002)(54906003)(110136005)(476003)(105586002)(5250100002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3251; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: g27mGTj3z1j8pUJzZouPiR24Jo5FqDLWO7q+JypNn0+gx70WTA5pd7kofA7QlreioEQ2vWC3LGjPHbECSNJIDenfUgH/d4dZ83Sr2gqLDBSxxs2f2EXasu5k3Pne7W5YiEIBdf/pp1lQFLQwAJflGsMpBRfzz36LNl+SrW0+cNBlABPtPdMpv73Ov/UuDLTOUhdz3wmfZvBiTvaopRArxJOBZ5Dk6uby+BdA0kc/8+IDW9k18/sIEzCN5pDGIHJ7mW12q5+8LjiT4Fv0PHstMDHphRcgCoe73fj+6uiLOuMMmoGsa1CLh/ub77gPIpd/uRvuYCmofzAzn9os5eUyPXXSNYHIQTcvUo5unfcf514= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: d17d42d0-0fb5-433e-38a8-08d63333c472 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2018 06:51:15.0091 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3251 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix compilation issue on ARM SOC 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: , X-List-Received-Date: Tue, 16 Oct 2018 06:51:16 -0000 > -----Original Message----- > From: dev On Behalf Of Shahaf Shuler > Sent: Tuesday, October 16, 2018 9:05 AM > To: Yongseok Koh > Cc: dev@dpdk.org; Ori Kam ; Xueming(Steven) Li > > Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix compilation issue on ARM SOC >=20 > On some ARM environment, the below compilation error will be seen >=20 > dpdk/drivers/net/mlx5/mlx5_flow_dv.c: In function > 'flow_dv_translate_item_nvgre': > /tmp/dpdk/drivers/net/mlx5/mlx5_flow_dv.c:785:22: error: pointer targets > in initialization differ in signedness [-Werror=3Dpointer-sign] > const char *tni_v =3D nvgre_v->tni; >=20 > The reason for this error is that nvgre_v->tni is defined as byte array > in size of 3B. However the code in the function iterate till the 4B in > order to copy/set also the subsequent field after it (flow_id) >=20 > Fixing by pointing to this struct from a different pointer. >=20 > Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items") > Cc: orika@mellanox.com > Cc: xuemingl@mellanox.com >=20 > Signed-off-by: Shahaf Shuler > --- >=20 > On v2: > - changed pointer names. > - added pointer for the tni and flow id mask >=20 > --- > drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index a013201eab..becbc57b55 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -780,6 +780,8 @@ flow_dv_translate_item_nvgre(void *matcher, void > *key, > const struct rte_flow_item_nvgre *nvgre_v =3D item->spec; > void *misc_m =3D MLX5_ADDR_OF(fte_match_param, matcher, > misc_parameters); > void *misc_v =3D MLX5_ADDR_OF(fte_match_param, key, > misc_parameters); > + const char *tni_flow_id_m =3D (const char *)nvgre_m->tni; > + const char *tni_flow_id_v =3D (const char *)nvgre_v->tni; > char *gre_key_m; > char *gre_key_v; > int size; > @@ -792,9 +794,9 @@ flow_dv_translate_item_nvgre(void *matcher, void > *key, > size =3D sizeof(nvgre_m->tni) + sizeof(nvgre_m->flow_id); > gre_key_m =3D MLX5_ADDR_OF(fte_match_set_misc, misc_m, > gre_key_h); > gre_key_v =3D MLX5_ADDR_OF(fte_match_set_misc, misc_v, > gre_key_h); > - memcpy(gre_key_m, nvgre_m->tni, size); > + memcpy(gre_key_m, tni_flow_id_m, size); > for (i =3D 0; i < size; ++i) > - gre_key_v[i] =3D gre_key_m[i] & ((const char *)(nvgre_v->tni))[i]; > + gre_key_v[i] =3D gre_key_m[i] & tni_flow_id_v[i]; > flow_dv_translate_item_gre(matcher, key, item, inner); > } >=20 > -- > 2.12.0 Acked-by: Ori Kam Thanks, Ori