search for: to_mvdev

Displaying 18 results from an estimated 18 matches for "to_mvdev".

Did you mean: to_micvdev
2020 Jul 17
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...;num_ent, any reason >> not doing it here? >> > Looks like checking intialized is enough. Will fix this. > >>> + >>> +static void mlx5_vdpa_set_vq_ready(struct vdpa_device *vdev, u16 idx, bool ready) >>> +{ >>> + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); >>> + struct mlx5_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_STA...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...mlx5/device.h> > +#include <linux/mlx5/vport.h> > +#include <linux/mlx5/fs.h> > +#include <linux/mlx5/device.h> > +#include "mlx5_vnet.h" > +#include "../core/mlx5_vdpa_ifc.h" > +#include "../core/mlx5_vdpa.h" > + > +#define to_mvdev(__vdev) container_of((__vdev), struct mlx5_vdpa_dev, vdev) > + > +#define VALID_FEATURES_MASK \ > + (BIT(VIRTIO_NET_F_CSUM) | BIT(VIRTIO_NET_F_GUEST_CSUM) | \ > + BIT(VIRTIO_NET_F_C...
2023 Jul 04
1
[PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK
...t_backend_features(const struct vdpa_device *vdpa) >> +{ >> + return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK); >> +} >> + >> static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features) >> { >> struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); >> @@ -3140,6 +3146,7 @@ static const struct vdpa_config_ops mlx5_vdpa_ops = { >> .get_vq_align = mlx5_vdpa_get_vq_align, >> .get_vq_group = mlx5_vdpa_get_vq_group, >> .get_device_features = mlx5_vdpa_get_device_features, >> + .get_backend_features = ml...
2023 Jan 16
0
[PATCH 5/5] vdpa: mlx5: support per virtqueue dma device
...; @@ -2682,6 +2682,16 @@ static int mlx5_vdpa_set_map(struct vdpa_device > > *vdev, unsigned int asid, > > return err; > > } > > > > +struct device *mlx5_get_vq_dma_dev(struct vdpa_device *vdev, u16 idx) > > +{ > > + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); > > + > > + if (is_ctrl_vq_idx(mvdev, idx)) > > + return &vdev->dev; > > + > > + return mvdev->vdev.dma_dev; > > +} > > + > > static void mlx5_vdpa_free(struct vdpa_device *vdev) > > { > > struc...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 9df69d5efe8c..70676a6d1691 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -16,19 +16,19 @@ #define to_mvdev(__vdev) container_of((__vdev), struct mlx5_vdpa_dev, vdev) #define VALID_FEATURES_MASK \ - (BIT(VIRTIO_NET_F_CSUM) | BIT(VIRTIO_NET_F_GUEST_CSUM) | \ - BIT(VIRTIO_NET_F_CTRL_GUEST_OFFLOADS)...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 9df69d5efe8c..70676a6d1691 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -16,19 +16,19 @@ #define to_mvdev(__vdev) container_of((__vdev), struct mlx5_vdpa_dev, vdev) #define VALID_FEATURES_MASK \ - (BIT(VIRTIO_NET_F_CSUM) | BIT(VIRTIO_NET_F_GUEST_CSUM) | \ - BIT(VIRTIO_NET_F_CTRL_GUEST_OFFLOADS)...
2023 Sep 09
0
[PATCH RFC v2 2/4] vdpa/mlx5: implement .reset_map driver op
...R failed\n"); - } up_write(&ndev->reslock); return 0; @@ -2903,6 +2898,18 @@ static int mlx5_vdpa_set_map(struct vdpa_device *vdev, unsigned int asid, return err; } +static int mlx5_vdpa_reset_map(struct vdpa_device *vdev, unsigned int asid) +{ + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); + struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); + int err; + + down_write(&ndev->reslock); + err = mlx5_vdpa_reset_mr(mvdev, asid); + up_write(&ndev->reslock); + return err; +} + static struct device *mlx5_get_vq_dma_dev(struct vdpa_device *vdev, u16 idx) { struct...
2020 Jul 20
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...+0800, Jason Wang wrote: >>> Looks like checking intialized is enough. Will fix this. >>>>> + >>>>> +static void mlx5_vdpa_set_vq_ready(struct vdpa_device *vdev, u16 idx, bool ready) >>>>> +{ >>>>> + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); >>>>> + struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); >>>>> + struct mlx5_vdpa_virtqueue *mvq = &ndev->vqs[idx]; >>>>> + int err; >>>>> + >>>>> + if (!mvq->ready && ready && mvq->...
2020 Aug 10
0
[PATCH] vdpa/mlx5: fix up endian-ness for mtu
...ne bool mlx5_vdpa_is_little_endian(struct mlx5_vdpa_dev *mvdev) +{ + return virtio_legacy_is_little_endian() || + (mvdev->actual_features & (1ULL << VIRTIO_F_VERSION_1)); +} + static int mlx5_vdpa_set_features(struct vdpa_device *vdev, u64 features) { struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); @@ -1519,6 +1527,8 @@ static int mlx5_vdpa_set_features(struct vdpa_device *vdev, u64 features) return err; ndev->mvdev.actual_features = features & ndev->mvdev.mlx_features; + ndev->config.mtu = __cpu_to_virtio16(mlx5_vdpa_is_little_endian(mvdev), + ndev->mtu...
2023 Jul 03
1
[PATCH] mlx5_vdpa: offer VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK
...> +static u64 mlx5_vdpa_get_backend_features(const struct vdpa_device *vdpa) > +{ > + return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK); > +} > + > static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features) > { > struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); > @@ -3140,6 +3146,7 @@ static const struct vdpa_config_ops mlx5_vdpa_ops = { > .get_vq_align = mlx5_vdpa_get_vq_align, > .get_vq_group = mlx5_vdpa_get_vq_group, > .get_device_features = mlx5_vdpa_get_device_features, > + .get_backend_features = mlx5_vdpa_get_backend_fea...
2023 Sep 09
4
[PATCH RFC v2 0/4] vdpa: decouple reset of iotlb mapping from device reset
In order to reduce needlessly high setup and teardown cost of iotlb mapping during live migration, it's crucial to decouple the vhost-vdpa iotlb abstraction from the virtio device life cycle, i.e. iotlb mappings should be left intact across virtio device reset [1]. For it to work, the on-chip IOMMU parent device should implement a separate .reset_map() operation callback to restore 1:1 DMA
2023 Sep 09
4
[PATCH RFC v3 0/4] vdpa: decouple reset of iotlb mapping from device reset
In order to reduce needlessly high setup and teardown cost of iotlb mapping during live migration, it's crucial to decouple the vhost-vdpa iotlb abstraction from the virtio device life cycle, i.e. iotlb mappings should be left intact across virtio device reset [1]. For it to work, the on-chip IOMMU parent device should implement a separate .reset_map() operation callback to restore 1:1 DMA
2020 Aug 21
0
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...insertions(+), 25 deletions(-) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 9df69d5efe8c..70676a6d1691 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -16,19 +16,19 @@ > #define to_mvdev(__vdev) container_of((__vdev), struct mlx5_vdpa_dev, vdev) > > #define VALID_FEATURES_MASK \ > - (BIT(VIRTIO_NET_F_CSUM) | BIT(VIRTIO_NET_F_GUEST_CSUM) | \ > - BIT(VIRTIO_NET_F_C...
2023 Mar 27
0
[PATCH] vdpa/mlx5: Avoid losing link state updates
...K_UP); > + else > + ndev->config.status &= cpu_to_mlx5vdpa16(mvdev, ~VIRTIO_NET_S_LINK_UP); > + spin_unlock(&ndev->status_lock); > +} > + > static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features) > { > struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); > struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); > + u64 cur_features; > int err; > > print_features(mvdev, features, true); > @@ -2310,7 +2362,11 @@ static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features) > if (err) > ret...
2023 Apr 03
0
[Patch v3] vdpa/mlx5: Avoid losing link state updates
...> > device del). > > > >> + flush_workqueue(ndev->mvdev.wq); > >> +} > >> + > >> static int mlx5_vdpa_set_driver_features(struct vdpa_device *vdev, u64 features) > >> { > >> struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); > >> struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); > >> + u64 old; > >> int err; > >> > >> print_features(mvdev, features, true); > >> @@ -2334,7 +2439,11 @@ static int mlx5_vdpa_set_driver_featur...
2020 Nov 01
12
[PATCH mlx5-next v1 00/11] Convert mlx5 to use auxiliary bus
From: Leon Romanovsky <leonro at nvidia.com> Changelog: v1: * Renamed _mlx5_rescan_driver to be mlx5_rescan_driver_locked like in other parts of the mlx5 driver. * Renamed MLX5_INTERFACE_PROTOCOL_VDPA to tbe MLX5_INTERFACE_PROTOCOL_VNET as a preparation to coming series from Eli C. * Some small naming renames in mlx5_vdpa. * Refactored adev index code to make Parav's SF series
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is