]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 19 Oct 2019 08:13:23 +0000 (10:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2019 17:36:07 +0000 (10:36 -0700)
commitf4db4774460d0d2c1c808528d9f7588f9f4fceae
treebfe4cd0f3579d6d0821326081954d4dca365ae85
parent110f0fb7046f6966d868a934900920c999e7101f
net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine

Refactor mvneta_rx_swbm code introducing mvneta_swbm_rx_frame and
mvneta_swbm_add_rx_fragment routines. Rely on build_skb in oreder to
allocate skb since the previous patch introduced buffer recycling using
the page_pool API.
This patch fixes even an issue in the original driver where dma buffers
are accessed before dma sync.
mvneta driver can run on not cache coherent devices so it is
necessary to sync DMA buffers before sending them to the device
in order to avoid memory corruptions. Running perf analysis we can
see a performance cost associated with this DMA-sync (anyway it is
already there in the original driver code). In follow up patches we
will add more logic to reduce DMA-sync as much as possible.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c