|
@@ -30,13 +30,11 @@
|
|
* SOFTWARE.
|
|
* SOFTWARE.
|
|
*/
|
|
*/
|
|
|
|
|
|
-#ifndef MLX5_IB_USER_H
|
|
|
|
-#define MLX5_IB_USER_H
|
|
|
|
|
|
+#ifndef MLX5_ABI_USER_H
|
|
|
|
+#define MLX5_ABI_USER_H
|
|
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/types.h>
|
|
|
|
|
|
-#include "mlx5_ib.h"
|
|
|
|
-
|
|
|
|
enum {
|
|
enum {
|
|
MLX5_QP_FLAG_SIGNATURE = 1 << 0,
|
|
MLX5_QP_FLAG_SIGNATURE = 1 << 0,
|
|
MLX5_QP_FLAG_SCATTER_CQE = 1 << 1,
|
|
MLX5_QP_FLAG_SCATTER_CQE = 1 << 1,
|
|
@@ -50,7 +48,6 @@ enum {
|
|
MLX5_WQ_FLAG_SIGNATURE = 1 << 0,
|
|
MLX5_WQ_FLAG_SIGNATURE = 1 << 0,
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
/* Increment this value if any changes that break userspace ABI
|
|
/* Increment this value if any changes that break userspace ABI
|
|
* compatibility are made.
|
|
* compatibility are made.
|
|
*/
|
|
*/
|
|
@@ -249,40 +246,4 @@ struct mlx5_ib_modify_wq {
|
|
__u32 comp_mask;
|
|
__u32 comp_mask;
|
|
__u32 reserved;
|
|
__u32 reserved;
|
|
};
|
|
};
|
|
-
|
|
|
|
-static inline int get_qp_user_index(struct mlx5_ib_ucontext *ucontext,
|
|
|
|
- struct mlx5_ib_create_qp *ucmd,
|
|
|
|
- int inlen,
|
|
|
|
- u32 *user_index)
|
|
|
|
-{
|
|
|
|
- u8 cqe_version = ucontext->cqe_version;
|
|
|
|
-
|
|
|
|
- if (field_avail(struct mlx5_ib_create_qp, uidx, inlen) &&
|
|
|
|
- !cqe_version && (ucmd->uidx == MLX5_IB_DEFAULT_UIDX))
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
- if (!!(field_avail(struct mlx5_ib_create_qp, uidx, inlen) !=
|
|
|
|
- !!cqe_version))
|
|
|
|
- return -EINVAL;
|
|
|
|
-
|
|
|
|
- return verify_assign_uidx(cqe_version, ucmd->uidx, user_index);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline int get_srq_user_index(struct mlx5_ib_ucontext *ucontext,
|
|
|
|
- struct mlx5_ib_create_srq *ucmd,
|
|
|
|
- int inlen,
|
|
|
|
- u32 *user_index)
|
|
|
|
-{
|
|
|
|
- u8 cqe_version = ucontext->cqe_version;
|
|
|
|
-
|
|
|
|
- if (field_avail(struct mlx5_ib_create_srq, uidx, inlen) &&
|
|
|
|
- !cqe_version && (ucmd->uidx == MLX5_IB_DEFAULT_UIDX))
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
- if (!!(field_avail(struct mlx5_ib_create_srq, uidx, inlen) !=
|
|
|
|
- !!cqe_version))
|
|
|
|
- return -EINVAL;
|
|
|
|
-
|
|
|
|
- return verify_assign_uidx(cqe_version, ucmd->uidx, user_index);
|
|
|
|
-}
|
|
|
|
-#endif /* MLX5_IB_USER_H */
|
|
|
|
|
|
+#endif /* MLX5_ABI_USER_H */
|