From 5d39dc21482aad384d0a34f44cd06cb841a9ee29 Mon Sep 17 00:00:00 2001 From: Ioana Ciocoi Radulescu Date: Mon, 26 Nov 2018 16:27:31 +0000 Subject: dpaa2-eth: Release buffers back to pool on XDP_DROP Instead of freeing the RX buffers, release them back into the pool. We wait for the maximum number of buffers supported by a single release command to accumulate before issuing the command. Also, don't unmap the Rx buffers at the beginning of the Rx routine anymore, since that would require remapping them before release. Instead, just do a DMA sync at first and only unmap if the frame is meant for the stack. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h') diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h index 2873a15b6b28..23cf9d94f233 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h @@ -285,6 +285,8 @@ struct dpaa2_eth_fq { struct dpaa2_eth_ch_xdp { struct bpf_prog *prog; + u64 drop_bufs[DPAA2_ETH_BUFS_PER_CMD]; + int drop_cnt; }; struct dpaa2_eth_channel { -- cgit v1.2.3-59-g8ed1b