search for: mlx5_vdpa_change_map

Displaying 12 results from an estimated 12 matches for "mlx5_vdpa_change_map".

2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...v *dev, u32 *pdn, u16 uid); >> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c >> index 3a6dbbc6..daac3ab 100644 >> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c >> +++ b/drivers/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) > One more thought, &...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...(struct mlx5_vdpa_dev *dev, u32 *pdn, u16 uid); > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 3a6dbbc6..daac3ab 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/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) One more thought, Does this mean set_map() i...
2020 Sep 09
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...a/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > b/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > index 9df69d5efe8c..c89cd48a0aab 100644 > > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.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; > > > + > > > > I...
2023 Feb 15
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...int mlx5_vdpa_alloc_pd(struct mlx5_vdpa_dev *dev, u32 *pdn, u16 uid); diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 3a6dbbc6..daac3ab 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/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(st...
2023 Aug 02
3
[PATCH 0/2] vdpa/mlx5: Fixes for ASID handling
This patch series is based on Eugenio's fix for handling CVQs in a different ASID [0]. The first patch is the actual fix. The next 2 patches are fixing a possible issue that I found while implementing patch 1. The patches are ordered like this for clarity. [0] https://lore.kernel.org/lkml/20230112142218.725622-1-eperezma at redhat.com/ Dragos Tatulea (1): vdpa/mlx5: Fix
2023 Aug 02
3
[PATCH 0/2] vdpa/mlx5: Fixes for ASID handling
This patch series is based on Eugenio's fix for handling CVQs in a different ASID [0]. The first patch is the actual fix. The next 2 patches are fixing a possible issue that I found while implementing patch 1. The patches are ordered like this for clarity. [0] https://lore.kernel.org/lkml/20230112142218.725622-1-eperezma at redhat.com/ Dragos Tatulea (1): vdpa/mlx5: Fix
2020 Sep 07
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...le changed, 3 insertions(+) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c > b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 9df69d5efe8c..c89cd48a0aab 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.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; > + I'm not sure I get this. It looks to me if set_map() is called before DRIVER_OK, we won't build a...
2020 Sep 07
0
[PATCH] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...1 file changed, 3 insertions(+) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 9df69d5efe8c..c89cd48a0aab 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.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
...gt; diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > index 9df69d5efe8c..c89cd48a0aab 100644 > > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.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); > &...
2020 Sep 09
0
[PATCH v2] vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK
...le changed, 3 insertions(+) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c > b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 9df69d5efe8c..c89cd48a0aab 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.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; > + Is there any reason that we still need to do vq suspending and saving before? Thanks > restore_chan...
2020 Jul 17
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...; + >>> + err = mlx5_vdpa_handle_set_map(mvdev, iotlb, &change_map); >>> + if (err) { >>> + mlx5_vdpa_warn(mvdev, "set map failed(%d)\n", err); >>> + return err; >>> + } >>> + >>> + if (change_map) >>> + return mlx5_vdpa_change_map(ndev, iotlb); >> >> Any reason for not doing this inside mlx5_handle_set_map()? >> > All memory registration related operations are done inside mr.c in the > common code directory. But change map involves operations on other > objects managed in this file. Ok. (Note th...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...+ mvq->ready = ri->ready; > + mvq->num_ent = ri->num_ent; > + mvq->desc_addr = ri->desc_addr; > + mvq->device_addr = ri->device_addr; > + mvq->driver_addr = ri->driver_addr; > + mvq->event_cb = ri->cb; > + } > +} > + > +static int mlx5_vdpa_change_map(struct mlx5_vdpa_net *ndev, struct vhost_iotlb *iotlb) > +{ > + int err; > + > + suspend_vqs(ndev); > + err = save_channels_info(ndev); > + if (err) > + goto err_mr; > + > + teardown_driver(ndev); > + mlx5_vdpa_destroy_mr(&ndev->mvdev); > + err = mlx5_vdpa_c...