Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2610664pxt; Mon, 9 Aug 2021 04:58:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6Wrf4nu6CpUp2+O8mL7C3NAr95mOrrvy0DJUcLoQceRxdVRqC0mp1Knv8SEmLd1kpYHQO X-Received: by 2002:a02:c6d5:: with SMTP id r21mr22367761jan.71.1628510306102; Mon, 09 Aug 2021 04:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628510306; cv=none; d=google.com; s=arc-20160816; b=X33C1vhSj2AGsNCQ9xaHivHaV6AtyrBfSIkl2X1QcfDiTV48vF8/0rQoKprV/LWDdj nqrIhF4ibCCR8+8BikuvLCRq4TiLCyAVsJiv3/sdp8WTh1PdxmUROBiV1zLFpmorcQpY DR9kTGY5jzBB9OyuhGGZN+79iKB/lFsVEFJtGmL33RNBA6jkhqPB+kGY8U+lHtpnQC9i jbfHVhM9/P2umQLw6r2aUXW+mmP34fSBXiMXJJoV7krm1p4CScUH+3UwqrPWO5GAD8CT XVw405NSy0v7ta8tNux6SQIqTL4Zr9PM2O4ke+T5tCuysMKLMBTx1lgjNFowYYxlw5rO IE2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=kfc0zfiGDa6ehIGiCDJy7k2l8cHHeOQvOXUYUrWKhi0=; b=YV2gzgXrGdJJJSuqskw1RzUNYnYtyO+AtWEP4Dc4qgJqOFAibpvIJ1EVv2EG3bSHZl EMfaLHSD/4UjfZcwckG+jbwVZij8RNJ+XHNIw2+8Q+xwGvqTi+/l16X0hdkoJlqLu4si 7GjnNTa/kG0/HgMxjFHE3h0++qiLll4Dn9K8UqUb54nSP5Ofpp/N7Gfqh9lt9oRIz6+z OhbhvTtBnNO1ogDzU2FX6vQaNMbqCXNi13Sx0PZm0elxvzhEuyHbxY6n4darmESDi1SU x3PB3LXdx8HM7dsMI+Gea/K8XwuhaIwNrtsQGZ4o1XmJhX+cAjKGoRxt3B40PCAh2oOf 21Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v31si8091718jal.55.2021.08.09.04.58.15; Mon, 09 Aug 2021 04:58:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234847AbhHIKK4 (ORCPT + 99 others); Mon, 9 Aug 2021 06:10:56 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:34761 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233565AbhHIKKz (ORCPT ); Mon, 9 Aug 2021 06:10:55 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 179AALEM020477; Mon, 9 Aug 2021 12:10:21 +0200 Date: Mon, 9 Aug 2021 12:10:21 +0200 From: Willy Tarreau To: Jonathan Toppins Cc: Jay Vosburgh , "netdev@vger.kernel.org" , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Jakub Kicinski , LKML Subject: Re: bonding: link state question Message-ID: <20210809101021.GA20448@1wt.eu> References: <020577f3-763d-48fd-73ce-db38c3c7fdf9@redhat.com> <22626.1628376134@famine> <20210808044912.GA10092@1wt.eu> <79019b7e-1c2e-7186-4908-cf085b33fb59@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79019b7e-1c2e-7186-4908-cf085b33fb59@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jonathan, On Sun, Aug 08, 2021 at 09:31:39PM -0400, Jonathan Toppins wrote: > I am likely very wrong but the lack of a recalculation of the bond carrier > state after a lower notifies of an up/down event seemed incorrect. Maybe a > place to start? Thanks for the test, it could have been a good candidate but it does not work :-) That's what I have after the following sequence: - link is up - suspend-to-ram - unplug the cable - resume $ ip -br li eth0 DOWN e8:6a:64:5d:19:ed eth0.2@eth0 UP e8:6a:64:5d:19:ed bond0 UP e8:6a:64:5d:19:ed My bond interface uses eth0 and eth0.2 in active-backup scenario allowing me to instantly switch between tagged/untagged network depending on the port I'm connecting to. I just figured the problem. It's not the bonding driver which is causing this issue, the issue is with the VLAN interface which incorrectly shows up while it ought not to, as can be seen above, and the bond naturally selected it: Primary Slave: eth0 (primary_reselect always) Currently Active Slave: eth0.2 MII Status: up MII Polling Interval (ms): 200 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 So the bond driver works well, I'll have to dig into the 802.1q code and/or see how the no-carrier state is propagated upstream. So you were not very wrong at all and put me on the right track :-) Cheers, Willy