netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Patrick McHardy <kaber@trash.net>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] vlan: propogate MTU changes
Date: Mon, 6 Oct 2008 17:30:24 +0200	[thread overview]
Message-ID: <20081006173024.2741cc01@speedy> (raw)

Propogate MTU changes of underlying device to all related VLAN
devices.
see: https://bugzilla.vyatta.com/show_bug.cgi?id=3742

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
There might be some discussion about whether to preserve MTU changes
on the vlan device if done after startup, but this seems like the best,
most direct fix.

--- a/net/8021q/vlan.c	2008-10-06 17:03:58.000000000 +0200
+++ b/net/8021q/vlan.c	2008-10-06 17:08:33.000000000 +0200
@@ -477,6 +477,17 @@ static int vlan_device_event(struct noti
 
 		break;
 
+	case NETDEV_CHANGEMTU:
+		/* Propogate MTU of underlying device */
+		for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
+			vlandev = vlan_group_get_device(grp, i);
+			if (!vlandev)
+				continue;
+
+			vlandev->mtu = dev->mtu;
+		}
+		break;
+
 	case NETDEV_DOWN:
 		/* Put all VLANs for this dev in the down state too.  */
 		for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {

             reply	other threads:[~2008-10-06 15:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-06 15:30 Stephen Hemminger [this message]
2008-10-06 16:02 ` [PATCH] vlan: propogate MTU changes Patrick McHardy
2008-10-06 17:54   ` Stephen Hemminger
2008-10-06 18:25     ` [PATCH] vlan: propogate MTU changes (v2) Stephen Hemminger
2008-10-06 18:45       ` Duyck, Alexander H
2008-10-06 19:20         ` Ben Hutchings
2008-10-06 22:53       ` Patrick McHardy
2008-10-06 22:33     ` [PATCH] vlan: propogate MTU changes Patrick McHardy
2008-10-06 22:50       ` Rick Jones
2008-10-06 23:02         ` Patrick McHardy
2008-10-06 23:04           ` Patrick McHardy
2008-10-06 23:18           ` Rick Jones
2008-10-06 23:33             ` Patrick McHardy
2008-10-07 23:05               ` David Miller
2008-10-08 11:53               ` Patrick McHardy
2008-10-06 20:14 ` Krzysztof Oledzki
2008-10-06 22:38   ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081006173024.2741cc01@speedy \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).