]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net/mlx5: Enable SD feature
authorTariq Toukan <tariqt@nvidia.com>
Tue, 5 Dec 2023 21:54:21 +0000 (23:54 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 21 Dec 2023 00:54:27 +0000 (16:54 -0800)
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>
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h
include/linux/mlx5/driver.h

index 0810b92b48d09ad4c871982a9b6aac985617bcdd..37d5f445598c7bff34f1a09b8d3c2ac8749d923b 100644 (file)
@@ -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
index aafb36c9e5d9de7790506a9afcd410f214127301..cd286b681970f1406030aa539f0c3cc55d156523 100644 (file)
@@ -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 {