lan743x: sync only the received area of an rx ring buffer
authorSven Van Asbroeck <thesven73@gmail.com>
Tue, 16 Feb 2021 01:08:03 +0000 (20:08 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2021 23:15:21 +0000 (15:15 -0800)
commit966df6ded24d537834402a421d46ef31b3647a78
tree8d6c6e8c966f88e0e892eb394b47e6e0ba33e062
parenta8db76d40e4d568a9e9cc9fb8d81352b5ff530ee
lan743x: sync only the received area of an rx ring buffer

On cpu architectures w/o dma cache snooping, dma_unmap() is a
is a very expensive operation, because its resulting sync
needs to invalidate cpu caches.

Increase efficiency/performance by syncing only those sections
of the lan743x's rx ring buffers that are actually in use.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Reviewed-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan743x_main.c