diff mbox series

[net-next,2/3] dpaa2-eth: use indirect calls wrapper for FD consume

Message ID 20210316144730.2150767-3-ciorneiioana@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series dpaa2-eth: use indirect call wrappers | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit fail Errors and warnings before: 16 this patch: 20
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch warning WARNING: line length of 95 exceeds 80 columns
netdev/build_allmodconfig_warn fail Errors and warnings before: 16 this patch: 20
netdev/header_inline success Link

Commit Message

Ioana Ciornei March 16, 2021, 2:47 p.m. UTC
From: Ioana Ciornei <ioana.ciornei@nxp.com>

We can avoid an indirect call per Rx packet by wrapping the consume
function on a frame descriptor with the appropriate helper.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index 7702b921ab0b..4ea0bbd9e4c2 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -605,7 +605,8 @@  static int dpaa2_eth_consume_frames(struct dpaa2_eth_channel *ch,
 		fd = dpaa2_dq_fd(dq);
 		fq = (struct dpaa2_eth_fq *)(uintptr_t)dpaa2_dq_fqd_ctx(dq);
 
-		fq->consume(priv, ch, fd, fq);
+		INDIRECT_CALL_3(fq->consume, dpaa2_eth_rx, dpaa2_eth_tx_conf, dpaa2_eth_rx_err,
+				priv, ch, fd, fq);
 		cleaned++;
 		retries = 0;
 	} while (!is_last);