Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3556215pxb; Mon, 24 Jan 2022 12:08:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvxYClFnPY1tW3VtBYt4gB0sgTzhMjmNtMyHFuLZNXxgX0tWUJemboHvctpQmbAPpRbEsK X-Received: by 2002:a17:90a:cb8a:: with SMTP id a10mr2768888pju.149.1643054905870; Mon, 24 Jan 2022 12:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054905; cv=none; d=google.com; s=arc-20160816; b=GcolJSBHq4UiLgFfnh/LCK0Fn/dkGCR+DZZkAVOmFanhfB6+EhlErIA3pUCryi2ydc R3NiP5oPfLIcG1MZkbU1IxBR7+njsNqu57CSgy8CptQA3qSybAPRa7AtBQYNyVsytM4a oD8iqUlo10YjijN94FSiYmpm+O0xsEnid7/enhgNi8ong/phmTDJtmUglLFAuwanQmIJ WhdyDScYi4+eSA4NlmkB9Otxb7mN2c9iWPJJn4Vpk5CLebpuOEtV0K8eXfg4xcN90r4o tzkAzi0G9k2WJT9jyxAHRf8j558T4IH1SuoRH4BiU6kWEJm17Zkw9QrIU+KSREWkrhz2 S/QQ== 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=kjgN1X+0vcFTQKF934hlNiWnaWdHSZCS+GpI7D+PUrk=; b=k3iymNi78PiiOqMuhJO/Xik49I+jiAbZrEncvOBOw+dzGFc5mHGys+lpPu4S8MIPga qALEN1N/eBBagIKjTGD6P6eB9YU1E9oeLiBQhkBko9LtY3Hgn8nUbT+JAKF+SBrpyY+v HbZFlXzKlGhtdZvkLw3jGPSI75VCD3aZTKUe4YXQX8s7lCME5I1gaDXSqAqtQU73lp7S 37HwKvv3OJUDBIKmoQB68S6mAD/IbmpxpFin8gyjPe7TD9dpoyD4rWWe8qkpcLv1V83r 81kkgtUpn0/YmLnIREIMAzRnoWOsZgq8O5j+Y0QlH35FqHarn6aTZixF/khG5cw9HXIg xY7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="KnsGcz//"; 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 y12si13816303plk.292.2022.01.24.12.08.11; Mon, 24 Jan 2022 12:08:25 -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="KnsGcz//"; 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 S1344313AbiAXTHw (ORCPT + 99 others); Mon, 24 Jan 2022 14:07:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344602AbiAXTBn (ORCPT ); Mon, 24 Jan 2022 14:01:43 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94C7CC0604E0; Mon, 24 Jan 2022 10:58:30 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5C8B9B8121D; Mon, 24 Jan 2022 18:58:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 653D0C340E5; Mon, 24 Jan 2022 18:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050708; bh=tlhxMPv9xAdFHyHVPSocNKb4ygBkd3GToRMLuTLcu/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KnsGcz//pomxc8AqcI/omO69Y6PFkbrQ1si37LH5tHJmlEqCFGqQ4t6XZ6XbDR0uw l2jmO4TvrXizLeZvzfFHIL1vZLKX3XHpNXkAR8mpCtmUGxq0K+W8/5a8L3wthhg9nZ f6p0RY6zcWufvI8Sqi5v58blW3zmNi1VsLGqURP0= 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.9 088/157] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Date: Mon, 24 Jan 2022 19:42:58 +0100 Message-Id: <20220124183935.577925109@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183932.787526760@linuxfoundation.org> References: <20220124183932.787526760@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 2b721ed392adb..0d9226bdf6614 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