]> git.baikalelectronics.ru Git - kernel.git/commit
net/hyperv: Add flow control based on hi/low watermark
authorHaiyang Zhang <haiyangz@microsoft.com>
Tue, 27 Mar 2012 13:20:45 +0000 (13:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Apr 2012 21:47:15 +0000 (17:47 -0400)
commit3516bb43d6d0328c4d5f28e8151241d3b545e48e
tree2b0361f4d39a14e2ddd0d23e66656e6174b3cb71
parent784dc6c21995b5f312f6e4196ecb606a5c885784
net/hyperv: Add flow control based on hi/low watermark

In the existing code, we only stop queue when the ringbuffer is full,
so the current packet has to be dropped or retried from upper layer.

This patch stops the tx queue when available ringbuffer is below
the low watermark. So the ringbuffer still has small amount of space
available for the current packet. This will reduce the overhead of
retries on sending.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/hv/ring_buffer.c
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c
include/linux/hyperv.h