summaryrefslogtreecommitdiff
path: root/drivers/net/hyperv/netvsc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-07-24 17:39:29 -0700
committerDavid S. Miller <davem@davemloft.net>2017-07-24 17:39:29 -0700
commit01c49884ddff7a6efd56e7b44ba0d6da22fb2ba4 (patch)
tree24810e45ca5dc8932dbdc7133cd1a34b2a56f961 /drivers/net/hyperv/netvsc.c
parentbae75b66a813c8ae71396c766dd08cbf8dcca943 (diff)
parent658677f17c5cbe84ec24fd7be69b4da1ed580596 (diff)
Merge branch 'netvsc-minor-fixes'
Stephen Hemminger says: ==================== netvsc: minor fixes This fixes fallout from previous patch related to RTNL and RCU annotaiton. Also one patch sent to wrong list. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r--drivers/net/hyperv/netvsc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 0a9d9feedc3f..06f39a99da7c 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -30,6 +30,7 @@
#include <linux/if_ether.h>
#include <linux/vmalloc.h>
#include <linux/rtnetlink.h>
+#include <linux/prefetch.h>
#include <asm/sync_bitops.h>
@@ -1265,10 +1266,15 @@ int netvsc_poll(struct napi_struct *napi, int budget)
void netvsc_channel_cb(void *context)
{
struct netvsc_channel *nvchan = context;
+ struct vmbus_channel *channel = nvchan->channel;
+ struct hv_ring_buffer_info *rbi = &channel->inbound;
+
+ /* preload first vmpacket descriptor */
+ prefetch(hv_get_ring_buffer(rbi) + rbi->priv_read_index);
if (napi_schedule_prep(&nvchan->napi)) {
/* disable interupts from host */
- hv_begin_read(&nvchan->channel->inbound);
+ hv_begin_read(rbi);
__napi_schedule(&nvchan->napi);
}