Skip to content

Commit

Permalink
ibmveth: Use lighter weight read memory barrier in ibmveth_poll
Browse files Browse the repository at this point in the history
We want to order the read in ibmveth_rxq_pending_buffer and the read of
ibmveth_rxq_buffer_valid which are both cacheable memory. smp_rmb() is good
enough for this.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Anton Blanchard authored and David S. Miller committed Sep 7, 2010
1 parent 8d86c61 commit f89e49e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)
if (!ibmveth_rxq_pending_buffer(adapter))
break;

rmb();
smp_rmb();
if (!ibmveth_rxq_buffer_valid(adapter)) {
wmb(); /* suggested by larson1 */
adapter->rx_invalid_buffer++;
Expand Down

0 comments on commit f89e49e

Please sign in to comment.