search for: mlx_to_vritio_features

Displaying 7 results from an estimated 7 matches for "mlx_to_vritio_features".

2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...OST_TSO6)) << 8) | + (!!(features & BIT_ULL(VIRTIO_NET_F_CSUM)) << 7) | + (!!(features & BIT_ULL(VIRTIO_NET_F_GUEST_CSUM)) << 6); } static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq) @@ -1439,13 +1439,13 @@ static u64 mlx_to_vritio_features(u16 dev_features) u64 result = 0; if (dev_features & MLX5_VIRTIO_NET_F_GUEST_CSUM) - result |= BIT(VIRTIO_NET_F_GUEST_CSUM); + result |= BIT_ULL(VIRTIO_NET_F_GUEST_CSUM); if (dev_features & MLX5_VIRTIO_NET_F_CSUM) - result |= BIT(VIRTIO_NET_F_CSUM); + result |= BIT_ULL(VIRTIO_NE...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...OST_TSO6)) << 8) | + (!!(features & BIT_ULL(VIRTIO_NET_F_CSUM)) << 7) | + (!!(features & BIT_ULL(VIRTIO_NET_F_GUEST_CSUM)) << 6); } static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq) @@ -1439,13 +1439,13 @@ static u64 mlx_to_vritio_features(u16 dev_features) u64 result = 0; if (dev_features & MLX5_VIRTIO_NET_F_GUEST_CSUM) - result |= BIT(VIRTIO_NET_F_GUEST_CSUM); + result |= BIT_ULL(VIRTIO_NET_F_GUEST_CSUM); if (dev_features & MLX5_VIRTIO_NET_F_CSUM) - result |= BIT(VIRTIO_NET_F_CSUM); + result |= BIT_ULL(VIRTIO_NE...
2020 Aug 21
0
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...+ (!!(features & BIT_ULL(VIRTIO_NET_F_CSUM)) << 7) | > + (!!(features & BIT_ULL(VIRTIO_NET_F_GUEST_CSUM)) << 6); > } > > static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq) > @@ -1439,13 +1439,13 @@ static u64 mlx_to_vritio_features(u16 dev_features) > u64 result = 0; > > if (dev_features & MLX5_VIRTIO_NET_F_GUEST_CSUM) > - result |= BIT(VIRTIO_NET_F_GUEST_CSUM); > + result |= BIT_ULL(VIRTIO_NET_F_GUEST_CSUM); > if (dev_features & MLX5_VIRTIO_NET_F_CSUM) > - result |= BIT(VIRTIO_NET_F_CS...
2023 Mar 21
0
[PATCH v3 1/2] vdpa/mlx5: Extend driver support for new features
...> return MLX5_VDPA_DATAVQ_GROUP; > } > > -enum { MLX5_VIRTIO_NET_F_GUEST_CSUM = 1 << 9, > - MLX5_VIRTIO_NET_F_CSUM = 1 << 10, > - MLX5_VIRTIO_NET_F_HOST_TSO6 = 1 << 11, > - MLX5_VIRTIO_NET_F_HOST_TSO4 = 1 << 12, > -}; > - > static u64 mlx_to_vritio_features(u16 dev_features) > { > u64 result = 0; > > - if (dev_features & MLX5_VIRTIO_NET_F_GUEST_CSUM) > + if (dev_features & BIT_ULL(MLX5_VIRTIO_NET_F_MRG_RXBUF)) > + result += BIT_ULL(VIRTIO_NET_F_MRG_RXBUF); > + if (dev_features & BIT_ULL(MLX5_VIRTIO_NET_F_HOST_...
2023 Mar 17
0
[PATCH v2 1/2] vdpa/mlx5: Extend driver support for new features
...rn MLX5_VDPA_DATAVQ_GROUP; > } > > -enum { MLX5_VIRTIO_NET_F_GUEST_CSUM = 1 << 9, > - MLX5_VIRTIO_NET_F_CSUM = 1 << 10, > - MLX5_VIRTIO_NET_F_HOST_TSO6 = 1 << 11, > - MLX5_VIRTIO_NET_F_HOST_TSO4 = 1 << 12, > -}; > - > static u64 mlx_to_vritio_features(u16 dev_features) > { > u64 result = 0; > > - if (dev_features & MLX5_VIRTIO_NET_F_GUEST_CSUM) > + if (dev_features & BIT_ULL(MLX5_VIRTIO_NET_F_MRG_RXBUF)) > + result += BIT_ULL(VIRTIO_NET_F_MRG_RXBUF); > + if (dev_features &...
2020 Jul 17
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
..._vdpa_dev *mvdev = to_mvdev(vdev); >>> + struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); >>> + u16 dev_features; >>> + >>> + dev_features = MLX5_CAP_DEV_VDPA_EMULATION(mvdev->mdev, device_features_bits_mask); >>> + ndev->mvdev.mlx_features = mlx_to_vritio_features(dev_features); >>> + if (MLX5_CAP_DEV_VDPA_EMULATION(mvdev->mdev, virtio_version_1_0)) >>> + ndev->mvdev.mlx_features |= BIT(VIRTIO_F_VERSION_1); >> >> This is interesting. This suggests !VIRTIO_F_VERSION_1 && >> VIRTIO_F_IOMMU_PLATFORM is valid. B...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...ce *vdev) > +{ > + return PAGE_SIZE; > +} > + > +enum { MLX5_VIRTIO_NET_F_GUEST_CSUM = 1 << 9, > + MLX5_VIRTIO_NET_F_CSUM = 1 << 10, > + MLX5_VIRTIO_NET_F_HOST_TSO6 = 1 << 11, > + MLX5_VIRTIO_NET_F_HOST_TSO4 = 1 << 12, > +}; > + > +static u64 mlx_to_vritio_features(u16 dev_features) > +{ > + u64 result = 0; > + > + if (dev_features & MLX5_VIRTIO_NET_F_GUEST_CSUM) > + result |= BIT(VIRTIO_NET_F_GUEST_CSUM); > + if (dev_features & MLX5_VIRTIO_NET_F_CSUM) > + result |= BIT(VIRTIO_NET_F_CSUM); > + if (dev_features & MLX5_VIRT...