From: Wojciech Drewek <wojciech.drewek@intel.com>
To: Joe Damato <jdamato@fastly.com>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>
Cc: Jiawen Wu <jiawenwu@trustnetic.com>,
Mengyuan Lou <mengyuanlou@net-swift.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Duanqiang Wen <duanqiangwen@net-swift.com>
Subject: Re: [PATCH net-next] net: wangxun: use net_prefetch to simplify logic
Date: Tue, 30 Jul 2024 12:16:09 +0200 [thread overview]
Message-ID: <5c2f124e-3eab-4a24-b801-50c36775e6e4@intel.com> (raw)
In-Reply-To: <20240729152651.258713-1-jdamato@fastly.com>
On 29.07.2024 17:26, Joe Damato wrote:
> Use net_prefetch to remove #ifdef and simplify prefetch logic. This
> follows the pattern introduced in a previous commit f468f21b7af0 ("net:
> Take common prefetch code structure into a function"), which replaced
> the same logic in all existing drivers at that time.
>
> Signed-off-by: Joe Damato <jdamato@fastly.com>
> ---
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> drivers/net/ethernet/wangxun/libwx/wx_lib.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> index 1eecba984f3b..2b3d6586f44a 100644
> --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
> @@ -251,10 +251,7 @@ static struct sk_buff *wx_build_skb(struct wx_ring *rx_ring,
> rx_buffer->page_offset;
>
> /* prefetch first cache line of first page */
> - prefetch(page_addr);
> -#if L1_CACHE_BYTES < 128
> - prefetch(page_addr + L1_CACHE_BYTES);
> -#endif
> + net_prefetch(page_addr);
>
> /* allocate a skb to store the frags */
> skb = napi_alloc_skb(&rx_ring->q_vector->napi, WX_RXBUFFER_256);
next prev parent reply other threads:[~2024-07-30 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 15:26 [PATCH net-next] net: wangxun: use net_prefetch to simplify logic Joe Damato
2024-07-30 10:16 ` Wojciech Drewek [this message]
2024-07-31 2:00 ` patchwork-bot+netdevbpf
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=5c2f124e-3eab-4a24-b801-50c36775e6e4@intel.com \
--to=wojciech.drewek@intel.com \
--cc=davem@davemloft.net \
--cc=duanqiangwen@net-swift.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jdamato@fastly.com \
--cc=jiawenwu@trustnetic.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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