net: tso: double TSO_HEADER_SIZE value
Subsystems (2)
PATCH 1/1 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 RX 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.
---
Note: probably needs to stay in net-next for one release cycle.
include/net/tso.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/tso.h +1 -1
@@ -4,7 +4,7 @@#include <net/ip.h> -#define TSO_HEADER_SIZE 128 +#define TSO_HEADER_SIZE 256struct tso_t {int next_frag_idx;
Signature · 1 line
2.27.0.290.gba653c62da-goog
Quoted 7 lines · Eric Dumazet
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.cusually allocates one DMA coherent piece of memory per RX queue, this patch
typo here : TX queue
Quoted 34 lines
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 <[email protected]>Cc Antoine Tenart <[email protected]>---
Note: probably needs to stay in net-next for one release cycle.include/net/tso.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/net/tso.h +1
-2@@ -4,7 +4,7 @@#include <net/ip.h> -#define TSO_HEADER_SIZE 128 +#define TSO_HEADER_SIZE 256struct tso_t {int next_frag_idx; --2.27.0.290.gba653c62da-goog