dcs->obj = mlx5_glue->devx_obj_create(ctx, in,
sizeof(in), out, sizeof(out));
if (!dcs->obj) {
- DRV_LOG(ERR, "Can't allocate counters - error %d", errno);
- rte_errno = errno;
+ mlx5_devx_err_log(out, "allocate counters", NULL, 0);
mlx5_free(dcs);
return NULL;
}
mkey->obj = mlx5_glue->devx_obj_create(ctx, in, in_size_dw * 4, out,
sizeof(out));
if (!mkey->obj) {
- DRV_LOG(ERR, "Can't create %sdirect mkey - error %d",
- klm_num ? "an in" : "a ", errno);
- rte_errno = errno;
+ mlx5_devx_err_log(out,
+ klm_num ? "create indirect mkey" : "create direct key",
+ NULL, 0);
mlx5_free(mkey);
return NULL;
}
parse_flex_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!parse_flex_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create FLEX PARSE GRAPH object "
- "by using DevX.");
+ mlx5_devx_err_log(out, "create FLEX PARSE GRAPH", NULL, 0);
mlx5_free(parse_flex_obj);
return NULL;
}
rq->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!rq->obj) {
- DRV_LOG(ERR, "Failed to create RQ using DevX");
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create RQ", NULL, 0);
mlx5_free(rq);
return NULL;
}
rmp->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
sizeof(out));
if (!rmp->obj) {
- DRV_LOG(ERR, "Failed to create RMP using DevX");
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create RMP", NULL, 0);
mlx5_free(rmp);
return NULL;
}
tir->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!tir->obj) {
- DRV_LOG(ERR, "Failed to create TIR using DevX");
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create TIR", NULL, 0);
mlx5_free(tir);
return NULL;
}
rqt->obj = mlx5_glue->devx_obj_create(ctx, in, inlen, out, sizeof(out));
mlx5_free(in);
if (!rqt->obj) {
- DRV_LOG(ERR, "Failed to create RQT using DevX");
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create RQT", NULL, 0);
mlx5_free(rqt);
return NULL;
}
sq->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!sq->obj) {
- DRV_LOG(ERR, "Failed to create SQ using DevX");
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create SQ", NULL, 0);
mlx5_free(sq);
return NULL;
}
tis->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!tis->obj) {
- DRV_LOG(ERR, "Failed to create TIS using DevX");
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create TIS", NULL, 0);
mlx5_free(tis);
return NULL;
}
td->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!td->obj) {
- DRV_LOG(ERR, "Failed to create TIS using DevX");
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create TIS", NULL, 0);
mlx5_free(td);
return NULL;
}
cq_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
sizeof(out));
if (!cq_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create CQ using DevX errno=%d.", errno);
+ mlx5_devx_err_log(out, "create CQ", NULL, 0);
mlx5_free(cq_obj);
return NULL;
}
virtq_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
sizeof(out));
if (!virtq_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create VIRTQ Obj using DevX.");
+ mlx5_devx_err_log(out, "create VIRTQ", NULL, 0);
mlx5_free(virtq_obj);
return NULL;
}
qp_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
sizeof(out));
if (!qp_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create QP Obj using DevX.");
+ mlx5_devx_err_log(out, "create QP", NULL, 0);
mlx5_free(qp_obj);
return NULL;
}
couners_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
sizeof(out));
if (!couners_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create virtio queue counters Obj using"
- " DevX.");
+ mlx5_devx_err_log(out, "create virtio queue counters Obj",
+ NULL, 0);
mlx5_free(couners_obj);
return NULL;
}
flow_hit_aso_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!flow_hit_aso_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create FLOW_HIT_ASO obj using DevX.");
+ mlx5_devx_err_log(out, "create FLOW_HIT_ASO", NULL, 0);
mlx5_free(flow_hit_aso_obj);
return NULL;
}
ctx, in, sizeof(in),
out, sizeof(out));
if (!flow_meter_aso_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create FLOW_METER_ASO obj using DevX.");
+ mlx5_devx_err_log(out, "create FLOW_METTER_ASO", NULL, 0);
mlx5_free(flow_meter_aso_obj);
return NULL;
}
ct_aso_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (!ct_aso_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create CONN_TRACK_OFFLOAD obj by using DevX.");
+ mlx5_devx_err_log(out, "create CONN_TRACK_OFFLOAD", NULL, 0);
mlx5_free(ct_aso_obj);
return NULL;
}
geneve_tlv_opt_obj->obj = mlx5_glue->devx_obj_create(ctx, in,
sizeof(in), out, sizeof(out));
if (!geneve_tlv_opt_obj->obj) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create Geneve tlv option "
- "Obj using DevX.");
+ mlx5_devx_err_log(out, "create GENEVE TLV", NULL, 0);
mlx5_free(geneve_tlv_opt_obj);
return NULL;
}
dcs->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
sizeof(out));
if (!dcs->obj) {
- DRV_LOG(DEBUG, "Can't allocate q counter set by DevX - error "
- "%d.", errno);
- rte_errno = errno;
+ mlx5_devx_err_log(out, "create q counter set", NULL, 0);
mlx5_free(dcs);
return NULL;
}
dek_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (dek_obj->obj == NULL) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create DEK obj using DevX.");
+ mlx5_devx_err_log(out, "create DEK", NULL, 0);
mlx5_free(dek_obj);
return NULL;
}
import_kek_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (import_kek_obj->obj == NULL) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create IMPORT_KEK object using DevX.");
+ mlx5_devx_err_log(out, "create IMPORT_KEK", NULL, 0);
mlx5_free(import_kek_obj);
return NULL;
}
credential_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (credential_obj->obj == NULL) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create CREDENTIAL object using DevX.");
+ mlx5_devx_err_log(out, "create CREDENTIAL", NULL, 0);
mlx5_free(credential_obj);
return NULL;
}
crypto_login_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
out, sizeof(out));
if (crypto_login_obj->obj == NULL) {
- rte_errno = errno;
- DRV_LOG(ERR, "Failed to create CRYPTO_LOGIN obj using DevX.");
+ mlx5_devx_err_log(out, "create CRYPTO_LOGIN", NULL, 0);
mlx5_free(crypto_login_obj);
return NULL;
}