netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] net: Introduce a software TSO helper API
@ 2014-05-19 16:59 Ezequiel Garcia
  2014-05-19 16:59 ` [PATCH 1/9] net: Add " Ezequiel Garcia
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Ezequiel Garcia @ 2014-05-19 16:59 UTC (permalink / raw)
  To: netdev, David Miller, Eric Dumazet
  Cc: Willy Tarreau, Thomas Petazzoni, Gregory Clement,
	Sebastian Hesselbarth, Tawfik Bayouk, Lior Amsalem,
	Ezequiel Garcia

Here's a first proposal for a generic software TSO helper API, following
David's suggestion.

There are at least two drivers that currently implement some form of software
TSO: Solarflare network driver (drivers/net/ethernet/sfc) and Tilera GX
network driver (drivers/net/ethernet/tile/tilegx.c).

The rationale behind adding a generic API is to provide a boiler plate with the
segmentation and other common tasks, making this support easier to add in other
drivers.

When designing the API, I've considered mainly two design choices:

  1. Implement a series of callbacks that each driver would implement
     and the net core code would call to fill in descriptors and egress
     that data.

  2. Implement an API for drivers to use in a driver's specific tx_tso
     function. This functions would exhaust a sk_buff payload, and use the
     API as helper for building the headers and segmented data.

I've chosen (2), to avoid function pointers (which was Willy's concern) and
because it seemed less fragile. Of course, this is argueable.

The API is by no means complete, and lacks some features, however it allows
to support TSO in mv643xx_eth and mvneta network drivers with some very
good performance results. I've added this support as an example of the API
in action.

In particular the following needs some revisiting:

  1. IPv6 support is lacking.

  2. The required descriptor counting needs some verification. The current
     implementation might be too "sketchy". The tilegx one can be a good
     starting point.

  3. The implemenation assumes the hardware can compute the TCP and IP
     checksums for the built headers. However, some controllers may need
     some initial calculation (such as tilegx, for instance).

Despite this, I hope this proposal is good enough to trigger some discussion
and to check if I'm on the right track. Feedback is much appreciated!

Ezequiel Garcia (9):
  net: Add a software TSO helper API
  net: mvneta: Factorize feature setting
  net: mvneta: Clean mvneta_tx() sk_buff handling
  net: mvneta: Implement software TSO
  net: mv643xx_eth: Factorize initial checksum and command preparation
  net: mv643xx_eth: Avoid setting the initial TCP checksum
  net: mv643xx_eth: Factorize feature setting
  net: mv643xx_eth: Use dma_map_single() to map the skb fragments
  net: mv643xx_eth: Implement software TSO

 drivers/net/ethernet/marvell/mv643xx_eth.c | 304 ++++++++++++++++++++++-------
 drivers/net/ethernet/marvell/mvneta.c      | 172 ++++++++++++++--
 include/net/tso.h                          |  20 ++
 net/core/Makefile                          |   2 +-
 net/core/tso.c                             |  72 +++++++
 5 files changed, 492 insertions(+), 78 deletions(-)
 create mode 100644 include/net/tso.h
 create mode 100644 net/core/tso.c

-- 
1.9.1

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

end of thread, other threads:[~2014-05-22 19:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19 16:59 [PATCH 0/9] net: Introduce a software TSO helper API Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 1/9] net: Add " Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 2/9] net: mvneta: Factorize feature setting Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 3/9] net: mvneta: Clean mvneta_tx() sk_buff handling Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 4/9] net: mvneta: Implement software TSO Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 5/9] net: mv643xx_eth: Factorize initial checksum and command preparation Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 6/9] net: mv643xx_eth: Avoid setting the initial TCP checksum Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 7/9] net: mv643xx_eth: Factorize feature setting Ezequiel Garcia
2014-05-19 16:59 ` [PATCH 8/9] net: mv643xx_eth: Use dma_map_single() to map the skb fragments Ezequiel Garcia
2014-05-19 17:00 ` [PATCH 9/9] net: mv643xx_eth: Implement software TSO Ezequiel Garcia
2014-05-22 18:58 ` [PATCH 0/9] net: Introduce a software TSO helper API David Miller
2014-05-22 19:38   ` Ezequiel Garcia

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).