net: stmmac: set MSS for each tx DMA channel
authorNiklas Cassel <niklas.cassel@axis.com>
Mon, 19 Feb 2018 17:11:09 +0000 (18:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Feb 2018 19:13:17 +0000 (14:13 -0500)
commit8d212a9ea65af7082adc577ec46b6d1372d0a8f3
tree1db793f4021d35aae7ccaed39625608304ac7867
parent3fef2b6290e85de93a7096381e77f9a1b7544278
net: stmmac: set MSS for each tx DMA channel

The DMA engine in dwmac4 can segment a large TSO packet to several
smaller packets of (max) size Maximum Segment Size (MSS).

The DMA engine fetches and saves the MSS via a context descriptor.

This context decriptor has to be provided to each tx DMA channel.
To ensure that this is done, move struct member mss from stmmac_priv
to stmmac_tx_queue.

stmmac_reset_queues_param() now also resets mss, together with other
queue parameters, so reset of mss value can be removed from
stmmac_resume().

init_dma_tx_desc_rings() now also resets mss, together with other
queue parameters, so reset of mss value can be removed from
stmmac_open().

This fixes tx queue timeouts for dwmac4, with DT property
snps,tx-queues-to-use > 1, when running iperf3 with multiple threads.

Fixes: ce736788e8a9 ("net: stmmac: adding multiple buffers for TX")
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c