]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
vdpa/mlx5: should exclude header length and fcs from mtu
authorSi-Wei Liu <si-wei.liu@oracle.com>
Thu, 8 Apr 2021 09:10:43 +0000 (12:10 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:53:45 +0000 (09:53 +0200)
commit241db54236f9e9dce3c3fb6bbe6a85aa4c491ef3
tree9f1265f41e6eb6cd3f1c511f0c6756319b04b546
parent39f2c1e32c0dc352121f595c7609981967932c49
vdpa/mlx5: should exclude header length and fcs from mtu

BugLink: https://bugs.launchpad.net/bugs/1926368
[ Upstream commit d084d996aaf53c0cc583dc75a4fc2a67fe485846 ]

When feature VIRTIO_NET_F_MTU is negotiated on mlx5_vdpa,
22 extra bytes worth of MTU length is shown in guest.
This is because the mlx5_query_port_max_mtu API returns
the "hardware" MTU value, which does not just contain the
 Ethernet payload, but includes extra lengths starting
from the Ethernet header up to the FCS altogether.

Fix the MTU so packets won't get dropped silently.

Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eli Cohen <elic@nvidia.com>
Link: https://lore.kernel.org/r/20210408091047.4269-2-elic@nvidia.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/vdpa/mlx5/core/mlx5_vdpa.h
drivers/vdpa/mlx5/net/mlx5_vnet.c