Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11819566pjo; Thu, 2 Jan 2020 14:51:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzC3RJqX49g3ADwRxbm8WJ6HakwliyHP9RLo30j+dGEfjZZkLGkGQ7FFykdHm5lVMakassb X-Received: by 2002:aca:48cd:: with SMTP id v196mr3382543oia.102.1578005460719; Thu, 02 Jan 2020 14:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005460; cv=none; d=google.com; s=arc-20160816; b=QJHoWViAmKrU6EwtpMriC1v5wsvJndfwmVrUOgM72HjrS5AaSppVPDWeMDmTuALILc V0eLaOsaodj9klLF+A+ey+ArKlTWjO7mKa5JmZtkY0wXwTOPS8B2dKjG93lb3/Gr6IKF LCLnfvhiq/LAcfspUfA7ewAqAOKXmz8PVEhwo0PdnRDcuSP1e2+I3Y/s3PXxEu10EytA cKJK3JKwFylitclfCvPeG6aZ4owPBgG9vN7gOz3K+Gs0K5dT7eTVuqo4uazLeJ/fbAyM TiOtXiBD3gvjm3y3xUkNFjgBCGmjt8FZa5t35eNO/kjvfjSb8NMnXpMVkyCrLnkb20dB ZCGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nKlPHo3dOZnlAzC70lUBAXnBF3boGi6NKYgGeAI7BHw=; b=MPSG7GYyhRRXNCKbaza8VoFO9z9VrA+uHMvxyPmMLsPFs9pYKrY4GgcJRMmQvPBigT 6BBEFwF+UlrkK7VpRI0D+WC+MdE7O26xXS8+5UVgKJahuIyW8w7tzd0Fl8acd16VuGNm uvtjYS4o+4UN2tPsv8gi+B7pX0tNqxrU0KBzB8QICgic8hLVdqdzTCMNC8y/tkP2VOkS s9+yduDiQcYKlhwU4IpjUlYedt9lYhF7Fy3pFcVGMpUwLbySy8XUySiHaZHSSJW7AdoG T50/n4LT4Cl0V+T209Uf7z+kT+FgstZ2MWZlCG9L7Xoxq2ZHmsEAZ0F6tTmmI+ApR2Su aPpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kPszwXN/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g138si23816012oib.190.2020.01.02.14.50.49; Thu, 02 Jan 2020 14:51:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kPszwXN/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730918AbgABWti (ORCPT + 99 others); Thu, 2 Jan 2020 17:49:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:53954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728966AbgABW0d (ORCPT ); Thu, 2 Jan 2020 17:26:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B1FC21835; Thu, 2 Jan 2020 22:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003993; bh=p4Mv2ibaTAv66XQ1VweCtPx1o/WJgXnt76oOV1RZJfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kPszwXN/X6BmK0QmhRuOAFHEHURzvYJ0ki1+u1O4GTQBheTQU1Flw5koY+I0y8juH x3ksBYY2Tst2BVISR4pSMFOVORFWN6C4bmGHTOB00XcTkX51gsqeka/sbyL00L4DA6 p+0smA+UK6GArxMAF1YYYESdClkDXzKhD2/EbT/4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jay Vosburgh , Mahesh Bandewar , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.14 59/91] bonding: fix active-backup transition after link failure Date: Thu, 2 Jan 2020 23:07:41 +0100 Message-Id: <20200102220440.474630212@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220356.856162165@linuxfoundation.org> References: <20200102220356.856162165@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mahesh Bandewar [ Upstream commit 5d485ed88d48f8101a2067348e267c0aaf4ed486 ] After the recent fix in commit 1899bb325149 ("bonding: fix state transition issue in link monitoring"), the active-backup mode with miimon initially come-up fine but after a link-failure, both members transition into backup state. Following steps to reproduce the scenario (eth1 and eth2 are the slaves of the bond): ip link set eth1 up ip link set eth2 down sleep 1 ip link set eth2 up ip link set eth1 down cat /sys/class/net/eth1/bonding_slave/state cat /sys/class/net/eth2/bonding_slave/state Fixes: 1899bb325149 ("bonding: fix state transition issue in link monitoring") CC: Jay Vosburgh Signed-off-by: Mahesh Bandewar Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/bonding/bond_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 5f6602cb191f..fef599eb822b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -2186,9 +2186,6 @@ static void bond_miimon_commit(struct bonding *bond) } else if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) { /* make it immediately active */ bond_set_active_slave(slave); - } else if (slave != primary) { - /* prevent it from being the active one */ - bond_set_backup_slave(slave); } netdev_info(bond->dev, "link status definitely up for interface %s, %u Mbps %s duplex\n", -- 2.20.1