Skip to content

Commit e832bc9

Browse files
jdamato-fslykuba-moo
authored andcommitted
net: wangxun: use net_prefetch to simplify logic
Use net_prefetch to remove #ifdef and simplify prefetch logic. This follows the pattern introduced in a previous commit f468f21 ("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 <[email protected]> Reviewed-by: Wojciech Drewek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1722389 commit e832bc9

File tree

1 file changed

+1
-4
lines changed
  • drivers/net/ethernet/wangxun/libwx

1 file changed

+1
-4
lines changed

drivers/net/ethernet/wangxun/libwx/wx_lib.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,7 @@ static struct sk_buff *wx_build_skb(struct wx_ring *rx_ring,
251251
rx_buffer->page_offset;
252252

253253
/* prefetch first cache line of first page */
254-
prefetch(page_addr);
255-
#if L1_CACHE_BYTES < 128
256-
prefetch(page_addr + L1_CACHE_BYTES);
257-
#endif
254+
net_prefetch(page_addr);
258255

259256
/* allocate a skb to store the frags */
260257
skb = napi_alloc_skb(&rx_ring->q_vector->napi, WX_RXBUFFER_256);

0 commit comments

Comments
 (0)