[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80769D7B14936844A23C0C43D9FBCF0F16EF1C81@orsmsx501.amr.corp.intel.com>
Date: Mon, 6 Oct 2008 11:45:16 -0700
From: "Duyck, Alexander H" <alexander.h.duyck@...el.com>
To: Stephen Hemminger <shemminger@...tta.com>
CC: Patrick McHardy <kaber@...sh.net>,
"David S. Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH] vlan: propogate MTU changes (v2)
Stephen Hemminger wrote:
> Propogate MTU changes of underlying device to all VLAN's and
> send vlan MTU change out to userspace.
>
> see: https://bugzilla.vyatta.com/show_bug.cgi?id=3742
>
> Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
>
>
> --- a/net/8021q/vlan.c 2008-10-06 17:03:58.000000000 +0200
> +++ b/net/8021q/vlan.c 2008-10-06 19:55:43.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;
> +
> + dev_set_mtu(vlandev, 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++) {
It has been a while since I worked with vlan tags, but I was just
curious. Shouldn't the vlan mtu be set to dev->mtu - VLAN_HLEN?
It seems like if the vlan and the device have the same mtu then
you will always have issues since adding the vlan tag will
increase the overall size and push the packet outside mtu size.
Thanks,
Alex
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists