aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Cohen <[email protected]>2021-11-24 19:09:49 +0200
committerMichael S. Tsirkin <[email protected]>2022-01-14 18:50:52 -0500
commit60af39c1f4cc92cc2785ef745c0c97558134d539 (patch)
tree0a4c1558a1234fcf92ea692dad9887de1f8810f9
parent57c5a5b304b0d3798b2d3dc75bd6c960d78ee8ff (diff)
net/mlx5_vdpa: Offer VIRTIO_NET_F_MTU when setting MTU
Make sure to offer VIRTIO_NET_F_MTU since we configure the MTU based on what was queried from the device. This allows the virtio driver to allocate large enough buffers based on the reported MTU. Signed-off-by: Eli Cohen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]> Reviewed-by: Si-Wei Liu <[email protected]>
-rw-r--r--drivers/vdpa/mlx5/net/mlx5_vnet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 63813fbb5f62..d8e69340a25a 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -1895,6 +1895,7 @@ static u64 mlx5_vdpa_get_features(struct vdpa_device *vdev)
ndev->mvdev.mlx_features |= BIT_ULL(VIRTIO_NET_F_CTRL_MAC_ADDR);
ndev->mvdev.mlx_features |= BIT_ULL(VIRTIO_NET_F_MQ);
ndev->mvdev.mlx_features |= BIT_ULL(VIRTIO_NET_F_STATUS);
+ ndev->mvdev.mlx_features |= BIT_ULL(VIRTIO_NET_F_MTU);
print_features(mvdev, ndev->mvdev.mlx_features, false);
return ndev->mvdev.mlx_features;