From patchwork Mon Oct 6 18:25:54 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 2947 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id D5F97DDDFB for ; Tue, 7 Oct 2008 05:26:17 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753873AbYJFS0F (ORCPT ); Mon, 6 Oct 2008 14:26:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753881AbYJFS0D (ORCPT ); Mon, 6 Oct 2008 14:26:03 -0400 Received: from mail.vyatta.com ([76.74.103.46]:59532 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbYJFS0B (ORCPT ); Mon, 6 Oct 2008 14:26:01 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 472864F4660; Mon, 6 Oct 2008 11:26:01 -0700 (PDT) X-Virus-Scanned: amavisd-new at Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q2ISCArSoWwV; Mon, 6 Oct 2008 11:26:00 -0700 (PDT) Received: from speedy (e177152184.adsl.alicedsl.de [85.177.152.184]) by mail.vyatta.com (Postfix) with ESMTP id 735354F465F; Mon, 6 Oct 2008 11:25:59 -0700 (PDT) Date: Mon, 6 Oct 2008 20:25:54 +0200 From: Stephen Hemminger To: Stephen Hemminger Cc: Patrick McHardy , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH] vlan: propogate MTU changes (v2) Message-ID: <20081006202554.11354b09@speedy> In-Reply-To: <20081006195446.1dc5a372@speedy> References: <20081006173024.2741cc01@speedy> <48EA369F.3090306@trash.net> <20081006195446.1dc5a372@speedy> Organization: Vyatta X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.9; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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 --- 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++) {