From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60050.outbound.protection.outlook.com [40.107.6.50]) by dpdk.org (Postfix) with ESMTP id C0EA8568A for ; Mon, 8 Oct 2018 23:21:58 +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=/ogKlS7nrTh4KEeDCe70kH/Bi2erSjX8TX2W+nhMsUs=; b=LClicPFVzhnMsQ+xSAd/nQ/yTr6aB/kD8yQ5cYRl2t9j8nmjX+Zds+ZYpQFF2a58rpKk2gCVA9aCxHydR4G8OW9lSDTupyj1hzfQaZPwG3rFLDlj84SYxdl3Rq9RKzgdneHGpscP5bXdOQdpE+fcQARMEI9pBa5Oar0udjiU8+k= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4059.eurprd05.prod.outlook.com (52.134.66.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.21; Mon, 8 Oct 2018 21:21:57 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045%2]) with mapi id 15.20.1207.024; Mon, 8 Oct 2018 21:21:57 +0000 From: Yongseok Koh To: Ori Kam CC: Dekel Peled , Shahaf Shuler , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes Thread-Index: AQHUXwvtLO6uFNhWQE+ve2mOyiIZSqUVX7OAgAB8DAA= Date: Mon, 8 Oct 2018 21:21:57 +0000 Message-ID: <20181008212147.GB9031@mtidpdk.mti.labs.mlnx> References: <1539005674-57499-1-git-send-email-dekelp@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR1201CA0019.namprd12.prod.outlook.com (2603:10b6:301:4a::29) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4059; 6:Qoa6W1qMYgnNaWyF9G/mqjTFxui2yoFCtbuYg40o231Ozb5ro1+DyaFfO3Udg7iFvLarAAoQZLII4pAth42iXlT9o5cglgqQZnpS9+CHFzW1LNECECnJMz9c4VkbKNKgA15nYqLdJFSP3zd8TzYxnCiLhbSheBqIo9RtucfExHRYjb6xpaJUXtgKdGIxXMLzHB4A5s6KcYQsgC9D5yll46W5B9JpaVfodVCv4Q2raOoyC1kY5N56xITnFx6QhNeuBxMJB+wF4rOOqLE0Ywsga5HMlRAuU8ujncVUHKzp2VDeLXr4eAeNTlpk22OvX/x/BBsx+ALSYu3shF00gryWRh3zGe1cHhUEOptFoQD/tTFA7VlV5WuJXooYcNJKxcs77HUiVLiq0fXUUZGRzbnqgkyhjWlRujOLvisj3MLS4+4B4jyYy/A4L5pZAcpoKBEw/wo28ODyOUzIr2t5J4De0A==; 5:tERm4Iocv1PH65D7mOiYtQwWpaQPbdAJcESMj3/NkLegDd0qqeWsJdBL3uJJrjuz5ykP0kIiI7FRcpxWA6A+SgZI9O34fXamEYCDCpIUnZd+0FWkTIDQhoMvURNMsPz/2vY8nQ6IuxuMtoO78nzbILyR3VivYJQLPpEwawihVNY=; 7:ExI0OiQBFLrjgW/bbCem02bJjZifKtcLjL0ilzzTeJZF9AtmZ8POk/GPETMXlORj1k3tOSZVeJzzihD9flcjkeVbL5MVhEvZiuPvt6lzRQYCip0u3sedR8CfIn/Hg/xZofKZzEUzKWIOM+iwgS9rUT2Nf5b5yY5x/b5r6mV+1S/mDgr7C1zbYb7xtoQnGfcgRLTpVDpb3bKQmT/xgnIW8rex0//o3P0TPtzN7LaB207znZO3/vfVvtShDr63vowP x-ms-office365-filtering-correlation-id: 774e01aa-34ff-4c1c-8a05-08d62d6413af 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:DB3PR0502MB4059; x-ms-traffictypediagnostic: DB3PR0502MB4059: 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)(5005006)(8121501046)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051); SRVR:DB3PR0502MB4059; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4059; x-forefront-prvs: 081904387B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(346002)(366004)(376002)(39860400002)(13464003)(199004)(189003)(106356001)(105586002)(14454004)(86362001)(6246003)(6862004)(478600001)(71200400001)(486006)(97736004)(476003)(5250100002)(316002)(4326008)(25786009)(2900100001)(71190400001)(446003)(102836004)(2906002)(26005)(11346002)(186003)(256004)(3846002)(6116002)(7736002)(1076002)(99286004)(229853002)(305945005)(6636002)(66066001)(8936002)(6486002)(54906003)(6436002)(8676002)(33896004)(33656002)(53936002)(76176011)(68736007)(14444005)(9686003)(6512007)(52116002)(81166006)(81156014)(5660300001)(6506007)(53546011)(386003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4059; H:DB3PR0502MB3980.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: XvechdIqNudKLzek59C8OnGdT/SReDeIX1fjV/K4rF2gVRJzVYpoyuw1wvzT94NsBTY7a8MhuNUYuM9+I5byUDfbl5dTGa/7JcoB57siFmUkIAPkieMXx6exw+8v0uOyAEhCYZjFjuQp9LRTmKhBtP4qfP9m1PYBDR6oploGu79h5e+LDk5njlFxXmUFUbXIYgjsW4yZqM+Po6DA4NdogDMYgt0E+apose7Y/3Y1C9qg1GuCES/NmSZAnTOdUn7z7+VX/M0qx38E6lceDDTw0woivl6RDdXpWXzP7YwPakPE90/rHXAaXdHz6qbYE9mSq9rpO+jflGwTtOtjhfmVBQJWauUpaRV7kYSelnbv7Rw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 774e01aa-34ff-4c1c-8a05-08d62d6413af X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2018 21:21:57.2066 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4059 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes 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, 08 Oct 2018 21:21:58 -0000 On Mon, Oct 08, 2018 at 06:57:49AM -0700, Ori Kam wrote: >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Dekel Peled > > Sent: Monday, October 8, 2018 4:35 PM > > To: Yongseok Koh ; Shahaf Shuler > > > > Cc: dev@dpdk.org; Ori Kam > > Subject: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in= bytes > >=20 > > Update definition of MLX5_ST_SZ_DB to calculate struct size correctly. > >=20 > > Fixes: 86a8d2b59f54 ("net/mlx5: add Direct Verbs prepare function") > > Cc: orika@mellanox.com > >=20 > > Signed-off-by: Dekel Peled > > --- > > drivers/net/mlx5/mlx5_prm.h | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > >=20 > > diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h > > index a905397..29742b1 100644 > > --- a/drivers/net/mlx5/mlx5_prm.h > > +++ b/drivers/net/mlx5/mlx5_prm.h > > @@ -376,7 +376,7 @@ struct mlx5_modification_cmd { > > (__mlx5_bit_off(typ, fld) & 0xf)) > > #define __mlx5_mask16(typ, fld) ((u16)((1ull << __mlx5_bit_sz(typ, fld= )) - 1)) > > #define MLX5_ST_SZ_DW(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 32) > > -#define MLX5_ST_SZ_DB(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 32) > > +#define MLX5_ST_SZ_DB(typ) (sizeof(struct mlx5_ifc_##typ##_bits) / 8) > > #define MLX5_BYTE_OFF(typ, fld) (__mlx5_bit_off(typ, fld) / 8) > > #define MLX5_ADDR_OF(typ, p, fld) ((char *)(p) + MLX5_BYTE_OFF(typ, fl= d)) > >=20 > > -- > > 1.7.1 >=20 > Acked-by: Ori Kam Acked-by: Yongseok Koh Thanks