net/enetc: batch process clean Tx ring calls
authorAlex Marginean <alexandru.marginean@nxp.com>
Mon, 2 Mar 2020 14:32:02 +0000 (20:02 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 18 Mar 2020 09:21:41 +0000 (10:21 +0100)
commit9a6d2fae261c64dabbafc981acb8a2940f750204
tree7fcfef9977c97765210d0a91790d62e89209761a
parent8cb6b561eac42261ecbeec9a8de8322cd6deb699
net/enetc: batch process clean Tx ring calls

Each call to enetc_clean_tx_ring will cost at least 150-200 CPU cycles
even if no clean-up is done, due to the CI register read.
We're only calling it once at the end of the function, on the assumption
that software is slower than hardware and hardware completed sending
older frames out by now.
We're also cleaning up the ring before kicking off Tx for the new batch
to minimize chances of contention on the Tx ring.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
drivers/net/enetc/enetc_rxtx.c