]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-eth: use the S/G table cache also for the normal S/G path
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 9 Feb 2022 09:23:32 +0000 (11:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 13:15:34 +0000 (13:15 +0000)
commit45c4bba6cfe78a5ed4fb490faa4b85fbf723dc30
tree807e3d04feb63561d9f954267893711e98e52306
parentaaa68b35c90e477a3ff92c2cc00037b847d0ebbc
dpaa2-eth: use the S/G table cache also for the normal S/G path

Instead of allocating memory for an S/G table each time a nonlinear skb
is processed, and then freeing it on the Tx confirmation path, use the
S/G table cache in order to reuse the memory.

For this to work we have to change the size of the cached buffers so
that it can hold the maximum number of scatterlist entries.

Other than that, each allocate/free call is replaced by a call to the
dpaa2_eth_sgt_get/dpaa2_eth_sgt_recycle functions, introduced in the
previous patch.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h