summaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner2016-12-05 21:37:13 +0100
committerDavid S. Miller2016-12-06 17:01:19 +0100
commitdcb17d22e1c2cd72e72190c736349a675362b3bc (patch)
tree625a1b7ca8f1ef0004a51aa8287653d603b153fb /drivers/net/virtio_net.c
parentuapi glibc compat: fix outer guard of net device flags enum (diff)
downloadkernel-qcow2-linux-dcb17d22e1c2cd72e72190c736349a675362b3bc.tar.gz
kernel-qcow2-linux-dcb17d22e1c2cd72e72190c736349a675362b3bc.tar.xz
kernel-qcow2-linux-dcb17d22e1c2cd72e72190c736349a675362b3bc.zip
tcp: warn on bogus MSS and try to amend it
There have been some reports lately about TCP connection stalls caused by NIC drivers that aren't setting gso_size on aggregated packets on rx path. This causes TCP to assume that the MSS is actually the size of the aggregated packet, which is invalid. Although the proper fix is to be done at each driver, it's often hard and cumbersome for one to debug, come to such root cause and report/fix it. This patch amends this situation in two ways. First, it adds a warning on when this situation occurs, so it gives a hint to those trying to debug this. It also limit the maximum probed MSS to the adverised MSS, as it should never be any higher than that. The result is that the connection may not have the best performance ever but it shouldn't stall, and the admin will have a hint on what to look for. Tested with virtio by forcing gso_size to 0. v2: updated msg per David's suggestion v3: use skb_iif to find the interface and also log its name, per Eric Dumazet's suggestion. As the skb may be backlogged and the interface gone by then, we need to check if the number still has a meaning. v4: use helper tcp_gro_dev_warn() and avoid pr_warn_once inside __once, per David's suggestion Cc: Jonathan Maxwell <jmaxwell37@gmail.com> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/virtio_net.c')
0 files changed, 0 insertions, 0 deletions