Commit 48962f5c authored by Jason Gunthorpe's avatar Jason Gunthorpe

RDMA/mlx4: Move flag constants to uapi header

MLX4_USER_DEV_CAP_LARGE_CQE (via mlx4_ib_alloc_ucontext_resp.dev_caps)
and MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET (via
mlx4_uverbs_ex_query_device_resp.comp_mask) are copied directly to
userspace and form part of the uAPI.

Move them to the uapi header where they belong.
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 0c43ab37
...@@ -575,7 +575,7 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, ...@@ -575,7 +575,7 @@ static int mlx4_ib_query_device(struct ib_device *ibdev,
if (uhw->outlen >= resp.response_length + sizeof(resp.hca_core_clock_offset)) { if (uhw->outlen >= resp.response_length + sizeof(resp.hca_core_clock_offset)) {
resp.response_length += sizeof(resp.hca_core_clock_offset); resp.response_length += sizeof(resp.hca_core_clock_offset);
if (!err && !mlx4_is_slave(dev->dev)) { if (!err && !mlx4_is_slave(dev->dev)) {
resp.comp_mask |= QUERY_DEVICE_RESP_MASK_TIMESTAMP; resp.comp_mask |= MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET;
resp.hca_core_clock_offset = clock_params.offset % PAGE_SIZE; resp.hca_core_clock_offset = clock_params.offset % PAGE_SIZE;
} }
} }
......
...@@ -641,10 +641,6 @@ struct mlx4_uverbs_ex_query_device { ...@@ -641,10 +641,6 @@ struct mlx4_uverbs_ex_query_device {
__u32 reserved; __u32 reserved;
}; };
enum query_device_resp_mask {
QUERY_DEVICE_RESP_MASK_TIMESTAMP = 1UL << 0,
};
static inline struct mlx4_ib_dev *to_mdev(struct ib_device *ibdev) static inline struct mlx4_ib_dev *to_mdev(struct ib_device *ibdev)
{ {
return container_of(ibdev, struct mlx4_ib_dev, ib_dev); return container_of(ibdev, struct mlx4_ib_dev, ib_dev);
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <uapi/rdma/mlx4-abi.h>
#include "fw.h" #include "fw.h"
#include "icm.h" #include "icm.h"
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <net/devlink.h> #include <net/devlink.h>
#include <uapi/rdma/mlx4-abi.h>
#include <linux/mlx4/device.h> #include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h> #include <linux/mlx4/doorbell.h>
......
...@@ -256,10 +256,6 @@ enum { ...@@ -256,10 +256,6 @@ enum {
MLX4_DEV_CAP_EQE_STRIDE_ENABLED = 1LL << 3 MLX4_DEV_CAP_EQE_STRIDE_ENABLED = 1LL << 3
}; };
enum {
MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0
};
enum { enum {
MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0, MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0,
MLX4_FUNC_CAP_EQE_CQE_STRIDE = 1L << 1, MLX4_FUNC_CAP_EQE_CQE_STRIDE = 1L << 1,
......
...@@ -59,6 +59,10 @@ struct mlx4_ib_alloc_ucontext_resp_v3 { ...@@ -59,6 +59,10 @@ struct mlx4_ib_alloc_ucontext_resp_v3 {
__u16 bf_regs_per_page; __u16 bf_regs_per_page;
}; };
enum {
MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0,
};
struct mlx4_ib_alloc_ucontext_resp { struct mlx4_ib_alloc_ucontext_resp {
__u32 dev_caps; __u32 dev_caps;
__u32 qp_tab_size; __u32 qp_tab_size;
...@@ -162,6 +166,10 @@ struct mlx4_ib_rss_caps { ...@@ -162,6 +166,10 @@ struct mlx4_ib_rss_caps {
__u8 reserved[7]; __u8 reserved[7];
}; };
enum query_device_resp_mask {
MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0,
};
struct mlx4_uverbs_ex_query_device_resp { struct mlx4_uverbs_ex_query_device_resp {
__u32 comp_mask; __u32 comp_mask;
__u32 response_length; __u32 response_length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment