Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368200
b: refs/heads/master
c: b184f16
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings committed Mar 7, 2013
1 parent 4625a22 commit 2c5a079
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff734ef4bca05fd5cd51b83d2e2a9f008b64f9a3
refs/heads/master: b184f16b7feb9ede7d658ee6f2c77434d580d764
8 changes: 4 additions & 4 deletions trunk/drivers/net/ethernet/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ static inline unsigned int efx_rx_buf_offset(struct efx_nic *efx,
return buf->page_offset + efx->type->rx_buffer_hash_size;
}

static u8 *efx_rx_buf_eh(struct efx_nic *efx, struct efx_rx_buffer *buf)
static inline u8 *efx_rx_buf_va(struct efx_rx_buffer *buf)
{
return page_address(buf->page) + efx_rx_buf_offset(efx, buf);
return page_address(buf->page) + buf->page_offset;
}

static inline u32 efx_rx_buf_hash(const u8 *eh)
Expand Down 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_eh(efx, rx_buf));
prefetch(efx_rx_buf_va(rx_buf) + efx->type->rx_buffer_hash_size);

/* Pipeline receives so that we give time for packet headers to be
* prefetched into cache.
Expand Down Expand Up @@ -497,7 +497,7 @@ static void efx_rx_deliver(struct efx_channel *channel, u8 *eh,
void __efx_rx_packet(struct efx_channel *channel, struct efx_rx_buffer *rx_buf)
{
struct efx_nic *efx = channel->efx;
u8 *eh = efx_rx_buf_eh(efx, rx_buf);
u8 *eh = efx_rx_buf_va(rx_buf) + efx->type->rx_buffer_hash_size;

/* If we're in loopback test, then pass the packet directly to the
* loopback layer, and free the rx_buf here
Expand Down

0 comments on commit 2c5a079

Please sign in to comment.