Displaying 9 results from an estimated 9 matches for "restore_channels_info".
2023 Feb 15
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
.../vdpa/mlx5/net/mlx5_vnet.c
@@ -2411,7 +2411,7 @@ static int mlx5_vdpa_change_map(struct mlx5_vdpa_dev *mvdev,
if (err)
goto err_mr;
- if (!(mvdev->status & VIRTIO_CONFIG_S_DRIVER_OK))
+ if (!(mvdev->status & VIRTIO_CONFIG_S_DRIVER_OK) || mvdev->suspended)
goto err_mr;
restore_channels_info(ndev);
@@ -2579,6 +2579,7 @@ static int mlx5_vdpa_reset(struct vdpa_device *vdev)
clear_vqs_ready(ndev);
mlx5_vdpa_destroy_mr(&ndev->mvdev);
ndev->mvdev.status = 0;
+ ndev->mvdev.suspended = false;
ndev->cur_num_vqs = 0;
ndev->mvdev.cvq.received_desc = 0;
ndev->mvd...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...f (!(mvdev->status & VIRTIO_CONFIG_S_DRIVER_OK) || mvdev->suspended)
One more thought,
Does this mean set_map() is forbidden during suspending? I'm not sure
this is correct or at least we need restrict in in the vDPA core.
Thanks
> goto err_mr;
>
> restore_channels_info(ndev);
> @@ -2579,6 +2579,7 @@ static int mlx5_vdpa_reset(struct vdpa_device *vdev)
> clear_vqs_ready(ndev);
> mlx5_vdpa_destroy_mr(&ndev->mvdev);
> ndev->mvdev.status = 0;
> + ndev->mvdev.suspended = false;
> ndev->cur_num_vqs...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...is suspended. The "goto err_mr" below
actually returns 0 when it leaves mlx5_vdpa_change_map().
-Siwei
> I'm not sure
> this is correct or at least we need restrict in in the vDPA core.
>
> Thanks
>
>> goto err_mr;
>>
>> restore_channels_info(ndev);
>> @@ -2579,6 +2579,7 @@ static int mlx5_vdpa_reset(struct vdpa_device *vdev)
>> clear_vqs_ready(ndev);
>> mlx5_vdpa_destroy_mr(&ndev->mvdev);
>> ndev->mvdev.status = 0;
>> + ndev->mvdev.suspended = false;
>>...
2020 Sep 07
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...ndev, struct vhost_iotlb *
> if (err)
> goto err_mr;
>
> + if (!(ndev->mvdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
> + return 0;
> +
I'm not sure I get this.
It looks to me if set_map() is called before DRIVER_OK, we won't build
any mapping?
Thanks
> restore_channels_info(ndev);
> err = setup_driver(ndev);
> if (err)
> --
> 2.26.0
>
>
2020 Sep 07
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -1645,6 +1645,9 @@ static int mlx5_vdpa_change_map(struct mlx5_vdpa_net *ndev, struct vhost_iotlb *
> if (err)
> goto err_mr;
>
> + if (!(ndev->mvdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
> + return 0;
> +
> restore_channels_info(ndev);
> err = setup_driver(ndev);
> if (err)
> --
> 2.26.0
2020 Sep 08
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...@@ static int mlx5_vdpa_change_map(struct mlx5_vdpa_net *ndev, struct vhost_iotlb *
> > > if (err)
> > > goto err_mr;
> > >
> > > + if (!(ndev->mvdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
> > > + return 0;
> > > +
> > > restore_channels_info(ndev);
> > > err = setup_driver(ndev);
> > > if (err)
> > > --
> > > 2.26.0
> >
2020 Sep 09
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...calls
> to set_map which result in calls to mlx5_vdpa_change_map().
> If that happens before VIRTIO_CONFIG_S_DRIVER_OK then Imay fail (in case
> I was not called to set VQs ready).
Right, this could be solved by adding the batched IOTLB updating.
Thanks
>
> >
> > > restore_channels_info(ndev);
> > > err = setup_driver(ndev);
> > > if (err)
> > > --
> > > 2.26.0
> > >
> > >
> >
>
>
2020 Sep 09
0
[PATCH v2] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...a_change_map(struct mlx5_vdpa_net
> *ndev, struct vhost_iotlb *
> if (err)
> goto err_mr;
>
> + if (!(ndev->mvdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
> + return 0;
> +
Is there any reason that we still need to do vq suspending and saving before?
Thanks
> restore_channels_info(ndev);
> err = setup_driver(ndev);
> if (err)
> --
> 2.26.0
>
>
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...t; + }
> + return 0;
> +}
> +
> +static void mlx5_clear_vqs(struct mlx5_vdpa_net *ndev)
> +{
> + int i;
> +
> + for (i = 0; i < ndev->mvdev.max_vqs; i++)
> + memset(&ndev->vqs[i], 0, offsetof(struct mlx5_vdpa_virtqueue, ri));
> +}
> +
> +static void restore_channels_info(struct mlx5_vdpa_net *ndev)
> +{
> + struct mlx5_vdpa_virtqueue *mvq;
> + struct mlx5_vq_restore_info *ri;
> + int i;
> +
> + mlx5_clear_vqs(ndev);
> + init_mvqs(ndev);
> + for (i = 0; i < ndev->mvdev.max_vqs; i++) {
> + mvq = &ndev->vqs[i];
> + ri = &am...