Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3548798pxb; Mon, 24 Jan 2022 11:59:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRVmVis3v78ggDOC7xIRUW/W9eV/GpwoSk6mEgPFp7ftZmRBO4/JK07x32h4ub6nAkQKtQ X-Received: by 2002:a17:902:be11:b0:149:5e5e:7b10 with SMTP id r17-20020a170902be1100b001495e5e7b10mr16394086pls.75.1643054247867; Mon, 24 Jan 2022 11:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054247; cv=none; d=google.com; s=arc-20160816; b=rcM8ejz/VngvSmNLTlSK7we/J+NRP2FfSJrBxSKzC4gQJTVkSshGspM9qRZ1xvAVHM iHfcbZxn4Q/IvPTPmcFcjPURhn5Si//1QRssP7PuCigYl55w0TDXLmRc/I/AyAE1c0Oi JRYijzPvKPwK9Jvu7jZNtqtVuLKjxsV+33AiOjKXP1qJ3HmQMDJsm++dt4feUF7pkpd6 bWPQ9dnK+Mg03j1j8H8tTm4DwFeO1c5qvVP+XTjF3e8dXXK5PXmndtJ3Q/kdnLdIMzcB eAKjwvcXm+mIczh9Ql/tiHAYnD2DQLZvtuCEU5il4BskN2i0bZdkmn5QhEbpUAqUxb/O vwpQ== 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=YJv2TZeeeoryX6YHwNDfB+2IkPnLdMszCLqUwjpAFT0=; b=dKh69QPBJsW9RW/M5LP/P0vVgVmp70Al3+opJorbVxAFMsOwhCCP4Eb4gEP0yybbwK 7jqv79DXzF0vpNByvvRvtfKnpREEJLlkyQxv0/IA/5WpmLOZ4Gkzyjf8gdY28JqQAvxa 2sLEDzAYFSvhvap7W5y/VDJiCQrvC60d87xxPKmIisBx9VIBvX0IjHflK5KAAdHpXCAG Gpi7bqzlF80qsMHedm+p0dmEOu+7m2rq7Sx6675w0e8p0Z2Mr3s2GNUzPHZy/iUzukwS YF4x0/hUFW8JZZxznZaV1lMo7n/JtotuMB4rLDBo5wJAry1DebiOerlOc040hQ4QpSsh CEzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lIjig3Yp; 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 6si12592258pgi.55.2022.01.24.11.57.15; Mon, 24 Jan 2022 11:57:27 -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=lIjig3Yp; 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 S1343991AbiAXSxB (ORCPT + 99 others); Mon, 24 Jan 2022 13:53:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245710AbiAXSvc (ORCPT ); Mon, 24 Jan 2022 13:51:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63B05C061762; Mon, 24 Jan 2022 10:51:23 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 02A00614EE; Mon, 24 Jan 2022 18:51:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7D29C36AE9; Mon, 24 Jan 2022 18:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050282; bh=YK2Gn4itlikwVgKPl0phpcidOiyoXHP8xusJ1dRVh8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lIjig3YpsuI7qHpRdSTuH+JVzSXxZ1knfRarbg6aZ0pE1E/0g5ErKqcqmiN9Da4zk L9FCNqtkYPV5jIYl2N/8yUFlJNlrpZj5wkcnTo2klg0LJIgXN4HqjHOUy9Y8xFn69X hEB/z7zcVR+j65QCi1rBBnuPX7uB4qOruTSAOXts= 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.4 068/114] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Date: Mon, 24 Jan 2022 19:42:43 +0100 Message-Id: <20220124183929.200187325@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183927.095545464@linuxfoundation.org> References: <20220124183927.095545464@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 d6363ae220526..bbf18d6e4f677 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -785,14 +785,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