search for: mlx5_vdpa_dev

Displaying 20 results from an estimated 43 matches for "mlx5_vdpa_dev".

2020 Sep 28
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...it); > +module_exit(mlx5_vdpa_core_exit); > diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c > index ef1c550f8266..c093eab6c714 100644 > --- a/drivers/vdpa/mlx5/core/mr.c > +++ b/drivers/vdpa/mlx5/core/mr.c > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > mutex_unlock(&mr->mkey_mtx); > return err; > } > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) > { > @@ -456,6 +457,7 @@ void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvd...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...> > diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c > > > index ef1c550f8266..c093eab6c714 100644 > > > --- a/drivers/vdpa/mlx5/core/mr.c > > > +++ b/drivers/vdpa/mlx5/core/mr.c > > > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > > > mutex_unlock(&mr->mkey_mtx); > > > return err; > > > } > > > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > > > > > void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) > > > { > &...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
.../core/mr.c b/drivers/vdpa/mlx5/core/mr.c > > > > > index ef1c550f8266..c093eab6c714 100644 > > > > > --- a/drivers/vdpa/mlx5/core/mr.c > > > > > +++ b/drivers/vdpa/mlx5/core/mr.c > > > > > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > > > > > mutex_unlock(&mr->mkey_mtx); > > > > > return err; > > > > > } > > > > > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > > > > > > > > > void mlx5_vdpa_dest...
2023 Sep 09
0
[PATCH RFC v2 2/4] vdpa/mlx5: implement .reset_map driver op
...3 files changed, 56 insertions(+), 33 deletions(-) diff --git a/drivers/vdpa/mlx5/core/mlx5_vdpa.h b/drivers/vdpa/mlx5/core/mlx5_vdpa.h index b53420e..5c9a25a 100644 --- a/drivers/vdpa/mlx5/core/mlx5_vdpa.h +++ b/drivers/vdpa/mlx5/core/mlx5_vdpa.h @@ -123,6 +123,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb, unsigned int asid); void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev); void mlx5_vdpa_destroy_mr_asid(struct mlx5_vdpa_dev *mvdev, unsigned int asid); +int mlx5_vdpa_reset_mr(struct mlx5_vdpa_dev *mvdev, unsigned int asid); #define mlx5_vdpa_warn(__d...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...> > > > > > > index ef1c550f8266..c093eab6c714 100644 > > > > > > > --- a/drivers/vdpa/mlx5/core/mr.c > > > > > > > +++ b/drivers/vdpa/mlx5/core/mr.c > > > > > > > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > > > > > > > mutex_unlock(&mr->mkey_mtx); > > > > > > > return err; > > > > > > > } > > > > > > > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > > > > > &g...
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
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
2023 Feb 15
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...), syndrome (0x5fa1c), err(-22) Fixes: cae15c2ed8e6 ("vdpa/mlx5: Implement susupend virtqueue callback") Cc: Eli Cohen <elic at nvidia.com> Signed-off-by: Si-Wei Liu <si-wei.liu at oracle.com> Reviewed-by: Eli Cohen <elic at nvidia.com> --- v3: move suspended to struct mlx5_vdpa_dev v2: removed the change for improving warning message --- drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 + drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/core/mlx5_vdpa.h b/drivers/vdpa/mlx5/core/mlx5_vdpa.h index 058fbe2..25f...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...gt; Fixes: cae15c2ed8e6 ("vdpa/mlx5: Implement susupend virtqueue callback") > Cc: Eli Cohen <elic at nvidia.com> > Signed-off-by: Si-Wei Liu <si-wei.liu at oracle.com> > Reviewed-by: Eli Cohen <elic at nvidia.com> > > --- > v3: move suspended to struct mlx5_vdpa_dev > v2: removed the change for improving warning message > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 + > drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++++- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/vdpa/mlx5/core/mlx5_vdpa.h b/drivers/vdpa/mlx5/c...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...("vdpa/mlx5: Implement susupend virtqueue callback") >> Cc: Eli Cohen <elic at nvidia.com> >> Signed-off-by: Si-Wei Liu <si-wei.liu at oracle.com> >> Reviewed-by: Eli Cohen <elic at nvidia.com> >> >> --- >> v3: move suspended to struct mlx5_vdpa_dev >> v2: removed the change for improving warning message >> --- >> drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 + >> drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++++- >> 2 files changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/vdpa/mlx5/core/ml...
2020 Jul 17
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...has a check of mvq->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_VIRTI...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
.../mlx5_vnet.o core/resources.o core/mr.o > diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c > index 975aa45fd78b..34e3bbb80df8 100644 > --- a/drivers/vdpa/mlx5/core/mr.c > +++ b/drivers/vdpa/mlx5/core/mr.c > @@ -453,7 +453,7 @@ int mlx5_vdpa_handle_set_map(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *io > bool *change_map) > { > struct mlx5_vdpa_mr *mr = &mvdev->mr; > - int err; > + int err = 0; > > *change_map = false; > if (map_empty(iotlb)) { > diff --git a/drivers/vdpa/mlx5/net/main.c b/drivers/vdpa/mlx5/n...
2023 Mar 27
0
[PATCH] vdpa/mlx5: Avoid losing link state updates
...ons(-) > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > index 520646ae7fa0..20d415e25aeb 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -2298,10 +2298,62 @@ static void update_cvq_info(struct mlx5_vdpa_dev *mvdev) > } > } > > +static bool f_status_was_set(u64 old, u64 new) > +{ > + if (!(old & BIT_ULL(VIRTIO_NET_F_STATUS)) && > + (new & BIT_ULL(VIRTIO_NET_F_STATUS))) > + return true; > + > + return false; > +} > + > +static u8 query_vpo...
2023 Apr 03
0
[Patch v3] vdpa/mlx5: Avoid losing link state updates
...s/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c > >> index 317cef9b7813..9b1432e22540 100644 > >> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > >> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > >> @@ -2322,10 +2322,115 @@ static void update_cvq_info(struct mlx5_vdpa_dev *mvdev) > >> } > >> } > >> > >> +static u8 query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport) > >> +{ > >> + u32 out[MLX5_ST_SZ_DW(query_vport_state_out)] = {}; > >> + u32 in[MLX5_ST_SZ_DW(query_vp...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...+), 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) | BIT(VIRTIO_NET_F_MTU) | BIT(VIRTIO_NET_F_MAC) |...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...+), 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) | BIT(VIRTIO_NET_F_MTU) | BIT(VIRTIO_NET_F_MAC) |...
2020 Jul 16
0
[PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
...4 | MLX5_SET(create_mkey_in, in, uid, mvdev->res.uid); | ^~~~~~~~ drivers/vdpa/mlx5/core/mr.c: At top level: >> drivers/vdpa/mlx5/core/mr.c:414:5: warning: no previous prototype for 'mlx5_vdpa_create_mr' [-Wmissing-prototypes] 414 | int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) | ^~~~~~~~~~~~~~~~~~~ >> drivers/vdpa/mlx5/core/mr.c:425:6: warning: no previous prototype for 'mlx5_vdpa_destroy_mr' [-Wmissing-prototypes] 425 | void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) | ^~~~~~~~~~~~~~...
2020 Aug 10
0
[PATCH] vdpa/mlx5: fix up endian-ness for mtu
...ruct mlx5_flow_handle *rx_rule; bool setup; + u16 mtu; }; static void free_resources(struct mlx5_vdpa_net *ndev); @@ -1506,6 +1507,13 @@ static void teardown_virtqueues(struct mlx5_vdpa_net *ndev) } } +/* TODO: cross-endian support */ +static inline 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_v...