2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 15:43:59 +08:00
linux-next/drivers/net/xen-netback
Juergen Gross be81992f90 xen/netback: don't queue unlimited number of packages
In case a guest isn't consuming incoming network traffic as fast as it
is coming in, xen-netback is buffering network packages in unlimited
numbers today. This can result in host OOM situations.

Commit f48da8b14d ("xen-netback: fix unlimited guest Rx internal
queue and carrier flapping") meant to introduce a mechanism to limit
the amount of buffered data by stopping the Tx queue when reaching the
data limit, but this doesn't work for cases like UDP.

When hitting the limit don't queue further SKBs, but drop them instead.
In order to be able to tell Rx packages have been dropped increment the
rx_dropped statistics counter in this case.

It should be noted that the old solution to continue queueing SKBs had
the additional problem of an overflow of the 32-bit rx_queue_len value
would result in intermittent Tx queue enabling.

This is part of XSA-392

Fixes: f48da8b14d ("xen-netback: fix unlimited guest Rx internal queue and carrier flapping")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2021-12-16 08:43:12 +01:00
..
common.h xen/netback: fix rx queue stall detection 2021-12-16 08:42:56 +01:00
hash.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
interface.c net: xen: use eth_hw_addr_set() 2021-10-22 10:15:54 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
netback.c xen-netback: Remove redundant initialization of variable err 2021-10-15 11:02:36 +01:00
rx.c xen/netback: don't queue unlimited number of packages 2021-12-16 08:43:12 +01:00
xenbus.c xen-netback: Check for hotplug-status existence before watching 2021-04-13 15:24:14 -07:00