dpaa2-eth: extract the S/G table buffer cache interaction into functions
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 9 Feb 2022 09:23:31 +0000 (11:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 13:15:34 +0000 (13:15 +0000)
commitae3b08177529b8ad68f4e755a3970d1faac8df21
tree402527863b34e63096a42314105df92959866c81
parent8378a7910d1401885114647a63ea099667754707
dpaa2-eth: extract the S/G table buffer cache interaction into functions

The dpaa2-eth driver uses in certain circumstances a buffer cache for
the S/G tables needed in case of a S/G FD. At the moment, the
interraction with the cache is open-coded and couldn't be reused easily.

Add two new functions - dpaa2_eth_sgt_get and dpaa2_eth_sgt_recycle -
which help with code reusability.

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