Displaying 3 results from an estimated 3 matches for "rtr2rts_qp_out".
2020 Aug 06
1
[PATCH][next] vdpa/mlx5: fix memory allocation failure checks
...ut = kzalloc(MLX5_ST_SZ_BYTES(init2rtr_qp_out), GFP_KERNEL);
- if (!in || !out)
+ if (!*in || !*out)
goto outerr;
MLX5_SET(init2rtr_qp_in, *in, opcode, cmd);
@@ -914,7 +914,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl
*outlen = MLX5_ST_SZ_BYTES(rtr2rts_qp_out);
*in = kzalloc(*inlen, GFP_KERNEL);
*out = kzalloc(MLX5_ST_SZ_BYTES(rtr2rts_qp_out), GFP_KERNEL);
- if (!in || !out)
+ if (!*in || !*out)
goto outerr;
MLX5_SET(rtr2rts_qp_in, *in, opcode, cmd);
@@ -927,16 +927,15 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void...
2020 Aug 07
1
[PATCH] vdpa/mlx5: Fix erroneous null pointer checks
...qp_out), GFP_KERNEL);
> - if (!in || !out)
> + if (!*in || !*out)
> goto outerr;
>
> MLX5_SET(init2rtr_qp_in, *in, opcode, cmd);
> @@ -914,7 +914,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl
> *outlen = MLX5_ST_SZ_BYTES(rtr2rts_qp_out);
> *in = kzalloc(*inlen, GFP_KERNEL);
> *out = kzalloc(MLX5_ST_SZ_BYTES(rtr2rts_qp_out), GFP_KERNEL);
> - if (!in || !out)
> + if (!*in || !*out)
> goto outerr;
>
> MLX5_SET(rtr2rts_qp_in, *in, opcode, cmd);
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
..., qpc, log_msg_max, 30);
> + MLX5_SET(qpc, qpc, remote_qpn, rqpn);
> + pp = MLX5_ADDR_OF(qpc, qpc, primary_address_path);
> + MLX5_SET(ads, pp, fl, 1);
> + break;
> + case MLX5_CMD_OP_RTR2RTS_QP:
> + *inlen = MLX5_ST_SZ_BYTES(rtr2rts_qp_in);
> + *outlen = MLX5_ST_SZ_BYTES(rtr2rts_qp_out);
> + *in = kzalloc(*inlen, GFP_KERNEL);
> + *out = kzalloc(MLX5_ST_SZ_BYTES(rtr2rts_qp_out), GFP_KERNEL);
> + if (!in || !out)
> + goto outerr;
> +
> + MLX5_SET(rtr2rts_qp_in, *in, opcode, cmd);
> + MLX5_SET(rtr2rts_qp_in, *in, uid, ndev->mvdev.res.uid);
> + MLX5...