From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Sven Auhagen <sven.auhagen@voleatech.de>
Cc: netdev@vger.kernel.org, thomas.petazzoni@bootlin.com,
lorenzo@kernel.org, brouer@redhat.com
Subject: Re: [PATCH 1/1] mvneta: fix prefetch location
Date: Sun, 14 Jun 2020 10:23:43 +0200 [thread overview]
Message-ID: <20200614102343.47837452@carbon> (raw)
In-Reply-To: <20200614071128.4ezfcyhjesot4vvr@SvensMacBookAir.sven.lan>
On Sun, 14 Jun 2020 09:11:28 +0200
Sven Auhagen <sven.auhagen@voleatech.de> wrote:
> The packet header prefetch is at an offset
> now. Correct the prefetch address.
>
> Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 51889770958d..344fc5f649b4 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -2229,7 +2229,7 @@ mvneta_swbm_rx_frame(struct mvneta_port *pp,
> len, dma_dir);
>
> /* Prefetch header */
> - prefetch(data);
> + prefetch(data + pp->rx_offset_correction + MVNETA_MH_SIZE);
The comment does say "header", so I guess your change is correct if we
are talking about the packet header.
Currently this prefetch will help XDP-redirect, as it store xdp_frame
in this area.
> xdp->data_hard_start = data;
> xdp->data = data + pp->rx_offset_correction + MVNETA_MH_SIZE;
If you really need to prefetch the packet headers, it would be the same
as calling prefetch(xdp->data), right?
Have you benchmarked that this prefetch is a benefit?
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2020-06-14 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 7:11 [PATCH 1/1] mvneta: fix prefetch location Sven Auhagen
2020-06-14 8:23 ` Jesper Dangaard Brouer [this message]
2020-06-15 9:10 ` Sven Auhagen
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=20200614102343.47837452@carbon \
--to=brouer@redhat.com \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sven.auhagen@voleatech.de \
--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