Skip to content

Commit

Permalink
sfc: Explicitly prefetch RX hash prefix, not just Ethernet heade
Browse files Browse the repository at this point in the history
Currently we prefetch from the Ethernet header, but we will also read
the hash prefix.  In practice they should be in the same cache line
and this won't hurt, but it is still pointless to add on the hash
prefix size.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
  • Loading branch information
Ben Hutchings committed Mar 7, 2013
1 parent b184f16 commit 5036b7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index,
/* Prefetch nice and early so data will (hopefully) be in cache by
* the time we look at it.
*/
prefetch(efx_rx_buf_va(rx_buf) + efx->type->rx_buffer_hash_size);
prefetch(efx_rx_buf_va(rx_buf));

/* Pipeline receives so that we give time for packet headers to be
* prefetched into cache.
Expand Down

0 comments on commit 5036b7c

Please sign in to comment.