OSDN Git Service

net: mvpp2: limit TSO segments and use stop/wake thresholds
authorAntoine Tenart <antoine.tenart@free-electrons.com>
Mon, 30 Oct 2017 10:23:31 +0000 (11:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Nov 2017 03:28:33 +0000 (12:28 +0900)
commit1d17db08c056c1f7f4abbff6aff8711b7c3a3b7f
tree0e6904dc0aefda40c7cac7639c4761bed6447cd5
parent1d7d15d79fb4660bec3a86e748c50aac7c5d2121
net: mvpp2: limit TSO segments and use stop/wake thresholds

Too many TSO descriptors can be required for the default queue size,
when using small MSS values for example. Prevent this by adding a
maximum number of allowed TSO segments (300). In addition set a stop and
a wake thresholds to stop the queue when there's no room for a 1 "worst
case scenario skb". Wake up the queue when the number of descriptors is
low enough.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c