Skip to content

Commit 2ece6c7

Browse files
danielj-mellanoxkuba-moo
authored andcommitted
net/mlx5: Set sf_eq_usage for SF max EQs
When setting max_io_eqs for an SF function also set the sf_eq_usage_cap. This is to indicate to the SF driver from the PF that the user has set the max io eqs via devlink. So the SF driver can later query the proper max eq value from the new cap. Signed-off-by: Daniel Jurgens <[email protected]> Reviewed-by: William Tu <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 63c6e08 commit 2ece6c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4676,6 +4676,9 @@ mlx5_devlink_port_fn_max_io_eqs_set(struct devlink_port *port, u32 max_io_eqs,
46764676
hca_caps = MLX5_ADDR_OF(query_hca_cap_out, query_ctx, capability);
46774677
MLX5_SET(cmd_hca_cap_2, hca_caps, max_num_eqs_24b, max_eqs);
46784678

4679+
if (mlx5_esw_is_sf_vport(esw, vport_num))
4680+
MLX5_SET(cmd_hca_cap_2, hca_caps, sf_eq_usage, 1);
4681+
46794682
err = mlx5_vport_set_other_func_cap(esw->dev, hca_caps, vport_num,
46804683
MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE2);
46814684
if (err)

0 commit comments

Comments
 (0)