From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60051.outbound.protection.outlook.com [40.107.6.51]) by dpdk.org (Postfix) with ESMTP id 63FD0239 for ; Mon, 15 Oct 2018 12:20:55 +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=eJ6dY5riuVL5yYxR3p5cCMNIEKl2FGQcthPbNXE6Nwk=; b=idJflB2UDheayvp7KUVScyKarYBk77AmxurIGlxWe8PItd6K0k/PW3l/SADnXRxYOo+uUJkYlrfvWng9jlo/QnWGq81orm3FLop2bKncvoeDEdukqkHtl8YTANYC3LByMPzdcn288av01hocAB7gV1a5zP1mfv/pEt8+KtyeHzY= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB3346.eurprd05.prod.outlook.com (10.171.187.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.31; Mon, 15 Oct 2018 10:20:53 +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; Mon, 15 Oct 2018 10:20:53 +0000 From: Ori Kam To: Shahaf Shuler , Yongseok Koh CC: "dev@dpdk.org" , "Xueming(Steven) Li" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix compilation issue on ARM SOC Thread-Index: AQHUZGB31BihLNRy6kG7a3ZVuGODZKUgFkFg Date: Mon, 15 Oct 2018 10:20:53 +0000 Message-ID: References: <20181015082352.81673-1-shahafs@mellanox.com> In-Reply-To: <20181015082352.81673-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: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3346; 6:7TZ4VPTIi9GUeOHo/D3X55dZ2ViV29/vEiIRWxBMKpS/O5b9rKablZ41m5l3X9uN23HyShkXijD2KtoGAd/Ii4O+YRPITsIIdiiysWvxUW51FKqY1J408r8vnKUKbIECvGfUpL8LRplkP+rCrBFwGDCcsq7+mABw8eQKDDMExmhl68DFS0I92mTyd5zkBmVd7Z1wlBIT+AYSACoimS8fZqiICJS7oMeR14PKSJLcB9ISeM7eoBKPc2lrvY/qvgD6/sSQ9OpRRvH0TYM6j844VH7oETIY+byGucYYX5BMKK523IFB3SQ46kevaVRhpc6gzJ6wzRUzw8zz6Qu0fCyiN3V9BVSygr2NG1i0u3CcUtwafTzA9UADg+3tg8IptcyE95yade6fVIpxTPZgHf/7/Yx8+gphUU34rCsyLcZlFnsI2FPk2jAEYcr4s8YT2IwsczwvAHYVXqyrXgYRADJ1Zw==; 5:xv9z+t/1tpaQD1Jd2TY8hLP7BAfEtXWniWzQbKhBDif4etTQsaZcUaPDg3PI8Ak8flx79650LX5EROwzeZk818cvZdL9zGd2OZxtLT9767NJ5AILx5YXaauocWoj3Cl99qpkSXN34QWyuLu633xRB+2P1EEkcGjAeM5lrJ0QneI=; 7:Y9o9qS+rX/tgGxFmQtQ2lLNGi86GmLRbLWqW+EYQQlbfS+9szhXXvSpPQBFcG+U5u9fOnIvrZDYr/0Mow8q8OL232ximhKN6niWxlN1A6GtcLCgoHlykn1ho1MW4mJqHbAla9JFFSmegUsnEGnI+MLqzHZmuz1kOKSJ8xubqvxi41yQRDqmAacgenOybf+psQ3I1cN+RDUdobUOgoOWgGWqYhOgksmjXEmoworA1t2Fqjiqjiq1P3Eugd2OpOXey x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 3c6c5692-47c2-4e1b-e016-08d63287e319 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM4PR05MB3346; x-ms-traffictypediagnostic: AM4PR05MB3346: 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)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991067); SRVR:AM4PR05MB3346; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3346; x-forefront-prvs: 0826B2F01B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(396003)(39860400002)(366004)(376002)(199004)(189003)(13464003)(55016002)(4326008)(86362001)(68736007)(7736002)(305945005)(9686003)(7696005)(26005)(25786009)(186003)(76176011)(102836004)(106356001)(229853002)(105586002)(486006)(6636002)(8936002)(81166006)(6436002)(476003)(97736004)(81156014)(11346002)(446003)(316002)(5660300001)(3846002)(6116002)(8676002)(6506007)(53546011)(478600001)(71200400001)(71190400001)(5250100002)(2906002)(256004)(14444005)(33656002)(14454004)(53936002)(2900100001)(99286004)(107886003)(66066001)(6246003)(110136005)(74316002)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3346; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: eQFCAetfGlfZRCMdGuwpWS5dhYeJ1wcI6E7Tm4TkLc/IGJgxnpxNX15C1V0O82j5Sj+v4jUnEWAV02WTlvmoMc8tBsPDh9ZqT/jafeSl+PG+/OFGj/ijZPSuIT1lvTQESdedzf8+xQvx6Yy8X2dpfO/8Lzug7vYfCGWNn5uNRiZGz5GWn7BidYDNw0099h7NmH079ScD9b84Jc9E3aHVNg4djQaW895hWn+m4ILE4ri4KVgmN7rHj9Rgq5G0pIB7X8oMdNawUGTvVQuDqYFrY2VS/M97poujIeM7G12OdDs3wowdmLgpdXdutTfQKe2XPL0ezH1smzADf4gr3phLAWGEfntHo6/6w02+Hxow5PI= 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: 3c6c5692-47c2-4e1b-e016-08d63287e319 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2018 10:20:53.0730 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3346 Subject: Re: [dpdk-dev] [PATCH] 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: Mon, 15 Oct 2018 10:20:55 -0000 Hi Small nit otherwise acked. > -----Original Message----- > From: dev On Behalf Of Shahaf Shuler > Sent: Monday, October 15, 2018 11:24 AM > To: Yongseok Koh > Cc: dev@dpdk.org; Ori Kam ; Xueming(Steven) Li > > Subject: [dpdk-dev] [PATCH] 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 > --- > drivers/net/mlx5/mlx5_flow_dv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index a013201eab..05df8d51a4 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -780,6 +780,7 @@ 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_v =3D (const char *)&nvgre_v->tni; What about creating also tni_m? Also to avoid confusion maybe change to nvgre_id? > char *gre_key_m; > char *gre_key_v; > int size; > @@ -794,7 +795,7 @@ flow_dv_translate_item_nvgre(void *matcher, void > *key, > gre_key_v =3D MLX5_ADDR_OF(fte_match_set_misc, misc_v, > gre_key_h); > memcpy(gre_key_m, nvgre_m->tni, 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_v[i]; > flow_dv_translate_item_gre(matcher, key, item, inner); > } >=20 > -- > 2.12.0 Thanks, Ori