search for: mlx5_vdpa_get_config

Displaying 5 results from an estimated 5 matches for "mlx5_vdpa_get_config".

2020 Aug 08
0
[PATCH] vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config()
..._vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 3ec44a4f0e45..9d1637cf772e 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -1758,7 +1758,7 @@ static void mlx5_vdpa_get_config(struct vdpa_device *vdev, unsigned int offset, struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); if (offset + len < sizeof(struct virtio_net_config)) - memcpy(buf, &ndev->config + offset, len); + memcpy(buf, (u8 *)&ndev->config + offset, len); } static void mlx5_vd...
2020 Aug 10
1
[PATCH] vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config()
On Sun, Aug 09, 2020 at 06:34:04AM +0000, Eli Cohen wrote: > Acked-by: Eli Cohen <elic at nvidia.com> > > BTW, vdpa_sim has the same bug. > I sent a patch for that on April 6. [PATCH 2/2] vdpa: Fix pointer math bug in vdpasim_get_config() Jason acked the patch but it wasn't applied. regards, dan carpenter
2020 Jul 17
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...he device is limit is much higher. In the near future we > will have a device capability for this. I wanted to stay on the safe side > with this but I can change this if you think it's necessary. I see, that's fine. Let keep this untouched. >>> + >>> +static void mlx5_vdpa_get_config(struct vdpa_device *vdev, unsigned int offset, void *buf, >>> + unsigned int len) >>> +{ >>> + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); >>> + struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); >>> + >>> + if (offset + len < sizeo...
2020 Aug 11
1
[GIT PULL] virtio: features, fixes
...in <mst at redhat.com> ---------------------------------------------------------------- Alex Dewar (1): vdpa/mlx5: Fix uninitialised variable in core/mr.c Colin Ian King (1): vdpa/mlx5: fix memory allocation failure checks Dan Carpenter (2): vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config() vdpa: Fix pointer math bug in vdpasim_get_config() Eli Cohen (9): net/mlx5: Support setting access rights of dma addresses net/mlx5: Add VDPA interface type to supported enumerations net/mlx5: Add interface changes required for VDPA net/vdpa: Use struct for set/get...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...xpect DRIVER_OK to be cleared\n"); > + return; > + } > + } > + > + ndev->mvdev.status = status; > + return; > + > +err_setup: > + mlx5_vdpa_destroy_mr(&ndev->mvdev); > + ndev->mvdev.status |= VIRTIO_CONFIG_S_FAILED; > +} > + > +static void mlx5_vdpa_get_config(struct vdpa_device *vdev, unsigned int offset, void *buf, > + unsigned int len) > +{ > + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); > + struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); > + > + if (offset + len < sizeof(struct virtio_net_config)) > + memcpy(buf,...