DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes
@ 2018-10-08 13:34 Dekel Peled
  2018-10-08 13:57 ` Ori Kam
  0 siblings, 1 reply; 5+ messages in thread
From: Dekel Peled @ 2018-10-08 13:34 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, orika

Update definition of MLX5_ST_SZ_DB to calculate struct size correctly.

Fixes: 86a8d2b59f54 ("net/mlx5: add Direct Verbs prepare function")
Cc: orika@mellanox.com

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_prm.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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, fld))
 
-- 
1.7.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes
  2018-10-08 13:34 [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes Dekel Peled
@ 2018-10-08 13:57 ` Ori Kam
  2018-10-08 21:21   ` Yongseok Koh
  0 siblings, 1 reply; 5+ messages in thread
From: Ori Kam @ 2018-10-08 13:57 UTC (permalink / raw)
  To: Dekel Peled, Yongseok Koh, Shahaf Shuler; +Cc: dev



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Monday, October 8, 2018 4:35 PM
> To: Yongseok Koh <yskoh@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>
> Cc: dev@dpdk.org; Ori Kam <orika@mellanox.com>
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes
> 
> Update definition of MLX5_ST_SZ_DB to calculate struct size correctly.
> 
> Fixes: 86a8d2b59f54 ("net/mlx5: add Direct Verbs prepare function")
> Cc: orika@mellanox.com
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_prm.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 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, fld))
> 
> --
> 1.7.1

Acked-by: Ori Kam <orika@mellanox.com>

Thanks,
Ori Kam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes
  2018-10-08 13:57 ` Ori Kam
@ 2018-10-08 21:21   ` Yongseok Koh
  2018-10-09 10:26     ` Shahaf Shuler
  0 siblings, 1 reply; 5+ messages in thread
From: Yongseok Koh @ 2018-10-08 21:21 UTC (permalink / raw)
  To: Ori Kam; +Cc: Dekel Peled, Shahaf Shuler, dev

On Mon, Oct 08, 2018 at 06:57:49AM -0700, Ori Kam wrote:
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> > Sent: Monday, October 8, 2018 4:35 PM
> > To: Yongseok Koh <yskoh@mellanox.com>; Shahaf Shuler
> > <shahafs@mellanox.com>
> > Cc: dev@dpdk.org; Ori Kam <orika@mellanox.com>
> > Subject: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes
> > 
> > Update definition of MLX5_ST_SZ_DB to calculate struct size correctly.
> > 
> > Fixes: 86a8d2b59f54 ("net/mlx5: add Direct Verbs prepare function")
> > Cc: orika@mellanox.com
> > 
> > Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> > ---
> >  drivers/net/mlx5/mlx5_prm.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > 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, fld))
> > 
> > --
> > 1.7.1
> 
> Acked-by: Ori Kam <orika@mellanox.com>

Acked-by: Yongseok Koh <yskoh@mellanox.com>

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes
  2018-10-08 21:21   ` Yongseok Koh
@ 2018-10-09 10:26     ` Shahaf Shuler
  2018-10-09 15:28       ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Shahaf Shuler @ 2018-10-09 10:26 UTC (permalink / raw)
  To: Yongseok Koh, Ori Kam; +Cc: Dekel Peled, dev

Tuesday, October 9, 2018 12:22 AM, Yongseok Koh:
> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in
> bytes
> 
> On Mon, Oct 08, 2018 at 06:57:49AM -0700, Ori Kam wrote:
> > > Subject: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size
> > > in bytes
> > >
> > > Update definition of MLX5_ST_SZ_DB to calculate struct size correctly.
> > >
> > > Fixes: 86a8d2b59f54 ("net/mlx5: add Direct Verbs prepare function")
> > > Cc: orika@mellanox.com
> > >
> > > Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> > > ---

[...]
> >
> > Acked-by: Ori Kam <orika@mellanox.com>
> 
> Acked-by: Yongseok Koh <yskoh@mellanox.com>

Applied to next-net-mlx, thanks. 

> 
> Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes
  2018-10-09 10:26     ` Shahaf Shuler
@ 2018-10-09 15:28       ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-10-09 15:28 UTC (permalink / raw)
  To: Shahaf Shuler, Yongseok Koh, Ori Kam; +Cc: Dekel Peled, dev

On 10/9/2018 11:26 AM, Shahaf Shuler wrote:
> Tuesday, October 9, 2018 12:22 AM, Yongseok Koh:
>> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in
>> bytes
>>
>> On Mon, Oct 08, 2018 at 06:57:49AM -0700, Ori Kam wrote:
>>>> Subject: [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size
>>>> in bytes
>>>>
>>>> Update definition of MLX5_ST_SZ_DB to calculate struct size correctly.
>>>>
>>>> Fixes: 86a8d2b59f54 ("net/mlx5: add Direct Verbs prepare function")
>>>> Cc: orika@mellanox.com
>>>>
>>>> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
>>>> ---
> 
> [...]
>>>
>>> Acked-by: Ori Kam <orika@mellanox.com>
>>
>> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> 
> Applied to next-net-mlx, thanks. 

Squashed into relevant commit in next-net, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-09 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 13:34 [dpdk-dev] [PATCH] net/mlx5: fix calculation of struct size in bytes Dekel Peled
2018-10-08 13:57 ` Ori Kam
2018-10-08 21:21   ` Yongseok Koh
2018-10-09 10:26     ` Shahaf Shuler
2018-10-09 15:28       ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).