Skip to content

Commit

Permalink
net/mlx5: Set ODP capabilities for DC transport to max
Browse files Browse the repository at this point in the history
In mlx5_core initialization, query max ODP capabilities for DC transport
from FW and set as current capabilities.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
  • Loading branch information
Michael Guralnik authored and Leon Romanovsky committed Aug 28, 2019
1 parent bb487d2 commit 00679b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ static int handle_hca_cap_odp(struct mlx5_core_dev *dev)
ODP_CAP_SET_MAX(dev, xrc_odp_caps.write);
ODP_CAP_SET_MAX(dev, xrc_odp_caps.read);
ODP_CAP_SET_MAX(dev, xrc_odp_caps.atomic);
ODP_CAP_SET_MAX(dev, dc_odp_caps.srq_receive);
ODP_CAP_SET_MAX(dev, dc_odp_caps.send);
ODP_CAP_SET_MAX(dev, dc_odp_caps.receive);
ODP_CAP_SET_MAX(dev, dc_odp_caps.write);
ODP_CAP_SET_MAX(dev, dc_odp_caps.read);
ODP_CAP_SET_MAX(dev, dc_odp_caps.atomic);

if (do_set)
err = set_caps(dev, set_ctx, set_sz,
Expand Down
4 changes: 3 additions & 1 deletion include/linux/mlx5/mlx5_ifc.h
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,9 @@ struct mlx5_ifc_odp_cap_bits {

struct mlx5_ifc_odp_per_transport_service_cap_bits xrc_odp_caps;

u8 reserved_at_100[0x700];
struct mlx5_ifc_odp_per_transport_service_cap_bits dc_odp_caps;

u8 reserved_at_120[0x6E0];
};

struct mlx5_ifc_calc_op {
Expand Down

0 comments on commit 00679b6

Please sign in to comment.