|
@@ -36,17 +36,14 @@
|
|
|
|
|
|
int mlx5_core_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn)
|
|
int mlx5_core_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(alloc_transport_domain_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(alloc_transport_domain_out)];
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(alloc_transport_domain_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(alloc_transport_domain_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
-
|
|
|
|
MLX5_SET(alloc_transport_domain_in, in, opcode,
|
|
MLX5_SET(alloc_transport_domain_in, in, opcode,
|
|
MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN);
|
|
MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN);
|
|
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*tdn = MLX5_GET(alloc_transport_domain_out, out,
|
|
*tdn = MLX5_GET(alloc_transport_domain_out, out,
|
|
transport_domain);
|
|
transport_domain);
|
|
@@ -57,29 +54,23 @@ EXPORT_SYMBOL(mlx5_core_alloc_transport_domain);
|
|
|
|
|
|
void mlx5_core_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn)
|
|
void mlx5_core_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(dealloc_transport_domain_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(dealloc_transport_domain_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(dealloc_transport_domain_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(dealloc_transport_domain_out)] = {0};
|
|
|
|
|
|
MLX5_SET(dealloc_transport_domain_in, in, opcode,
|
|
MLX5_SET(dealloc_transport_domain_in, in, opcode,
|
|
MLX5_CMD_OP_DEALLOC_TRANSPORT_DOMAIN);
|
|
MLX5_CMD_OP_DEALLOC_TRANSPORT_DOMAIN);
|
|
MLX5_SET(dealloc_transport_domain_in, in, transport_domain, tdn);
|
|
MLX5_SET(dealloc_transport_domain_in, in, transport_domain, tdn);
|
|
-
|
|
|
|
- mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
|
|
|
|
|
|
+ mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_dealloc_transport_domain);
|
|
EXPORT_SYMBOL(mlx5_core_dealloc_transport_domain);
|
|
|
|
|
|
int mlx5_core_create_rq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rqn)
|
|
int mlx5_core_create_rq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rqn)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(create_rq_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(create_rq_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
MLX5_SET(create_rq_in, in, opcode, MLX5_CMD_OP_CREATE_RQ);
|
|
MLX5_SET(create_rq_in, in, opcode, MLX5_CMD_OP_CREATE_RQ);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*rqn = MLX5_GET(create_rq_out, out, rqn);
|
|
*rqn = MLX5_GET(create_rq_out, out, rqn);
|
|
|
|
|
|
@@ -95,21 +86,18 @@ int mlx5_core_modify_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *in, int inlen)
|
|
MLX5_SET(modify_rq_in, in, opcode, MLX5_CMD_OP_MODIFY_RQ);
|
|
MLX5_SET(modify_rq_in, in, opcode, MLX5_CMD_OP_MODIFY_RQ);
|
|
|
|
|
|
memset(out, 0, sizeof(out));
|
|
memset(out, 0, sizeof(out));
|
|
- return mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_modify_rq);
|
|
EXPORT_SYMBOL(mlx5_core_modify_rq);
|
|
|
|
|
|
void mlx5_core_destroy_rq(struct mlx5_core_dev *dev, u32 rqn)
|
|
void mlx5_core_destroy_rq(struct mlx5_core_dev *dev, u32 rqn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(destroy_rq_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(destroy_rq_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(destroy_rq_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(destroy_rq_out)] = {0};
|
|
|
|
|
|
MLX5_SET(destroy_rq_in, in, opcode, MLX5_CMD_OP_DESTROY_RQ);
|
|
MLX5_SET(destroy_rq_in, in, opcode, MLX5_CMD_OP_DESTROY_RQ);
|
|
MLX5_SET(destroy_rq_in, in, rqn, rqn);
|
|
MLX5_SET(destroy_rq_in, in, rqn, rqn);
|
|
-
|
|
|
|
- mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
|
|
|
|
|
|
+ mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_destroy_rq);
|
|
EXPORT_SYMBOL(mlx5_core_destroy_rq);
|
|
|
|
|
|
@@ -121,19 +109,17 @@ int mlx5_core_query_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *out)
|
|
MLX5_SET(query_rq_in, in, opcode, MLX5_CMD_OP_QUERY_RQ);
|
|
MLX5_SET(query_rq_in, in, opcode, MLX5_CMD_OP_QUERY_RQ);
|
|
MLX5_SET(query_rq_in, in, rqn, rqn);
|
|
MLX5_SET(query_rq_in, in, rqn, rqn);
|
|
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, outlen);
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, sizeof(in), out, outlen);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_query_rq);
|
|
EXPORT_SYMBOL(mlx5_core_query_rq);
|
|
|
|
|
|
int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *sqn)
|
|
int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *sqn)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(create_sq_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(create_sq_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
MLX5_SET(create_sq_in, in, opcode, MLX5_CMD_OP_CREATE_SQ);
|
|
MLX5_SET(create_sq_in, in, opcode, MLX5_CMD_OP_CREATE_SQ);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*sqn = MLX5_GET(create_sq_out, out, sqn);
|
|
*sqn = MLX5_GET(create_sq_out, out, sqn);
|
|
|
|
|
|
@@ -142,27 +128,22 @@ int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *sqn)
|
|
|
|
|
|
int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *in, int inlen)
|
|
int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *in, int inlen)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(modify_sq_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(modify_sq_out)] = {0};
|
|
|
|
|
|
MLX5_SET(modify_sq_in, in, sqn, sqn);
|
|
MLX5_SET(modify_sq_in, in, sqn, sqn);
|
|
MLX5_SET(modify_sq_in, in, opcode, MLX5_CMD_OP_MODIFY_SQ);
|
|
MLX5_SET(modify_sq_in, in, opcode, MLX5_CMD_OP_MODIFY_SQ);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_modify_sq);
|
|
EXPORT_SYMBOL(mlx5_core_modify_sq);
|
|
|
|
|
|
void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn)
|
|
void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(destroy_sq_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(destroy_sq_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(destroy_sq_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(destroy_sq_out)] = {0};
|
|
|
|
|
|
MLX5_SET(destroy_sq_in, in, opcode, MLX5_CMD_OP_DESTROY_SQ);
|
|
MLX5_SET(destroy_sq_in, in, opcode, MLX5_CMD_OP_DESTROY_SQ);
|
|
MLX5_SET(destroy_sq_in, in, sqn, sqn);
|
|
MLX5_SET(destroy_sq_in, in, sqn, sqn);
|
|
-
|
|
|
|
- mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
|
|
|
|
|
|
+ mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
|
|
|
|
int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out)
|
|
int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out)
|
|
@@ -172,21 +153,20 @@ int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out)
|
|
|
|
|
|
MLX5_SET(query_sq_in, in, opcode, MLX5_CMD_OP_QUERY_SQ);
|
|
MLX5_SET(query_sq_in, in, opcode, MLX5_CMD_OP_QUERY_SQ);
|
|
MLX5_SET(query_sq_in, in, sqn, sqn);
|
|
MLX5_SET(query_sq_in, in, sqn, sqn);
|
|
-
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, outlen);
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, sizeof(in), out, outlen);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_query_sq);
|
|
EXPORT_SYMBOL(mlx5_core_query_sq);
|
|
|
|
|
|
int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
u32 *tirn)
|
|
u32 *tirn)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(create_tir_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(create_tir_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
MLX5_SET(create_tir_in, in, opcode, MLX5_CMD_OP_CREATE_TIR);
|
|
MLX5_SET(create_tir_in, in, opcode, MLX5_CMD_OP_CREATE_TIR);
|
|
|
|
|
|
memset(out, 0, sizeof(out));
|
|
memset(out, 0, sizeof(out));
|
|
- err = mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*tirn = MLX5_GET(create_tir_out, out, tirn);
|
|
*tirn = MLX5_GET(create_tir_out, out, tirn);
|
|
|
|
|
|
@@ -197,39 +177,32 @@ EXPORT_SYMBOL(mlx5_core_create_tir);
|
|
int mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 tirn, u32 *in,
|
|
int mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 tirn, u32 *in,
|
|
int inlen)
|
|
int inlen)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(modify_tir_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(modify_tir_out)] = {0};
|
|
|
|
|
|
MLX5_SET(modify_tir_in, in, tirn, tirn);
|
|
MLX5_SET(modify_tir_in, in, tirn, tirn);
|
|
MLX5_SET(modify_tir_in, in, opcode, MLX5_CMD_OP_MODIFY_TIR);
|
|
MLX5_SET(modify_tir_in, in, opcode, MLX5_CMD_OP_MODIFY_TIR);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
}
|
|
}
|
|
|
|
|
|
void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn)
|
|
void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(destroy_tir_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(destroy_tir_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(destroy_tir_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(destroy_tir_out)] = {0};
|
|
|
|
|
|
MLX5_SET(destroy_tir_in, in, opcode, MLX5_CMD_OP_DESTROY_TIR);
|
|
MLX5_SET(destroy_tir_in, in, opcode, MLX5_CMD_OP_DESTROY_TIR);
|
|
MLX5_SET(destroy_tir_in, in, tirn, tirn);
|
|
MLX5_SET(destroy_tir_in, in, tirn, tirn);
|
|
-
|
|
|
|
- mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
|
|
|
|
|
|
+ mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_destroy_tir);
|
|
EXPORT_SYMBOL(mlx5_core_destroy_tir);
|
|
|
|
|
|
int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
u32 *tisn)
|
|
u32 *tisn)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(create_tis_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(create_tis_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
MLX5_SET(create_tis_in, in, opcode, MLX5_CMD_OP_CREATE_TIS);
|
|
MLX5_SET(create_tis_in, in, opcode, MLX5_CMD_OP_CREATE_TIS);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*tisn = MLX5_GET(create_tis_out, out, tisn);
|
|
*tisn = MLX5_GET(create_tis_out, out, tisn);
|
|
|
|
|
|
@@ -245,34 +218,29 @@ int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in,
|
|
MLX5_SET(modify_tis_in, in, tisn, tisn);
|
|
MLX5_SET(modify_tis_in, in, tisn, tisn);
|
|
MLX5_SET(modify_tis_in, in, opcode, MLX5_CMD_OP_MODIFY_TIS);
|
|
MLX5_SET(modify_tis_in, in, opcode, MLX5_CMD_OP_MODIFY_TIS);
|
|
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_modify_tis);
|
|
EXPORT_SYMBOL(mlx5_core_modify_tis);
|
|
|
|
|
|
void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn)
|
|
void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(destroy_tis_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(destroy_tis_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(destroy_tis_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(destroy_tis_out)] = {0};
|
|
|
|
|
|
MLX5_SET(destroy_tis_in, in, opcode, MLX5_CMD_OP_DESTROY_TIS);
|
|
MLX5_SET(destroy_tis_in, in, opcode, MLX5_CMD_OP_DESTROY_TIS);
|
|
MLX5_SET(destroy_tis_in, in, tisn, tisn);
|
|
MLX5_SET(destroy_tis_in, in, tisn, tisn);
|
|
-
|
|
|
|
- mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
|
|
|
|
|
|
+ mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_destroy_tis);
|
|
EXPORT_SYMBOL(mlx5_core_destroy_tis);
|
|
|
|
|
|
int mlx5_core_create_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
int mlx5_core_create_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
u32 *rmpn)
|
|
u32 *rmpn)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(create_rmp_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(create_rmp_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
MLX5_SET(create_rmp_in, in, opcode, MLX5_CMD_OP_CREATE_RMP);
|
|
MLX5_SET(create_rmp_in, in, opcode, MLX5_CMD_OP_CREATE_RMP);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*rmpn = MLX5_GET(create_rmp_out, out, rmpn);
|
|
*rmpn = MLX5_GET(create_rmp_out, out, rmpn);
|
|
|
|
|
|
@@ -281,38 +249,31 @@ int mlx5_core_create_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
|
|
|
|
int mlx5_core_modify_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen)
|
|
int mlx5_core_modify_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(modify_rmp_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(modify_rmp_out)] = {0};
|
|
|
|
|
|
MLX5_SET(modify_rmp_in, in, opcode, MLX5_CMD_OP_MODIFY_RMP);
|
|
MLX5_SET(modify_rmp_in, in, opcode, MLX5_CMD_OP_MODIFY_RMP);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
}
|
|
}
|
|
|
|
|
|
int mlx5_core_destroy_rmp(struct mlx5_core_dev *dev, u32 rmpn)
|
|
int mlx5_core_destroy_rmp(struct mlx5_core_dev *dev, u32 rmpn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(destroy_rmp_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(destroy_rmp_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(destroy_rmp_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(destroy_rmp_out)] = {0};
|
|
|
|
|
|
MLX5_SET(destroy_rmp_in, in, opcode, MLX5_CMD_OP_DESTROY_RMP);
|
|
MLX5_SET(destroy_rmp_in, in, opcode, MLX5_CMD_OP_DESTROY_RMP);
|
|
MLX5_SET(destroy_rmp_in, in, rmpn, rmpn);
|
|
MLX5_SET(destroy_rmp_in, in, rmpn, rmpn);
|
|
-
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, sizeof(in), out,
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, sizeof(in), out,
|
|
sizeof(out));
|
|
sizeof(out));
|
|
}
|
|
}
|
|
|
|
|
|
int mlx5_core_query_rmp(struct mlx5_core_dev *dev, u32 rmpn, u32 *out)
|
|
int mlx5_core_query_rmp(struct mlx5_core_dev *dev, u32 rmpn, u32 *out)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(query_rmp_in)];
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(query_rmp_in)] = {0};
|
|
int outlen = MLX5_ST_SZ_BYTES(query_rmp_out);
|
|
int outlen = MLX5_ST_SZ_BYTES(query_rmp_out);
|
|
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
MLX5_SET(query_rmp_in, in, opcode, MLX5_CMD_OP_QUERY_RMP);
|
|
MLX5_SET(query_rmp_in, in, opcode, MLX5_CMD_OP_QUERY_RMP);
|
|
MLX5_SET(query_rmp_in, in, rmpn, rmpn);
|
|
MLX5_SET(query_rmp_in, in, rmpn, rmpn);
|
|
-
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, outlen);
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, sizeof(in), out, outlen);
|
|
}
|
|
}
|
|
|
|
|
|
int mlx5_core_arm_rmp(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm)
|
|
int mlx5_core_arm_rmp(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm)
|
|
@@ -347,13 +308,11 @@ int mlx5_core_arm_rmp(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm)
|
|
int mlx5_core_create_xsrq(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
int mlx5_core_create_xsrq(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
u32 *xsrqn)
|
|
u32 *xsrqn)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(create_xrc_srq_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(create_xrc_srq_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
MLX5_SET(create_xrc_srq_in, in, opcode, MLX5_CMD_OP_CREATE_XRC_SRQ);
|
|
MLX5_SET(create_xrc_srq_in, in, opcode, MLX5_CMD_OP_CREATE_XRC_SRQ);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*xsrqn = MLX5_GET(create_xrc_srq_out, out, xrc_srqn);
|
|
*xsrqn = MLX5_GET(create_xrc_srq_out, out, xrc_srqn);
|
|
|
|
|
|
@@ -362,33 +321,25 @@ int mlx5_core_create_xsrq(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
|
|
|
|
int mlx5_core_destroy_xsrq(struct mlx5_core_dev *dev, u32 xsrqn)
|
|
int mlx5_core_destroy_xsrq(struct mlx5_core_dev *dev, u32 xsrqn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(destroy_xrc_srq_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(destroy_xrc_srq_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(destroy_xrc_srq_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(destroy_xrc_srq_out)] = {0};
|
|
|
|
|
|
MLX5_SET(destroy_xrc_srq_in, in, opcode, MLX5_CMD_OP_DESTROY_XRC_SRQ);
|
|
MLX5_SET(destroy_xrc_srq_in, in, opcode, MLX5_CMD_OP_DESTROY_XRC_SRQ);
|
|
MLX5_SET(destroy_xrc_srq_in, in, xrc_srqn, xsrqn);
|
|
MLX5_SET(destroy_xrc_srq_in, in, xrc_srqn, xsrqn);
|
|
-
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, sizeof(in), out,
|
|
|
|
- sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
|
|
|
|
int mlx5_core_query_xsrq(struct mlx5_core_dev *dev, u32 xsrqn, u32 *out)
|
|
int mlx5_core_query_xsrq(struct mlx5_core_dev *dev, u32 xsrqn, u32 *out)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(query_xrc_srq_in)];
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(query_xrc_srq_in)] = {0};
|
|
void *srqc;
|
|
void *srqc;
|
|
void *xrc_srqc;
|
|
void *xrc_srqc;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
MLX5_SET(query_xrc_srq_in, in, opcode, MLX5_CMD_OP_QUERY_XRC_SRQ);
|
|
MLX5_SET(query_xrc_srq_in, in, opcode, MLX5_CMD_OP_QUERY_XRC_SRQ);
|
|
MLX5_SET(query_xrc_srq_in, in, xrc_srqn, xsrqn);
|
|
MLX5_SET(query_xrc_srq_in, in, xrc_srqn, xsrqn);
|
|
-
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, sizeof(in),
|
|
|
|
- out,
|
|
|
|
- MLX5_ST_SZ_BYTES(query_xrc_srq_out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, sizeof(in), out,
|
|
|
|
+ MLX5_ST_SZ_BYTES(query_xrc_srq_out));
|
|
if (!err) {
|
|
if (!err) {
|
|
xrc_srqc = MLX5_ADDR_OF(query_xrc_srq_out, out,
|
|
xrc_srqc = MLX5_ADDR_OF(query_xrc_srq_out, out,
|
|
xrc_srq_context_entry);
|
|
xrc_srq_context_entry);
|
|
@@ -401,32 +352,25 @@ int mlx5_core_query_xsrq(struct mlx5_core_dev *dev, u32 xsrqn, u32 *out)
|
|
|
|
|
|
int mlx5_core_arm_xsrq(struct mlx5_core_dev *dev, u32 xsrqn, u16 lwm)
|
|
int mlx5_core_arm_xsrq(struct mlx5_core_dev *dev, u32 xsrqn, u16 lwm)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(arm_xrc_srq_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(arm_xrc_srq_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(arm_xrc_srq_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(arm_xrc_srq_out)] = {0};
|
|
|
|
|
|
MLX5_SET(arm_xrc_srq_in, in, opcode, MLX5_CMD_OP_ARM_XRC_SRQ);
|
|
MLX5_SET(arm_xrc_srq_in, in, opcode, MLX5_CMD_OP_ARM_XRC_SRQ);
|
|
MLX5_SET(arm_xrc_srq_in, in, xrc_srqn, xsrqn);
|
|
MLX5_SET(arm_xrc_srq_in, in, xrc_srqn, xsrqn);
|
|
MLX5_SET(arm_xrc_srq_in, in, lwm, lwm);
|
|
MLX5_SET(arm_xrc_srq_in, in, lwm, lwm);
|
|
MLX5_SET(arm_xrc_srq_in, in, op_mod,
|
|
MLX5_SET(arm_xrc_srq_in, in, op_mod,
|
|
MLX5_ARM_XRC_SRQ_IN_OP_MOD_XRC_SRQ);
|
|
MLX5_ARM_XRC_SRQ_IN_OP_MOD_XRC_SRQ);
|
|
-
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, sizeof(in), out,
|
|
|
|
- sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
|
|
|
|
int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
|
u32 *rqtn)
|
|
u32 *rqtn)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(create_rqt_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(create_rqt_out)] = {0};
|
|
int err;
|
|
int err;
|
|
|
|
|
|
MLX5_SET(create_rqt_in, in, opcode, MLX5_CMD_OP_CREATE_RQT);
|
|
MLX5_SET(create_rqt_in, in, opcode, MLX5_CMD_OP_CREATE_RQT);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- err = mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
if (!err)
|
|
if (!err)
|
|
*rqtn = MLX5_GET(create_rqt_out, out, rqtn);
|
|
*rqtn = MLX5_GET(create_rqt_out, out, rqtn);
|
|
|
|
|
|
@@ -437,25 +381,20 @@ EXPORT_SYMBOL(mlx5_core_create_rqt);
|
|
int mlx5_core_modify_rqt(struct mlx5_core_dev *dev, u32 rqtn, u32 *in,
|
|
int mlx5_core_modify_rqt(struct mlx5_core_dev *dev, u32 rqtn, u32 *in,
|
|
int inlen)
|
|
int inlen)
|
|
{
|
|
{
|
|
- u32 out[MLX5_ST_SZ_DW(modify_rqt_out)];
|
|
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(modify_rqt_out)] = {0};
|
|
|
|
|
|
MLX5_SET(modify_rqt_in, in, rqtn, rqtn);
|
|
MLX5_SET(modify_rqt_in, in, rqtn, rqtn);
|
|
MLX5_SET(modify_rqt_in, in, opcode, MLX5_CMD_OP_MODIFY_RQT);
|
|
MLX5_SET(modify_rqt_in, in, opcode, MLX5_CMD_OP_MODIFY_RQT);
|
|
-
|
|
|
|
- memset(out, 0, sizeof(out));
|
|
|
|
- return mlx5_cmd_exec_check_status(dev, in, inlen, out, sizeof(out));
|
|
|
|
|
|
+ return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
|
|
}
|
|
}
|
|
|
|
|
|
void mlx5_core_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn)
|
|
void mlx5_core_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn)
|
|
{
|
|
{
|
|
- u32 in[MLX5_ST_SZ_DW(destroy_rqt_in)];
|
|
|
|
- u32 out[MLX5_ST_SZ_DW(destroy_rqt_out)];
|
|
|
|
-
|
|
|
|
- memset(in, 0, sizeof(in));
|
|
|
|
|
|
+ u32 in[MLX5_ST_SZ_DW(destroy_rqt_in)] = {0};
|
|
|
|
+ u32 out[MLX5_ST_SZ_DW(destroy_rqt_out)] = {0};
|
|
|
|
|
|
MLX5_SET(destroy_rqt_in, in, opcode, MLX5_CMD_OP_DESTROY_RQT);
|
|
MLX5_SET(destroy_rqt_in, in, opcode, MLX5_CMD_OP_DESTROY_RQT);
|
|
MLX5_SET(destroy_rqt_in, in, rqtn, rqtn);
|
|
MLX5_SET(destroy_rqt_in, in, rqtn, rqtn);
|
|
-
|
|
|
|
- mlx5_cmd_exec_check_status(dev, in, sizeof(in), out, sizeof(out));
|
|
|
|
|
|
+ mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mlx5_core_destroy_rqt);
|
|
EXPORT_SYMBOL(mlx5_core_destroy_rqt);
|