mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
net: allow gro_max_size to exceed 65536
Allow the gro_max_size to exceed a value larger than 65536. There weren't really any external limitations that prevented this other than the fact that IPv4 only supports a 16 bit length field. Since we have the option of adding a hop-by-hop header for IPv6 we can allow IPv6 to exceed this value and for IPv4 and non-TCP flows we can cap things at 65536 via a constant rather than relying on gro_max_size. [edumazet] limit GRO_MAX_SIZE to (8 * 65535) to avoid overflows. Signed-off-by: Alexander Duyck <alexanderduyck@fb.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
81fbc81213
commit
0fe79f28bf
6 changed files with 16 additions and 12 deletions
|
@ -2161,7 +2161,11 @@ struct net_device {
|
|||
struct bpf_prog __rcu *xdp_prog;
|
||||
unsigned long gro_flush_timeout;
|
||||
int napi_defer_hard_irqs;
|
||||
#define GRO_MAX_SIZE 65536
|
||||
#define GRO_LEGACY_MAX_SIZE 65536u
|
||||
/* TCP minimal MSS is 8 (TCP_MIN_GSO_SIZE),
|
||||
* and shinfo->gso_segs is a 16bit field.
|
||||
*/
|
||||
#define GRO_MAX_SIZE (8 * 65535u)
|
||||
unsigned int gro_max_size;
|
||||
rx_handler_func_t __rcu *rx_handler;
|
||||
void __rcu *rx_handler_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue