diff mbox

[Bugme-new,Bug,13467] New: Cannot set larger mtu on vlan then on underlying untagged device

Message ID 20090706101950.GA18953@gondor.apana.org.au
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Herbert Xu July 6, 2009, 10:19 a.m. UTC
Andrew Morton <akpm@linux-foundation.org> wrote:
>
>>            Summary: Cannot set larger mtu on vlan then on underlying
>>                     untagged device

Please try this patch.

vlan: Propagate physical MTU changes

When the physical MTU changes we want to ensure that all existing
VLAN device MTUs do not exceed the new underlying MTU.  This patch
adds that propagation.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


Cheers,

Comments

David Miller July 17, 2009, 2:30 a.m. UTC | #1
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon, 6 Jul 2009 18:19:50 +0800

> Andrew Morton <akpm@linux-foundation.org> wrote:
>>
>>>            Summary: Cannot set larger mtu on vlan then on underlying
>>>                     untagged device
> 
> Please try this patch.
> 
> vlan: Propagate physical MTU changes
> 
> When the physical MTU changes we want to ensure that all existing
> VLAN device MTUs do not exceed the new underlying MTU.  This patch
> adds that propagation.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Please can we have some test results for this patch?  It's been
more than a week since this patch and request for testing was
posted.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller July 20, 2009, 2:36 p.m. UTC | #2
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon, 6 Jul 2009 18:19:50 +0800

> vlan: Propagate physical MTU changes
> 
> When the physical MTU changes we want to ensure that all existing
> VLAN device MTUs do not exceed the new underlying MTU.  This patch
> adds that propagation.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied to net-next-2.6, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index fe64908..6d37b7e 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -468,6 +468,19 @@  static int vlan_device_event(struct notifier_block *unused, unsigned long event,
 		}
 		break;
 
+	case NETDEV_CHANGEMTU:
+		for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
+			vlandev = vlan_group_get_device(grp, i);
+			if (!vlandev)
+				continue;
+
+			if (vlandev->mtu <= dev->mtu)
+				continue;
+
+			dev_set_mtu(vlandev, dev->mtu);
+		}
+		break;
+
 	case NETDEV_FEAT_CHANGE:
 		/* Propagate device features to underlying device */
 		for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {