• S
    net: bonding: debug: avoid printing debug logs when bond is not notifying peers · df86183c
    Suresh Kumar 提交于
    stable inclusion
    from linux-4.19.226
    commit 4cca06db20796f60ad83943b80664ef0d652dcac
    
    --------------------------------
    
    [ Upstream commit fee32de2 ]
    
    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: NSuresh Kumar <suresh2514@gmail.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    Signed-off-by: NSasha Levin <sashal@kernel.org>
    Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
    Signed-off-by: NLaibin Qiu <qiulaibin@huawei.com>
    Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
    df86183c
bond_main.c 138.4 KB