Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3975710pxb; Tue, 25 Jan 2022 00:25:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyH7PzjBekn6MhukpAosUbjh78d3AQxaoRQxmSiK/7ZL7PLHaRZ3VFCzEAClBoPKPAfw42e X-Received: by 2002:a65:4688:: with SMTP id h8mr15014998pgr.143.1643099147178; Tue, 25 Jan 2022 00:25:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099147; cv=none; d=google.com; s=arc-20160816; b=OhzvU6Jy1BtpcmExr/1ONoKnJ9L9WzejlCunQpV4fDBMhG0Mr9s9WneuAz/ENYmnK0 r8AEQF8J8VlbSe4q7ZIGzIGBood3pn2daA08MalBC/T5mG3tWPL0yEtrbO9o6PGXdV+U rT0yGe/lD7+Qw8qlY+bh+LksnFwZ+4R2uqbBIOWDJ62tscuFB+N2Tzz8gKBCANu3qjPL jWT9qmTPbzibsZCgSHaf9gvFXngIYtkY6wf1nsRHhpTZf5GBSFTBuflrDsQfPj0Ltj/k xV25J4mde6gxm8zGzv/HvWEjspKITwvhrVPwvKntFNcAn4JUerfhPzpfZCtbUH2HZOdN WCdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GRjywnXPk4qd0yfVC7yHQTC/OnvJ5Y2KfxP2FbzaGIE=; b=qQCu/L//f21bdlN6IxjGsb/HMq1PeP75CVG5mTzbo5lIbBjsqDrY5SF2Yo+hMytH+z y2vMk0dAJh4n1m+ker/51ZbIc7GHutfioXJs+Gsc5bgXXWYSa1a+RaFGvop+Gu+P5ESw 9vKTSlwUQZYKGBvcVqGBHmrd8MPbhONTSGb5iWhfac2tSzPPGbDxbTd4vnlbnDAiTKxQ nngnOFwhZyK8DAo1bSsNwguvuoXuNuABh3syxwgSsO5gBxp13uZvMpFW3e/h/xeUlTSA VQOV5Vxnajehn4mG5FNprP4gfApkaaBZ6kwG3n4hLT1MuM6H+5jwEYkftyNH4ca3Q7ds cp9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HAXrpTpw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si18108522plc.226.2022.01.25.00.25.35; Tue, 25 Jan 2022 00:25:47 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HAXrpTpw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3420795AbiAYCZ3 (ORCPT + 99 others); Mon, 24 Jan 2022 21:25:29 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:45052 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349676AbiAXTVI (ORCPT ); Mon, 24 Jan 2022 14:21:08 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2E3C4B8121C; Mon, 24 Jan 2022 19:21:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D767C340E7; Mon, 24 Jan 2022 19:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052065; bh=mJzXnS1IcEmpxWvMgmaLHW9EGxrSV9VAOnlDQMkv5PE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HAXrpTpwwj7j405ShQ8jBsiGJcjPRPfktlisELvgvfnYS4wamLkZarvSaAphHJk/z 4Fd0bO7r8GWFkVUsYbUztkvYWcKhGTQibz779JdNXtwTi4wm4DW2LdXU2F7xCoSZ9z JE7TQWpklEtuEBb+bU0T1+8eOfBm9k+3l1Cum/qM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suresh Kumar , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 145/239] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Date: Mon, 24 Jan 2022 19:43:03 +0100 Message-Id: <20220124183947.707901508@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suresh Kumar [ Upstream commit fee32de284ac277ba434a2d59f8ce46528ff3946 ] Currently "bond_should_notify_peers: slave ..." messages are printed whenever "bond_should_notify_peers" function is called. +++ Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): Received LACPDU on port 1 Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): Rx Machine: Port=1, Last State=6, Curr State=6 Dec 12 12:33:26 node1 kernel: bond0: (slave enp0s25): partner sync=1 Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:26 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 ... Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): Received LACPDU on port 2 Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): Rx Machine: Port=2, Last State=6, Curr State=6 Dec 12 12:33:30 node1 kernel: bond0: (slave enp4s3): partner sync=1 Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 Dec 12 12:33:30 node1 kernel: bond0: bond_should_notify_peers: slave enp0s25 +++ This is confusing and can also clutter up debug logs. Print logs only when the peer notification happens. Signed-off-by: Suresh Kumar Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/bonding/bond_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index d6c5f41b17f7e..2d70cdd26f89d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -782,14 +782,14 @@ static bool bond_should_notify_peers(struct bonding *bond) slave = rcu_dereference(bond->curr_active_slave); rcu_read_unlock(); - netdev_dbg(bond->dev, "bond_should_notify_peers: slave %s\n", - slave ? slave->dev->name : "NULL"); - if (!slave || !bond->send_peer_notif || !netif_carrier_ok(bond->dev) || test_bit(__LINK_STATE_LINKWATCH_PENDING, &slave->dev->state)) return false; + netdev_dbg(bond->dev, "bond_should_notify_peers: slave %s\n", + slave ? slave->dev->name : "NULL"); + return true; } -- 2.34.1