@@ -3,6 +3,7 @@ libmlx4.so.1 ibverbs-providers #MINVER#
mlx4dv_init_obj@MLX4_1.0 15
mlx4dv_query_device@MLX4_1.0 15
mlx4dv_create_qp@MLX4_1.0 15
+ mlx4dv_set_context_attr@MLX4_1.0 15
libmlx5.so.1 ibverbs-providers #MINVER#
MLX5_1.0@MLX5_1.0 13
MLX5_1.1@MLX5_1.1 14
@@ -5,5 +5,6 @@ MLX4_1.0 {
mlx4dv_init_obj;
mlx4dv_query_device;
mlx4dv_create_qp;
+ mlx4dv_set_context_attr;
local: *;
};
@@ -443,3 +443,20 @@ int mlx4dv_query_device(struct ibv_context *ctx_in,
return 0;
}
+
+int mlx4dv_set_context_attr(struct ibv_context *context,
+ enum mlx4dv_set_ctx_attr_type attr_type,
+ void *attr)
+{
+ struct mlx4_context *ctx = to_mctx(context);
+
+ switch (attr_type) {
+ case MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ:
+ ctx->log_wqs_range_sz = *((uint8_t *)attr);
+ break;
+ default:
+ return ENOTSUP;
+ }
+
+ return 0;
+}
@@ -498,5 +498,16 @@ void mlx4dv_set_data_seg(struct mlx4_wqe_data_seg *seg,
int mlx4dv_query_device(struct ibv_context *ctx_in,
struct mlx4dv_context *attrs_out);
-#endif /* _MLX4DV_H_ */
+enum mlx4dv_set_ctx_attr_type {
+ /* Attribute type uint8_t */
+ MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ = 0,
+};
+/*
+ * Returns 0 on success, or the value of errno on failure
+ * (which indicates the failure reason).
+ */
+int mlx4dv_set_context_attr(struct ibv_context *context,
+ enum mlx4dv_set_ctx_attr_type attr_type,
+ void *attr);
+#endif /* _MLX4DV_H_ */