Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3562834pxb; Mon, 24 Jan 2022 12:17:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmgpP8YFhmyS7MH+daYUvt8ei7rkjLy4oxD+R8bEkNeBp14ddejBQL4fBC7hwihIUaNSKL X-Received: by 2002:a17:902:a703:b0:149:7087:9904 with SMTP id w3-20020a170902a70300b0014970879904mr15531264plq.126.1643055434627; Mon, 24 Jan 2022 12:17:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055434; cv=none; d=google.com; s=arc-20160816; b=HGtAfJwrUJBCbxJa1SvUawAKg9O1FFMZ1iQcEnqE42Kg1S2Dh+YmiJtUE5tJD6WmST vygH6x6VbbG9Xt9l0R86yaVYHUAlarnFJsiwY5CNeDQpxNfHaE5hoLsFM4MGU+j7714x jJG89ZZss6Jj06bkCUHWLKxwj28NCY6207CkufXLq9uHdLCndK0l/zoIj8Gqyof/zep3 GbVcEjs2gOTahgncYO/cx4RJinIKI4ycvsgLC48BmO47u1g3Oln+62cRVKwZjJi9AegM FM71eaTbvnL5zpjxWIqb3Rd+syeF6R4NSMRF6bg4NyMdiJjz9y+Wuu74hHHpvBvo5/aj iyZg== 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=A9KnLRKxZGyknkOZ+Gb4d8gWVpr8EYKoEXtuYS1B+x8=; b=hSWNn8x211mixKBuUUGcqOD5Z3P+d1toZgf2QKn3+gyYWNLCY2L5SyvLfM4e7muB4v V7sj94DuMcZjG7Y1TkgEfff7vlArVIK5MCsdXlgv48F8H6MhuiELI0mzi6tNoaX6DzJY M+XeDS7OYDzyvBsysg1sgoY6QXlq2bh/ozw7uUFhhIeCoLalebWzlqmjOw6H0T224Zw6 R9wT/qxSaAWoOOOG61gEXcOUfsEEOouK2iyIqnsfwj9voei5kkPRkzE+l22pImMc5Vp8 0Ti+HSkW1+13QCnUdbI0uVOxWZ+A9whRTQvK+3CXgcJ8hZbejKNfXio23trxm8MUKQ+T /8Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yhWHF1wY; 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 q13si12799139plk.365.2022.01.24.12.17.02; Mon, 24 Jan 2022 12:17:14 -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=yhWHF1wY; 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 S1348548AbiAXTS7 (ORCPT + 99 others); Mon, 24 Jan 2022 14:18:59 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:37860 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347252AbiAXTKB (ORCPT ); Mon, 24 Jan 2022 14:10:01 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 32FFF60B86; Mon, 24 Jan 2022 19:10:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 168D9C340E5; Mon, 24 Jan 2022 19:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051399; bh=Vk903Ehecft00WxikSEHVggSSpBxZ6zdw122CcEELU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yhWHF1wYzeYKJLzUdQcW4rTiYj0kNYG03juc5/K0PkZOz0Ilrdkpz2LyXpyzOKEPB j0pb/xXBXC7duOK2DRoL0LMa7t6d2rKknB/uqWfffHZA/8C2ZQVloqI58kFNrxw8kZ /k5UfeNCDfO7rJyB2bjGR7OIR15kw1dv+plOEgrE= 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.14 106/186] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Date: Mon, 24 Jan 2022 19:43:01 +0100 Message-Id: <20220124183940.518749455@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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 340e7bf6463ec..7096fcbf699c0 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