]> git.baikalelectronics.ru Git - kernel.git/commit
net: tso: double TSO_HEADER_SIZE value
authorEric Dumazet <edumazet@google.com>
Thu, 18 Jun 2020 03:53:22 +0000 (20:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2020 03:46:23 +0000 (20:46 -0700)
commit57d64dbc1b13f3229dad5a943d2a7fafbc327ed5
tree7873843d8ff6a13724e68b3bd4fa4ada0bd018e1
parent256fa3ff6c7292060a76f02b09d47d586f64c640
net: tso: double TSO_HEADER_SIZE value

Transport header size could be 60 bytes, and network header
size can also be 60 bytes. Add the Ethernet header and we
are above 128 bytes.

Since drivers using net/core/tso.c usually allocates
one DMA coherent piece of memory per TX queue, this patch
might cause issues if a driver was using too many slots.

For 1024 slots, we would need 256 KB of physically
contiguous memory instead of 128 KB.

Alternative fix would be to add checks in the fast path,
but this involves more work in all drivers using net/core/tso.c.

Fixes: 751e070fca71 ("net: define the TSO header size in net/tso.h")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tso.h