Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3645694pxb; Mon, 24 Jan 2022 14:18:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwL13ZEnzFaBHR62QqSrwp5yAQGxb/m/Zqb+QYCe8v+ZgdXMnc+NpAMI71+ynRyTopnt4G X-Received: by 2002:a17:902:aa85:b0:149:4614:bc1f with SMTP id d5-20020a170902aa8500b001494614bc1fmr15871243plr.150.1643062704792; Mon, 24 Jan 2022 14:18:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643062704; cv=none; d=google.com; s=arc-20160816; b=zwbKpW0UGOKVR+xwYrXpkwBDMOxuT4nELTBAKMVeNe301Fz0+VVBdOE724qBDmmVfV AQYHcanPW3g7FPaU6cToNUnJOBceNhlZHbdiuZFLCdl0qiCZfBCOplMh2QxfcKbY2m4X jJYCDpI5lk4Zvzz/g/IJW5sxuzAVfKUN/gGDWBuA2LVR4MTU+s70FCmDxkpvXFaUmPoP LXPx7XGdvHsJedkNxDeMt25s+BrOGkgEbi3eSnFKPFydw4wUpHeVUO1s1fY4DI6y1bps X9PNU9x+ScJ/hhRl7dZkWkGYMp8kVCF/CJUG6tkVCH3+qYB9aGOBEOfUc4+O1Let99iK yslw== 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=JXmNIg+n7I/ItAgKk+U5shaeoW+m8BpdQ6itQMcVxoQ=; b=COFu7nZtwwn8x1N12Oqe+gHn5+aP+Uw2vKuDyYhLeJb++n583QD/Oqvgyhhi7N5vKU uuU4KzT+MD4kmTtoU6wSU0kC9IfulU4MaSj2YsBf7c3NdgWK8aUupGOpa7Vj3lSV7P0T lsS9vVqosB+HYLiodbhujaXmPogIbNHb+W47NyIFDy3vBi8j0Qr2LRYGQGcEfU1K8hp2 +8ttnM/yPEXyS+9j6Z04UkeoJ5MWBk0NnA3oP8pdz2ixwXcEyI2on0/dIWCBkV06XW32 TcUVDiYUyfrwnPTrEiGcPhGtya1Uc0Nj4MhwWKd0KRFBUrfzWVL9yBr6RYsmVnC33kOD COOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Lg49AQR9; 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 s17si13677569pgm.852.2022.01.24.14.18.09; Mon, 24 Jan 2022 14:18:24 -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=Lg49AQR9; 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 S1580841AbiAXWKu (ORCPT + 99 others); Mon, 24 Jan 2022 17:10:50 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:45234 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1452401AbiAXVZ2 (ORCPT ); Mon, 24 Jan 2022 16:25:28 -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 59AAE61490; Mon, 24 Jan 2022 21:25:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32E06C340E9; Mon, 24 Jan 2022 21:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059527; bh=eFTZK+BDoNPOY/zrtFGms/hGWY8oU/F68SCn7MXvx3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lg49AQR9kaj636vLB9iCi3UZZr4F90hygygjKR32xiA8MiTlNwuDAb9X+OmfHBMfV gx6W37WQNeKc0paTVLytVg3XabQnvujL16/A1JKflAFNCm100e3/hzP07VuDmxbTMo aDc7PBvTDqBUsBkDYLcsCV5pgmZED2Wj2/Rst6rQ= 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.16 0645/1039] net: bonding: debug: avoid printing debug logs when bond is not notifying peers Date: Mon, 24 Jan 2022 19:40:34 +0100 Message-Id: <20220124184147.033735836@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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 ff8da720a33a7..0ac964359fbfe 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1096,9 +1096,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 || @@ -1106,6 +1103,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