netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: tso: expand to UDP support
@ 2020-06-17 18:48 Eric Dumazet
  2020-06-17 18:48 ` [PATCH net-next 1/5] net: tso: double TSO_HEADER_SIZE value Eric Dumazet
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Eric Dumazet @ 2020-06-17 18:48 UTC (permalink / raw)
  To: David S . Miller
  Cc: netdev, Eric Dumazet, Eric Dumazet, Willem de Bruijn,
	Antoine Tenart

With QUIC getting more attention these days, it is worth
implementing UDP direct segmentation, the same we did for TCP.

Drivers will need to advertize NETIF_F_GSO_UDP_L4 so that
GSO stack does not do the (more expensive) segmentation.

Eric Dumazet (5):
  net: tso: double TSO_HEADER_SIZE value
  net: tso: shrink struct tso_t
  net: tso: constify tso_count_descs() and friends
  net: tso: cache transport header length
  net: tso: add UDP segmentation support

 .../ethernet/cavium/thunder/nicvf_queues.c    |  5 ++-
 drivers/net/ethernet/freescale/fec_main.c     |  5 +--
 drivers/net/ethernet/marvell/mv643xx_eth.c    |  5 +--
 drivers/net/ethernet/marvell/mvneta.c         |  5 +--
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  6 +--
 .../marvell/octeontx2/nic/otx2_txrx.c         |  6 +--
 include/net/tso.h                             | 23 +++++-----
 net/core/tso.c                                | 44 ++++++++++++-------
 8 files changed, 54 insertions(+), 45 deletions(-)

-- 
2.27.0.290.gba653c62da-goog


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH net-next 1/5] net: tso: double TSO_HEADER_SIZE value
@ 2020-06-17 18:44 Eric Dumazet
  2020-06-17 18:45 ` Eric Dumazet
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Dumazet @ 2020-06-17 18:44 UTC (permalink / raw)
  To: David S . Miller
  Cc: netdev, Eric Dumazet, Eric Dumazet, Willem de Bruijn,
	Antoine Tenart

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>
---
 include/net/tso.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/tso.h b/include/net/tso.h
index 7e166a5703497fadf4662acc474f827b2754da78..c33dd00c161f7a6aa65f586b0ceede46af2e8730 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;
-- 
2.27.0.290.gba653c62da-goog


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-06-18  0:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-17 18:48 [PATCH net-next 0/5] net: tso: expand to UDP support Eric Dumazet
2020-06-17 18:48 ` [PATCH net-next 1/5] net: tso: double TSO_HEADER_SIZE value Eric Dumazet
2020-06-18  0:02   ` Jakub Kicinski
2020-06-18  0:14     ` Eric Dumazet
2020-06-17 18:48 ` [PATCH net-next 2/5] net: tso: shrink struct tso_t Eric Dumazet
2020-06-17 18:48 ` [PATCH net-next 3/5] net: tso: constify tso_count_descs() and friends Eric Dumazet
2020-06-17 18:48 ` [PATCH net-next 4/5] net: tso: cache transport header length Eric Dumazet
2020-06-18  0:03   ` Jakub Kicinski
2020-06-17 18:48 ` [PATCH net-next 5/5] net: tso: add UDP segmentation support Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2020-06-17 18:44 [PATCH net-next 1/5] net: tso: double TSO_HEADER_SIZE value Eric Dumazet
2020-06-17 18:45 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).