]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix the receive buffer size limit
authorHaiyang Zhang <haiyangz@microsoft.com>
Mon, 11 Dec 2017 16:56:57 +0000 (08:56 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 18:25:04 +0000 (13:25 -0500)
commita783db842e6808d72b53cd434f0dd4526051b427
treebb02a198e68bd6e6042af7b62bc3194ab7fa1ad1
parent57dbbec3dd90f86664df2325fdf49a867e05870b
hv_netvsc: Fix the receive buffer size limit

The max should be 31 MB on host with NVSP version > 2.

On legacy hosts (NVSP version <=2) only 15 MB receive buffer is allowed,
otherwise the buffer request will be rejected by the host, resulting
vNIC not coming up.

The NVSP version is only available after negotiation. So, we add the
limit checking for legacy hosts in netvsc_init_buf().

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.c