From: Ioana Ciornei <ciorneiioana@gmail.com>
To: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org
Cc: ruxandra.radulescu@nxp.com, Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: [PATCH net-next 1/3] dpaa2-eth: use indirect calls wrapper for FD enqueue
Date: Tue, 16 Mar 2021 16:47:28 +0200 [thread overview]
Message-ID: <20210316144730.2150767-2-ciorneiioana@gmail.com> (raw)
In-Reply-To: <20210316144730.2150767-1-ciorneiioana@gmail.com>
From: Ioana Ciornei <ioana.ciornei@nxp.com>
We can avoid an indirect call per Tx packet by wrapping the enqueue of
the frame descriptor with the appropriate helper.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index 492943bb9c48..7702b921ab0b 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -266,8 +266,11 @@ static int dpaa2_eth_xdp_flush(struct dpaa2_eth_priv *priv,
num_fds = xdp_fds->num;
max_retries = num_fds * DPAA2_ETH_ENQUEUE_RETRIES;
while (total_enqueued < num_fds && retries < max_retries) {
- err = priv->enqueue(priv, fq, &fds[total_enqueued],
- 0, num_fds - total_enqueued, &enqueued);
+ err = INDIRECT_CALL_2(priv->enqueue,
+ dpaa2_eth_enqueue_fq_multiple,
+ dpaa2_eth_enqueue_qd,
+ priv, fq, &fds[total_enqueued],
+ 0, num_fds - total_enqueued, &enqueued);
if (err == -EBUSY) {
percpu_extras->tx_portal_busy += ++retries;
continue;
@@ -1153,7 +1156,10 @@ static netdev_tx_t __dpaa2_eth_tx(struct sk_buff *skb,
* the Tx confirmation callback for this frame
*/
for (i = 0; i < DPAA2_ETH_ENQUEUE_RETRIES; i++) {
- err = priv->enqueue(priv, fq, &fd, prio, 1, NULL);
+ err = INDIRECT_CALL_2(priv->enqueue,
+ dpaa2_eth_enqueue_fq_multiple,
+ dpaa2_eth_enqueue_qd,
+ priv, fq, &fd, prio, 1, NULL);
if (err != -EBUSY)
break;
}
--
2.30.0
next prev parent reply other threads:[~2021-03-16 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 14:47 [PATCH net-next 0/3] dpaa2-eth: use indirect call wrappers Ioana Ciornei
2021-03-16 14:47 ` Ioana Ciornei [this message]
2021-03-16 14:47 ` [PATCH net-next 2/3] dpaa2-eth: use indirect calls wrapper for FD consume Ioana Ciornei
2021-03-16 14:47 ` [PATCH net-next 3/3] dpaa2-switch: use an indirect call wrapper instead of open-coding Ioana Ciornei
2021-03-16 16:44 ` [PATCH net-next 0/3] dpaa2-eth: use indirect call wrappers Ioana Ciornei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210316144730.2150767-2-ciorneiioana@gmail.com \
--to=ciorneiioana@gmail.com \
--cc=davem@davemloft.net \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ruxandra.radulescu@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox