• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/mlx5/mlx5_fpga/

Lines Matching refs:context

101 	struct mlx5_ipsec_command_context *context;
104 context = container_of(buf, struct mlx5_ipsec_command_context,
108 context->status = MLX5_FPGA_IPSEC_SACMD_SEND_FAIL;
109 complete(&context->complete);
131 struct mlx5_ipsec_command_context *context;
146 context = list_first_entry_or_null(&fdev->ipsec->pending_cmds,
149 if (context)
150 list_del(&context->list);
153 if (!context) {
157 mlx5_fpga_dbg(fdev, "Handling response for %p\n", context);
159 if (context->sa.sw_sa_handle != resp->sw_sa_handle) {
161 ntohl(context->sa.sw_sa_handle),
167 context->status_code = syndrome_to_errno(syndrome);
168 context->status = MLX5_FPGA_IPSEC_SACMD_COMPLETE;
170 if (context->status_code)
173 complete(&context->complete);
179 struct mlx5_ipsec_command_context *context;
188 context = kzalloc(sizeof(*context), GFP_ATOMIC);
189 if (!context)
192 memcpy(&context->sa, cmd, sizeof(*cmd));
193 context->buf.complete = mlx5_fpga_ipsec_send_complete;
194 context->buf.sg[0].size = sizeof(context->sa);
195 context->buf.sg[0].data = &context->sa;
196 init_completion(&context->complete);
197 context->dev = fdev;
199 list_add_tail(&context->list, &fdev->ipsec->pending_cmds);
202 context->status = MLX5_FPGA_IPSEC_SACMD_PENDING;
204 res = mlx5_fpga_sbu_conn_sendmsg(fdev->ipsec->conn, &context->buf);
209 list_del(&context->list);
211 kfree(context);
215 return context;
220 struct mlx5_ipsec_command_context *context = ctx;
223 res = wait_for_completion/*_killable XXXKIB*/(&context->complete);
225 mlx5_fpga_warn(context->dev, "Failure waiting for IPSec command response\n");
229 if (context->status == MLX5_FPGA_IPSEC_SACMD_COMPLETE)
230 res = context->status_code;
234 kfree(context);