summaryrefslogtreecommitdiff
path: root/include/net/tso.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2020-06-18 06:53:22 +0300
committerDavid S. Miller <davem@davemloft.net>2020-06-19 06:46:23 +0300
commit9c77b803f263573b6019e4828825709845c37d45 (patch)
tree7873843d8ff6a13724e68b3bd4fa4ada0bd018e1 /include/net/tso.h
parent393415203f5c916b5907e0a7c89f4c2c5a9c5505 (diff)
downloadlinux-9c77b803f263573b6019e4828825709845c37d45.tar.xz
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: f9cbe9a556af ("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>
Diffstat (limited to 'include/net/tso.h')
-rw-r--r--include/net/tso.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/tso.h b/include/net/tso.h
index 7e166a570349..c33dd00c161f 100644
--- a/include/net/tso.h
+++ b/include/net/tso.h
@@ -4,7 +4,7 @@
#include <net/ip.h>
-#define TSO_HEADER_SIZE 128
+#define TSO_HEADER_SIZE 256
struct tso_t {
int next_frag_idx;