Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3588856pxb; Mon, 24 Jan 2022 12:57:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGw6WmmiMzIbRLrKIkvLpxgbLKkgsWWD8ZtVg+E9tFVqhgqs/ALXXO7DD6EEqs6rDtmZlG X-Received: by 2002:a17:902:bf08:b0:14a:bb95:6980 with SMTP id bi8-20020a170902bf0800b0014abb956980mr15948371plb.139.1643057851334; Mon, 24 Jan 2022 12:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643057851; cv=none; d=google.com; s=arc-20160816; b=QeGI6aT1deQCK/GW5iJCYdCswgB8Y3oZ8Md5kWgMGjMnyBd7Cxec1iNhY/YeyGbmZF 0tQo2qlNjcGfD4SjnHwC4VRBh0kx+3+WEtM026lOYXn1H/DPZ1zhWqtKBqaIUdgpEZve MZxSitANnCtUCGe13CZzWQUb3VH+JlgIhsDEpcanlPlgp8g2HAVSNSHI+OYaz4YuMRi3 ZTvmHQ+IqQQKNChoqiG/o50VuAOjLoNvYbKhWrvbqWBWmfFH+wS7mT8MZ/HAT+0CO9qP 5rOd5yHjy7xNxoEs5epaZWhAD09pKFWhdGFKRMTjRdb+0rfb8jE6R8XrpJH//3wXien9 X35w== 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=4z1ar8oXP6H0S7mSBSZ2vloh4HQy+34am0TWk+sL8Jo=; b=HPCLKkaDVv6u3N4XOEg3KDeGo5bAbqbUV8Bab8jhCTH/0B2yICgQiB7roitzkf6qoa 2TgL4QALXTWvOLzJJsOFkX+IxcXsk04se/Ap/FRU04uRa8BO+0sLU0uCKOu2LBLq1Wrs P/60U6b3vEqOpiFougGLzo+PDUIJ7avo0JdJnjQOCz8Rm9hA4cGk6CGLq+ImawFebKH5 zcqXBDwsO1Yr8NbE/rgKnRklmllpB2vFpoemCU+M95KJArjWydkX8N19Zq9ocESyIn2k CTfuOQh/PCYobKE43ggECo3NsEefE8XeqontzRrO76BbQLZw5Yoy081z/UpVjrnCaVxH g3rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1yWMY47q; 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 c137si13136043pfc.159.2022.01.24.12.57.15; Mon, 24 Jan 2022 12:57:31 -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=1yWMY47q; 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 S244386AbiAXURe (ORCPT + 99 others); Mon, 24 Jan 2022 15:17:34 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:45662 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353139AbiAXUAv (ORCPT ); Mon, 24 Jan 2022 15:00:51 -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 71DECB811F9; Mon, 24 Jan 2022 20:00:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77120C340E5; Mon, 24 Jan 2022 20:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643054447; bh=kJ6hh66THiIfhZ/HNkX+wErjWOiFn8GVjT+3pv10txo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1yWMY47q+WsLE51sTCSeo7ciJAGLvBcC1eav1G2ahgyCXvtTQriHD85Y5ZpqO4+Kq VBMaGxn75NjMazKKkidjQXlaAba5zXUH9bbb62PPJbGbALJWlzBSKjXHpknzk7nnW/ OEJMth3JYpVeJ8EYT25COesUeig0BV/pU8z1GusY= 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 5.10 360/563] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Date: Mon, 24 Jan 2022 19:42:05 +0100 Message-Id: <20220124184036.869521499@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@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 645c7cabcbe4d..e2e6a69adab4b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1061,9 +1061,6 @@ 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 || bond->send_peer_notif % max(1, bond->params.peer_notif_delay) != 0 || @@ -1071,6 +1068,9 @@ static bool bond_should_notify_peers(struct bonding *bond) 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