diff options
author | KY Srinivasan <kys@microsoft.com> | 2014-04-30 13:14:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-30 13:48:46 -0400 |
commit | c25aaf814a63f9d9c4e45416f13d70ef0aa0be2e (patch) | |
tree | be6bb2c8784382684365e47b202f02bd5a95babe /drivers/net/hyperv/netvsc_drv.c | |
parent | cc80ee13609dc5926ad563d1a793991c80675e65 (diff) |
hyperv: Enable sendbuf mechanism on the send path
We send packets using a copy-free mechanism (this is the Guest to Host transport
via VMBUS). While this is obviously optimal for large packets,
it may not be optimal for small packets. Hyper-V host supports
a second mechanism for sending packets that is "copy based". We implement that
mechanism in this patch.
In this version of the patch I have addressed a comment from David Miller.
With this patch (and all of the other offload and VRSS patches), we are now able
to almost saturate a 10G interface between Linux VMs on Hyper-V
on different hosts - close to 9 Gbps as measured via iperf.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc_drv.c')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index c76b66515e92..939e3af60ec4 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c | |||
@@ -236,10 +236,11 @@ static void netvsc_xmit_completion(void *context) | |||
236 | struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context; | 236 | struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context; |
237 | struct sk_buff *skb = (struct sk_buff *) | 237 | struct sk_buff *skb = (struct sk_buff *) |
238 | (unsigned long)packet->send_completion_tid; | 238 | (unsigned long)packet->send_completion_tid; |
239 | u32 index = packet->send_buf_index; | ||
239 | 240 | ||
240 | kfree(packet); | 241 | kfree(packet); |
241 | 242 | ||
242 | if (skb) | 243 | if (skb && (index == NETVSC_INVALID_INDEX)) |
243 | dev_kfree_skb_any(skb); | 244 | dev_kfree_skb_any(skb); |
244 | } | 245 | } |
245 | 246 | ||