diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2014-11-12 14:07:44 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-12 16:21:36 -0500 |
commit | 4d3c9d37f77566b04216dfc9a6513082002d7a1f (patch) | |
tree | c23efd4874c81912f2ad9a176ba57d74c9ec637a /drivers/net/hyperv/netvsc.c | |
parent | 5226cfc500022104d92813ee218608e80f56ead6 (diff) | |
download | op-kernel-dev-4d3c9d37f77566b04216dfc9a6513082002d7a1f.zip op-kernel-dev-4d3c9d37f77566b04216dfc9a6513082002d7a1f.tar.gz |
hyperv: Add processing of MTU reduced by the host
If the host uses packet encapsulation feature, the MTU may be reduced by the
host due to headroom reservation for encapsulation. This patch handles this
new MTU value.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 7d76c95..6b46311 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -440,7 +440,8 @@ static int negotiate_nvsp_ver(struct hv_device *device, /* NVSPv2 only: Send NDIS config */ memset(init_packet, 0, sizeof(struct nvsp_message)); init_packet->hdr.msg_type = NVSP_MSG2_TYPE_SEND_NDIS_CONFIG; - init_packet->msg.v2_msg.send_ndis_config.mtu = net_device->ndev->mtu; + init_packet->msg.v2_msg.send_ndis_config.mtu = net_device->ndev->mtu + + ETH_HLEN; init_packet->msg.v2_msg.send_ndis_config.capability.ieee8021q = 1; ret = vmbus_sendpacket(device->channel, init_packet, |