Skip to content

Commit

Permalink
net/mlx5: Enable SD feature
Browse files Browse the repository at this point in the history
Have an actual mlx5_sd instance in the core device, and fix the getter
accordingly. This allows SD stuff to flow, the feature becomes supported
only here.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Tariq Toukan authored and Saeed Mahameed committed Dec 21, 2023
1 parent 83a59ce commit c88c49a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ struct mlx5_sd;

static inline struct mlx5_sd *mlx5_get_sd(struct mlx5_core_dev *dev)
{
return NULL;
return dev->sd;
}

static inline void mlx5_set_sd(struct mlx5_core_dev *dev, struct mlx5_sd *sd)
{
dev->sd = sd;
}
#endif
1 change: 1 addition & 0 deletions include/linux/mlx5/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ struct mlx5_core_dev {
struct blocking_notifier_head macsec_nh;
#endif
u64 num_ipsec_offloads;
struct mlx5_sd *sd;
};

struct mlx5_db {
Expand Down

0 comments on commit c88c49a

Please sign in to comment.