search for: modify_virtqueue

Displaying 4 results from an estimated 4 matches for "modify_virtqueue".

2020 Jul 20
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...dev); >>>>> + struct mlx5_vdpa_virtqueue *mvq = &ndev->vqs[idx]; >>>>> + int err; >>>>> + >>>>> + if (!mvq->ready && ready && mvq->fw_state != MLX5_VIRTIO_NET_Q_OBJECT_STATE_RDY) { >>>>> + err = modify_virtqueue(ndev, mvq, MLX5_VIRTIO_NET_Q_OBJECT_STATE_RDY); >>>>> + if (err) { >>>>> + mlx5_vdpa_warn(mvdev, "failed to modify virtqueue(%d)\n", err); >>>>> + return; >>>>> + } >>>>> + } >>>> I wonder what...
2020 Oct 01
0
[PATCH] vdpa/mlx5: should keep avail_index despite device status
...dev, struct mlx5_vdpa_virtqueue *m if (!mvq->initialized) return; - if (query_virtqueue(ndev, mvq, &attr)) { - mlx5_vdpa_warn(&ndev->mvdev, "failed to query virtqueue\n"); - return; - } if (mvq->fw_state != MLX5_VIRTIO_NET_Q_OBJECT_STATE_RDY) return; if (modify_virtqueue(ndev, mvq, MLX5_VIRTIO_NET_Q_OBJECT_STATE_SUSPEND)) mlx5_vdpa_warn(&ndev->mvdev, "modify to suspend failed\n"); + + if (query_virtqueue(ndev, mvq, &attr)) { + mlx5_vdpa_warn(&ndev->mvdev, "failed to query virtqueue\n"); + return; + } + mvq->avail_idx =...
2020 Jul 17
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...x5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); >>> + struct mlx5_vdpa_virtqueue *mvq = &ndev->vqs[idx]; >>> + int err; >>> + >>> + if (!mvq->ready && ready && mvq->fw_state != MLX5_VIRTIO_NET_Q_OBJECT_STATE_RDY) { >>> + err = modify_virtqueue(ndev, mvq, MLX5_VIRTIO_NET_Q_OBJECT_STATE_RDY); >>> + if (err) { >>> + mlx5_vdpa_warn(mvdev, "failed to modify virtqueue(%d)\n", err); >>> + return; >>> + } >>> + } >> >> I wonder what's the reason of changing vq state on...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...gt; + attr->state = MLX5_GET(virtio_net_q_object, obj_context, state); > + attr->available_index = MLX5_GET(virtio_net_q_object, obj_context, hw_available_index); > + kfree(out); > + return 0; > + > +err_cmd: > + kfree(out); > + return err; > +} > + > +static int modify_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq, int state) > +{ > + int inlen = MLX5_ST_SZ_BYTES(modify_virtio_net_q_in); > + u32 out[MLX5_ST_SZ_DW(modify_virtio_net_q_out)] = {}; > + void *obj_context; > + void *cmd_hdr; > + void *in; > + int err; > + > + in...