net:Add sysctl_max_skb_frags
authorHans Westgaard Ry <hans.westgaard.ry@oracle.com>
Wed, 3 Feb 2016 08:26:57 +0000 (09:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2017 08:43:05 +0000 (09:43 +0100)
commitdf93393787a3fc3b994c5061a890b0250bae0fbc
tree8a971649ccb5573fcb38204db242baa00b374cfe
parent1115c5f029831fd3a9f447094069bb01802418a1
net:Add sysctl_max_skb_frags

commit 5f74f82ea34c0da80ea0b49192bb5ea06e063593 upstream.

Devices may have limits on the number of fragments in an skb they support.
Current codebase uses a constant as maximum for number of fragments one
skb can hold and use.
When enabling scatter/gather and running traffic with many small messages
the codebase uses the maximum number of fragments and may thereby violate
the max for certain devices.
The patch introduces a global variable as max number of fragments.

Signed-off-by: Hans Westgaard Ry <hans.westgaard.ry@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/skbuff.h
net/core/skbuff.c
net/core/sysctl_net_core.c
net/ipv4/tcp.c