From patchwork Thu Mar 5 18:51:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Vosburgh X-Patchwork-Id: 24099 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 2E418DDDA5 for ; Fri, 6 Mar 2009 05:51:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754161AbZCESvJ (ORCPT ); Thu, 5 Mar 2009 13:51:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754011AbZCESvJ (ORCPT ); Thu, 5 Mar 2009 13:51:09 -0500 Received: from e31.co.us.ibm.com ([32.97.110.149]:53243 "EHLO e31.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753620AbZCESvH (ORCPT ); Thu, 5 Mar 2009 13:51:07 -0500 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n25ImQQ1019947; Thu, 5 Mar 2009 11:48:26 -0700 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n25Ip5bL204786; Thu, 5 Mar 2009 11:51:05 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n25Ip4tn025252; Thu, 5 Mar 2009 11:51:05 -0700 Received: from death.nxdomain.ibm.com (sig-9-48-81-166.mts.ibm.com [9.48.81.166]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n25Ip4d7025218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Mar 2009 11:51:04 -0700 Received: from localhost ([127.0.0.1] helo=death.nxdomain.ibm.com) by death.nxdomain.ibm.com with esmtp (Exim 4.69) (envelope-from ) id 1LfIf2-0002Wg-20; Thu, 05 Mar 2009 10:51:12 -0800 From: Jay Vosburgh To: Jesper Krogh cc: Linux Kernel Mailing List , "netdev@vger.kernel.org" , Jeff Garzik , aowi@novozymes.com Subject: Re: Regression in bonding between 2.6.26.8 and 2.6.27.6 - bisected - twice In-reply-to: <49AA8B4F.8090405@krogh.cc> References: <491FEAD5.4090205@krogh.cc> <49A7B17F.2020408@krogh.cc> <16084.1235752119@death.nxdomain.ibm.com> <49A84802.7030502@krogh.cc> <30478.1235766943@death.nxdomain.ibm.com> <49AA2973.7040209@krogh.cc> <49AA8B4F.8090405@krogh.cc> Comments: In-reply-to Jesper Krogh message dated "Sun, 01 Mar 2009 14:19:11 +0100." X-Mailer: MH-E 8.0.3; nmh 1.3-RC3; GNU Emacs 22.2.1 Date: Thu, 05 Mar 2009 10:51:12 -0800 Message-ID: <9712.1236279072@death.nxdomain.ibm.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jesper Krogh wrote: >Jesper Krogh wrote: >> I appreciate that you spend time on it, but my feeling is that it >> definately isn't reproducible in all environments (otherwise we would >> probably have seen a large cry by now). >> >> I'm trying to bisect the "fix" down and hope that'll tell us something >> more. > >Ok, The fixing commit seems to be: cb52deba12f27af90a46d2f8667a64888118a888 > >Applying it to 2.6.28.7 and 2.6.27.19 makes them both work. > >It also explains why my e1000 based bonds didnt break, allthough the >commitmessage doesnt mention anything about how it should effect >bonding. Wouldn't it make sense to propose this patch for 2.6.27 and >2.6.28 stable kernels? Perhaps. I don't have a forcedeth to test with, and as you surmised, I was unable to reproduce the problem with other chipsets (tg3 or e1000). However, I did find another bug I introduced during the "mii refactor" patch that you mentioned as being the original source of the problem. That bug will cause 802.3ad to not notice speed changes. Could you test the patch below on your 2.6.68.7 and/or 2.6.27.19 and see if it resolves your problem (without the forcedeth patch)? -J --- -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com -- 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 --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 2c96b93..ad81474 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3545,11 +3545,27 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave } break; case NETDEV_CHANGE: - /* - * TODO: is this what we get if somebody - * sets up a hierarchical bond, then rmmod's - * one of the slave bonding devices? - */ + if (bond->params.mode == BOND_MODE_8023AD || + bond_is_lb(bond)) { + struct slave *slave; + + slave = bond_get_slave_by_dev(bond, slave_dev); + if (slave) { + u16 old_speed = slave->speed; + u16 old_duplex = slave->duplex; + + bond_update_speed_duplex(slave); + + if (bond_is_lb(bond)) + break; + + if (old_speed != slave->speed) + bond_3ad_adapter_speed_changed(slave); + if (old_duplex != slave->duplex) + bond_3ad_adapter_duplex_changed(slave); + } + } + break; case NETDEV_DOWN: /*