From patchwork Tue Mar 8 21:24:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gospodarek X-Patchwork-Id: 86036 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.180.67]) by ozlabs.org (Postfix) with ESMTP id BEFEC1007D7 for ; Wed, 9 Mar 2011 08:24:25 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756499Ab1CHVYU (ORCPT ); Tue, 8 Mar 2011 16:24:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39054 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754507Ab1CHVYS (ORCPT ); Tue, 8 Mar 2011 16:24:18 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p28LO6li005303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Mar 2011 16:24:07 -0500 Received: from gospo.usersys.redhat.com (gospo.rdu.redhat.com [10.11.228.52]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p28LO6uc017854; Tue, 8 Mar 2011 16:24:06 -0500 Received: by gospo.usersys.redhat.com (sSMTP sendmail emulation); Tue, 8 Mar 2011 16:24:05 -0500 Date: Tue, 8 Mar 2011 16:24:05 -0500 From: Andy Gospodarek To: Amerigo Wang Cc: linux-kernel@vger.kernel.org, Neil Horman , Jay Vosburgh , netdev@vger.kernel.org Subject: Re: [Patch V2] bonding: fix netpoll in active-backup mode Message-ID: <20110308212405.GX11864@gospo.rdu.redhat.com> References: <1299578336-5888-1-git-send-email-amwang@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1299578336-5888-1-git-send-email-amwang@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Mar 08, 2011 at 05:58:56PM +0800, Amerigo Wang wrote: > V2: avoid calling slave_diable_netpoll() with write_lock_bh() held. > > netconsole doesn't work in active-backup mode, because we don't do anything > for nic failover in active-backup mode. We should disable netpoll on the > failing slave when it is detected down and enable netpoll when it becomes > the active slave. > > Tested by ifdown the current active slave and ifup it again for several times, > netconsole works well. > > Signed-off-by: WANG Cong > Cc: Neil Horman > It seems like you are going to a lot of trouble to fix a bug where netpoll will not be setup on any interface that is down when enslaved. That seems to be the only path that would not have slave->np setup properly at enslavement. Did you ever try just this? Tested-by: WANG Cong --- 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 0592e6d..8d93044 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1352,8 +1352,6 @@ static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni) read_lock(&bond->lock); bond_for_each_slave(bond, slave, i) { - if (!IS_UP(slave->dev)) - continue; err = slave_enable_netpoll(slave); if (err) { __bond_netpoll_cleanup(bond);