From: Lorenzo Bianconi <lorenzo@kernel.org>
To: netdev@vger.kernel.org
Cc: lorenzo.bianconi@redhat.com, davem@davemloft.net,
thomas.petazzoni@bootlin.com, brouer@redhat.com,
ilias.apalodimas@linaro.org, matteo.croce@redhat.com,
mw@semihalf.com, jakub.kicinski@netronome.com
Subject: [PATCH v4 net-next 5/7] net: mvneta: move header prefetch in mvneta_swbm_rx_frame
Date: Wed, 16 Oct 2019 23:03:10 +0200 [thread overview]
Message-ID: <4e5c4c61623baedb77774ba506fa53dfc856ccac.1571258793.git.lorenzo@kernel.org> (raw)
In-Reply-To: <cover.1571258792.git.lorenzo@kernel.org>
Move data buffer prefetch in mvneta_swbm_rx_frame after
dma_sync_single_range_for_cpu
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/ethernet/marvell/mvneta.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 3b2c65a7c474..213b8f3eda44 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2024,6 +2024,9 @@ mvneta_swbm_rx_frame(struct mvneta_port *pp,
rx_desc->buf_phys_addr,
len, dma_dir);
+ /* Prefetch header */
+ prefetch(data);
+
xdp->data_hard_start = data;
xdp->data = data + MVNETA_SKB_HEADROOM + MVNETA_MH_SIZE;
xdp->data_end = xdp->data + data_len;
@@ -2119,15 +2122,11 @@ static int mvneta_rx_swbm(struct napi_struct *napi,
/* Fairness NAPI loop */
while (done < budget && done < rx_pending) {
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
- unsigned char *data;
struct page *page;
int index;
index = rx_desc - rxq->descs;
page = (struct page *)rxq->buf_virt_addr[index];
- data = page_address(page);
- /* Prefetch header */
- prefetch(data);
rxq->refill_num++;
done++;
--
2.21.0
next prev parent reply other threads:[~2019-10-16 21:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 21:03 [PATCH v4 net-next 0/7] add XDP support to mvneta driver Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 1/7] net: mvneta: introduce mvneta_update_stats routine Lorenzo Bianconi
2019-10-17 1:01 ` Jakub Kicinski
2019-10-16 21:03 ` [PATCH v4 net-next 2/7] net: mvneta: introduce page pool API for sw buffer manager Lorenzo Bianconi
2019-10-17 1:14 ` Jakub Kicinski
2019-10-17 9:58 ` Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 3/7] net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine Lorenzo Bianconi
2019-10-17 1:19 ` Jakub Kicinski
2019-10-16 21:03 ` [PATCH v4 net-next 4/7] net: mvneta: add basic XDP support Lorenzo Bianconi
2019-10-17 1:26 ` Jakub Kicinski
2019-10-17 9:46 ` Lorenzo Bianconi
2019-10-16 21:03 ` Lorenzo Bianconi [this message]
2019-10-16 21:03 ` [PATCH v4 net-next 6/7] net: mvneta: make tx buffer array agnostic Lorenzo Bianconi
2019-10-16 21:03 ` [PATCH v4 net-next 7/7] net: mvneta: add XDP_TX support Lorenzo Bianconi
2019-10-17 1:28 ` Jakub Kicinski
2019-10-17 9:44 ` Lorenzo Bianconi
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=4e5c4c61623baedb77774ba506fa53dfc856ccac.1571258793.git.lorenzo@kernel.org \
--to=lorenzo@kernel.org \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=ilias.apalodimas@linaro.org \
--cc=jakub.kicinski@netronome.com \
--cc=lorenzo.bianconi@redhat.com \
--cc=matteo.croce@redhat.com \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.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;
as well as URLs for NNTP newsgroup(s).