diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2015-07-06 14:11:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-08 16:00:56 -0700 |
commit | f9cbce34c34bcc05ea0dd78c8999bfe88b5b6b86 (patch) | |
tree | 415b7324a0311b278c86d1c2bc75e316ebe84d78 /drivers/net/hyperv/rndis_filter.c | |
parent | 9e29e21a9bbfb2204bab875f0ef6dbaed66592e7 (diff) | |
download | op-kernel-dev-f9cbce34c34bcc05ea0dd78c8999bfe88b5b6b86.zip op-kernel-dev-f9cbce34c34bcc05ea0dd78c8999bfe88b5b6b86.tar.gz |
hv_netvsc: Add support to set MTU reservation from guest side
When packet encapsulation is in use, the MTU needs to be reduced for
headroom reservation.
The existing code takes the updated MTU value only from the host side.
But vSwitch extensions, such as Open vSwitch, require the flexibility
to change the MTU to different values from within a guest during the
lifecycle of a vNIC, when the encapsulation protocol is changed. The
patch supports this kind of MTU changes.
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>
Diffstat (limited to 'drivers/net/hyperv/rndis_filter.c')
-rw-r--r-- | drivers/net/hyperv/rndis_filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index 236aeb7..2e40417 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -1054,7 +1054,7 @@ int rndis_filter_device_add(struct hv_device *dev, ret = rndis_filter_query_device(rndis_device, RNDIS_OID_GEN_MAXIMUM_FRAME_SIZE, &mtu, &size); - if (ret == 0 && size == sizeof(u32)) + if (ret == 0 && size == sizeof(u32) && mtu < net_device->ndev->mtu) net_device->ndev->mtu = mtu; /* Get the mac address */ |