Skip to content

Commit ed29705

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5: Enable SD feature
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 <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent d1a8b2c commit ed29705

File tree

2 files changed

+3
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/lib
  • include/linux/mlx5

2 files changed

+3
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ struct mlx5_sd;
5959

6060
static inline struct mlx5_sd *mlx5_get_sd(struct mlx5_core_dev *dev)
6161
{
62-
return NULL;
62+
return dev->sd;
6363
}
6464

6565
static inline void mlx5_set_sd(struct mlx5_core_dev *dev, struct mlx5_sd *sd)
6666
{
67+
dev->sd = sd;
6768
}
6869
#endif

include/linux/mlx5/driver.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ struct mlx5_core_dev {
823823
struct blocking_notifier_head macsec_nh;
824824
#endif
825825
u64 num_ipsec_offloads;
826+
struct mlx5_sd *sd;
826827
};
827828

828829
struct mlx5_db {

0 commit comments

Comments
 (0)