net: mvneta: add xmit_more support
commit2a90f7e1d5d04e4f1060268e0b55a2c702bbd67a
authorSimon Guinot <simon.guinot@sequanux.org>
Mon, 16 Jan 2017 17:08:31 +0000 (16 18:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Jan 2017 01:07:29 +0000 (16 20:07 -0500)
tree2a951c0a3e43f7eb15c15525bf53ac949ce3ff56
parenta3308d8fd1f58c67aaae52d9468791c2082ab2c7
net: mvneta: add xmit_more support

Basing on xmit_more flag of the skb, TX descriptors can be concatenated
before flushing. This commit delay Tx descriptor flush if the queue is
running and if there is more skb's to send.

A maximum allowed number of descriptors for flushing at once due to
MVNETA_TXQ_UPDATE_REG(q) reqisters limitation, is 255. Because of that
a new macro was added (MVNETA_TXQ_DEC_SENT_MASK) in order to ensure that
concatenated amount of descriptor does not exceed that value.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c