]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix the TX/RX buffer default sizes
authorHaiyang Zhang <haiyangz@microsoft.com>
Mon, 11 Dec 2017 16:56:58 +0000 (08:56 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 18:25:04 +0000 (13:25 -0500)
commit2749f9505ac71f8ed55dccc3c04332f69f13bfb3
tree91243737b9a615be425572561255e9631439e4a0
parenta783db842e6808d72b53cd434f0dd4526051b427
hv_netvsc: Fix the TX/RX buffer default sizes

The values were not computed correctly. There are no significant
visible impact, though.

The intended size of RX buffer is 16 MB, and the default slot size is 1728.
So, NETVSC_DEFAULT_RX should be 16*1024*1024 / 1728 = 9709.

The intended size of TX buffer is 1 MB, and the slot size is 6144.
So, NETVSC_DEFAULT_TX should be 1024*1024 / 6144 = 170.

The patch puts the formula directly into the macro, and moves them to
hyperv_net.h, together with related macros.

Fixes: bdbab3a0ebffb ("netvsc: increase default receive buffer size")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc_drv.c