From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH] net/mlx5: fix calculation of struct size in bytes 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Dekel Peled , Shahaf Shuler , "dev@dpdk.org" To: Ori Kam 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) In-Reply-To: Content-Language: en-US Content-ID: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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