We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fb50bf commit 4be99baCopy full SHA for 4be99ba
drivers/infiniband/hw/mlx5/Makefile
@@ -9,6 +9,7 @@ mlx5_ib-y := ah.o \
9
data_direct.o \
10
dm.o \
11
doorbell.o \
12
+ fs.o \
13
gsi.o \
14
ib_virt.o \
15
mad.o \
@@ -26,7 +27,6 @@ mlx5_ib-y := ah.o \
26
27
mlx5_ib-$(CONFIG_INFINIBAND_ON_DEMAND_PAGING) += odp.o
28
mlx5_ib-$(CONFIG_MLX5_ESWITCH) += ib_rep.o
29
mlx5_ib-$(CONFIG_INFINIBAND_USER_ACCESS) += devx.o \
- fs.o \
30
qos.o \
31
std_types.o
32
mlx5_ib-$(CONFIG_MLX5_MACSEC) += macsec.o
drivers/infiniband/hw/mlx5/counters.c
@@ -853,9 +853,8 @@ static void mlx5_ib_dealloc_counters(struct mlx5_ib_dev *dev)
853
dev->port[i].cnts.opfcs, j, &in_use_opfc))
854
goto skip;
855
856
- if (IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS))
857
- mlx5_ib_fs_remove_op_fc(dev,
858
- &dev->port[i].cnts.opfcs[j], j);
+ mlx5_ib_fs_remove_op_fc(dev,
+ &dev->port[i].cnts.opfcs[j], j);
859
mlx5_fc_destroy(dev->mdev,
860
dev->port[i].cnts.opfcs[j].fc);
861
skip:
@@ -1119,8 +1118,7 @@ static const struct ib_device_ops hw_stats_ops = {
1119
1118
.counter_dealloc = mlx5_ib_counter_dealloc,
1120
.counter_alloc_stats = mlx5_ib_counter_alloc_stats,
1121
.counter_update_stats = mlx5_ib_counter_update_stats,
1122
- .modify_hw_stat = IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS) ?
1123
- mlx5_ib_modify_stat : NULL,
+ .modify_hw_stat = mlx5_ib_modify_stat,
1124
.counter_init = mlx5_ib_counter_init,
1125
1126
INIT_RDMA_OBJ_SIZE(rdma_counter, mlx5_rdma_counter, rdma_counter),
drivers/infiniband/hw/mlx5/fs.c
@@ -679,7 +679,7 @@ enum flow_table_type {
679
#define MLX5_FS_MAX_TYPES 6
680
#define MLX5_FS_MAX_ENTRIES BIT(16)
681
682
-static bool mlx5_ib_shared_ft_allowed(struct ib_device *device)
+static bool __maybe_unused mlx5_ib_shared_ft_allowed(struct ib_device *device)
683
{
684
struct mlx5_ib_dev *dev = to_mdev(device);
685
@@ -3030,6 +3030,7 @@ DECLARE_UVERBS_NAMED_OBJECT(
3030
&UVERBS_METHOD(MLX5_IB_METHOD_STEERING_ANCHOR_DESTROY));
3031
3032
const struct uapi_definition mlx5_ib_flow_defs[] = {
3033
+#if IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS)
3034
UAPI_DEF_CHAIN_OBJ_TREE_NAMED(
3035
MLX5_IB_OBJECT_FLOW_MATCHER),
3036
UAPI_DEF_CHAIN_OBJ_TREE(
@@ -3040,6 +3041,7 @@ const struct uapi_definition mlx5_ib_flow_defs[] = {
3040
3041
3042
MLX5_IB_OBJECT_STEERING_ANCHOR,
3043
UAPI_DEF_IS_OBJ_SUPPORTED(mlx5_ib_shared_ft_allowed)),
3044
+#endif
3045
{},
3046
};
3047
drivers/infiniband/hw/mlx5/fs.h
@@ -8,23 +8,8 @@
8
#include "mlx5_ib.h"
-#if IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS)
int mlx5_ib_fs_init(struct mlx5_ib_dev *dev);
void mlx5_ib_fs_cleanup_anchor(struct mlx5_ib_dev *dev);
-#else
-static inline int mlx5_ib_fs_init(struct mlx5_ib_dev *dev)
16
-{
17
- dev->flow_db = kzalloc(sizeof(*dev->flow_db), GFP_KERNEL);
18
-
19
- if (!dev->flow_db)
20
- return -ENOMEM;
21
22
- mutex_init(&dev->flow_db->lock);
23
- return 0;
24
-}
25
-inline void mlx5_ib_fs_cleanup_anchor(struct mlx5_ib_dev *dev) {}
-#endif
static inline void mlx5_ib_fs_cleanup(struct mlx5_ib_dev *dev)
0 commit comments