[dpdk-dev] [PATCH v4 2/2] net/tap: support TSO (TCP Segment Offload)

Wiles, Keith keith.wiles at intel.com
Thu Jun 14 14:58:05 CEST 2018



> On Jun 14, 2018, at 2:59 AM, Ophir Munk <ophirmu at mellanox.com> wrote:
> 
> 
> 
>> -----Original Message-----
>> From: Wiles, Keith [mailto:keith.wiles at intel.com]
>> Sent: Wednesday, June 13, 2018 7:04 PM
>> To: Ophir Munk <ophirmu at mellanox.com>
>> Cc: DPDK <dev at dpdk.org>; Pascal Mazon <pascal.mazon at 6wind.com>;
>> Thomas Monjalon <thomas at monjalon.net>; Olga Shern
>> <olgas at mellanox.com>
>> Subject: Re: [PATCH v4 2/2] net/tap: support TSO (TCP Segment Offload)
>> 
>> 
>> 
>>> On Jun 12, 2018, at 11:31 AM, Ophir Munk <ophirmu at mellanox.com>
>> wrote:
>>> 
>>> This commit implements TCP segmentation offload in TAP.
>>> librte_gso library is used to segment large TCP payloads (e.g. packets
>>> of 64K bytes size) into smaller MTU size buffers.
>>> By supporting TSO offload capability in software a TAP device can be
>>> used as a failsafe sub device and be paired with another PCI device
>>> which supports TSO capability in HW.
>>> 
>>> For more details on librte_gso implementation please refer to dpdk
>>> documentation.
>>> The number of newly generated TCP TSO segments is limited to 64.
>>> 
>>> Reviewed-by: Raslan Darawsheh <rasland at mellanox.com>
>>> Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
>>> ---
>>> drivers/net/tap/Makefile      |   2 +-
>>> drivers/net/tap/rte_eth_tap.c | 159
>> +++++++++++++++++++++++++++++++++++-------
>>> drivers/net/tap/rte_eth_tap.h |   3 +
>>> mk/rte.app.mk                 |   4 +-
>>> 4 files changed, 138 insertions(+), 30 deletions(-)
>> 
>> You have setup the mempool with no cache size, which means you have to
>> take a lock for each allocate. This could changed to have a small cache per
>> lcore say 8, but the total number of mbufs needs to be large enough to not
>> allow starvation for a lcore.  total_mbufs = (max_num_ports * cache_size) +
>> some_extra mbufs;
>> 
> 
> I will set cache_size as 4. 
> The total_mbufs should be mbufs_per_core(128) * cache_size(4) where the max_num_ports 
> is already taken into consideration in mbufs_per_core. For example, for a TCP packet of 1024 bytes and TSO max seg size of 256 bytes GSO will allocate 5 mbufs (one direct and four indirect) regardless of the number of ports.

Sounds good, thanks.


Regards,
Keith



More information about the dev mailing list