]> git.baikalelectronics.ru Git - kernel.git/commit
net: thunderx: Fix for issues with multiple CQEs posted for a TSO packet
authorSunil Goutham <sgoutham@cavium.com>
Tue, 30 Aug 2016 06:06:27 +0000 (11:36 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Sep 2016 21:50:47 +0000 (14:50 -0700)
commitbaf44b6c7b363a2d1a150333b1d6913d77f26efd
tree48fb486737e02a17d63e8e8f4a6395367d64231e
parent66506e57e64e604a1243fc60429240fe668850fc
net: thunderx: Fix for issues with multiple CQEs posted for a TSO packet

On ThunderX 88xx pass 2.x chips when TSO is offloaded to HW,
HW posts a CQE for every TSO segment transmitted. Current code
does handles this, but is prone to issues when segment sizes are
small resulting in SW processing too many CQEs and also at times
frees a SKB which is not yet transmitted.

This patch handles the errata in a different way and eliminates issues
with earlier approach, TSO packet is submitted to HW with post_cqe=0,
so that no CQE is posted upon completion of transmission of TSO packet
but a additional HDR + IMMEDIATE descriptors are added to SQ due to
which a CQE is posted and will have required info to be used while
cleanup in napi. This way only one CQE is posted for a TSO packet.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nic.h
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/cavium/thunder/nicvf_queues.c