net: stmmac: Rework TX Coalesce logic
authorJose Abreu <Jose.Abreu@synopsys.com>
Thu, 14 Nov 2019 11:42:50 +0000 (12:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 20:25:41 +0000 (12:25 -0800)
commitc2837423cb54551302f037106830ee607b4563e0
treefed7b9bdf80c400eb2828ecb95eb91ba8ece4677
parentda20245100319b54af770df707f358f2ebc3b16d
net: stmmac: Rework TX Coalesce logic

Coalesce logic currently increments the number of packets and sets the
IC bit when the coalesced packets have passed a given limit. This does
not reflect very well what coalesce was meant for as we can have a large
number of packets that are coalesced and then a single one, sent later
on that has the IC bit.

Rework the logic so that it coalesces only upon a limit of packets and
sets the IC bit for large number of packets.

Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c