Skip to content

Commit

Permalink
net/mlx5: Set completion EQs as shared resources
Browse files Browse the repository at this point in the history
Mark completion EQs as shared resources so that they can be used by CQs
with uid != 0.

Fixes: 7efce36 ("IB/mlx5: Add obj create and destroy functionality")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Yishai Hadas authored and Jason Gunthorpe committed May 14, 2019
1 parent cd5d20f commit c191f93
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/eq.c
Original file line number Diff line number Diff line change
@@ -291,6 +291,9 @@ create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, const char *name,
mlx5_fill_page_array(&eq->buf, pas);

MLX5_SET(create_eq_in, in, opcode, MLX5_CMD_OP_CREATE_EQ);
if (!param->mask && MLX5_CAP_GEN(dev, log_max_uctx))
MLX5_SET(create_eq_in, in, uid, MLX5_SHARED_RESOURCE_UID);

MLX5_SET64(create_eq_in, in, event_bitmask, param->mask);

eqc = MLX5_ADDR_OF(create_eq_in, in, eq_context_entry);
2 changes: 1 addition & 1 deletion include/linux/mlx5/mlx5_ifc.h
Original file line number Diff line number Diff line change
@@ -7302,7 +7302,7 @@ struct mlx5_ifc_create_eq_out_bits {

struct mlx5_ifc_create_eq_in_bits {
u8 opcode[0x10];
u8 reserved_at_10[0x10];
u8 uid[0x10];

u8 reserved_at_20[0x10];
u8 op_mod[0x10];

0 comments on commit c191f93

Please sign in to comment.