From: David S. Miller Date: Thu, 22 May 2014 18:57:40 +0000 (-0400) Subject: Merge branch 'sw_tso' X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fddb88723c918a4213e4e0f8ab0a1a55811b61d3;p=linux-beck.git Merge branch 'sw_tso' Ezequiel Garcia says: ==================== net: Introduce a software TSO helper API 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! ==================== Signed-off-by: David S. Miller --- fddb88723c918a4213e4e0f8ab0a1a55811b61d3