mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
net/mlx5: Don't store reserved part in FTEs and FGs
The current code stores fte_match_param in the software representation of FTEs and FGs. fte_match_param contains a large reserved area at the bottom of the struct. Since downstream patches are going to hash this part, we would like to avoid doing so on a reserved part. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
8ebabaa02f
commit
667cb65ae5
4 changed files with 16 additions and 12 deletions
|
@ -48,7 +48,7 @@
|
|||
/* helper macros */
|
||||
#define __mlx5_nullp(typ) ((struct mlx5_ifc_##typ##_bits *)0)
|
||||
#define __mlx5_bit_sz(typ, fld) sizeof(__mlx5_nullp(typ)->fld)
|
||||
#define __mlx5_bit_off(typ, fld) ((unsigned)(unsigned long)(&(__mlx5_nullp(typ)->fld)))
|
||||
#define __mlx5_bit_off(typ, fld) (offsetof(struct mlx5_ifc_##typ##_bits, fld))
|
||||
#define __mlx5_dw_off(typ, fld) (__mlx5_bit_off(typ, fld) / 32)
|
||||
#define __mlx5_64_off(typ, fld) (__mlx5_bit_off(typ, fld) / 64)
|
||||
#define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - (__mlx5_bit_off(typ, fld) & 0x1f))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue