gro: add ability to control gro max packet size
authorCoco Li <lixiaoyan@google.com>
Wed, 5 Jan 2022 10:48:38 +0000 (02:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jan 2022 12:27:05 +0000 (12:27 +0000)
commiteac1b93c14d645ef147b049ace0d5230df755548
tree1cbed37768a8189a8ff3cd4c8ca7e542e3595aca
parent007747a984ea5e895b7d8b056b24ebf431e1e71d
gro: add ability to control gro max packet size

Eric Dumazet suggested to allow users to modify max GRO packet size.

We have seen GRO being disabled by users of appliances (such as
wifi access points) because of claimed bufferbloat issues,
or some work arounds in sch_cake, to split GRO/GSO packets.

Instead of disabling GRO completely, one can chose to limit
the maximum packet size of GRO packets, depending on their
latency constraints.

This patch adds a per device gro_max_size attribute
that can be changed with ip link command.

ip link set dev eth0 gro_max_size 16000

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Coco Li <lixiaoyan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/uapi/linux/if_link.h
net/core/dev.c
net/core/gro.c
net/core/rtnetlink.c
tools/include/uapi/linux/if_link.h