From nobody Fri May 3 17:45:01 2024 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6AC323422 for ; Thu, 1 Jun 2023 14:35:17 +0000 (UTC) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-4f3b9755961so1165426e87.0 for ; Thu, 01 Jun 2023 07:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares.net; s=google; t=1685630115; x=1688222115; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=qSfNwowBIrXwCmy959sjHFBtcspDeGLD1tqwKKW+7Ys=; b=dYbtu3UYUAEitxKc2CkYIYDng/Qda8jQs5za7qbAiCkvL9Nd2Ob+7VHS49pYO2NoVt yg2kKmMl53HdnezRVuhHaUmZvwnffiuGV4GU08wGa0LTm0dWKZZ/0niXyBQJqeS1NOze V/KEMob2jOiZpbcfAOwOXHWpZT+qSIAqZiARx6QwTfYmosmSFTC0GcvGda7i8Znh17zz 9BOPd/jDC3YviQI0T5alCHX8eK1sNiKmEWyirAAHRINW6nnGmEj3PwNGDnKTgMBvEZjq tasIt+U/qWOilP0SgQzXnCr1cpizRP9b9SvmF344OpjWylhrvJUxx+8adpmrKPjgG0v0 cwHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685630115; x=1688222115; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qSfNwowBIrXwCmy959sjHFBtcspDeGLD1tqwKKW+7Ys=; b=O1pobblOat6eIUScyY3bmrs/aNoHSBWT7709HasQHOwDey7WM71A+PcmVI2o+0tzfD QBBKCkqJRp2cPgopndmQC8UaoUPF4pAx3nrxXXDgNApLkgcVUGxJj13YEu0gBWM9hygi 3is6j25JoirbeCVuhTMvXHE8NzwkS4RyHbommakl7hXP9CEU68ZRYY4eEdwQuMgp4iKm LLMitzPZKmMFn/ggAc/8clFHbv9nenbifui9MtqOEWAxTU8gtQXf8V+27bVqFKPzbTco eSuUlGol8wcwVZG8RkFPU5Z0K6UYZ+m3fvl8U11u8+GP3dva6p0SqRSRw4hpIrQYOOMt ibnQ== X-Gm-Message-State: AC+VfDxQImWN0npUnpdrII0uPRpKPJpqoVVt4uFRzpg11gGOQ/HGqfyc bLXh19ObQ8yU1e6jGbh8uAfp5w== X-Google-Smtp-Source: ACHHUZ5kdMccQkoAlUzkaLwGRekQ/edux8f3fBn82uOO1QxrlGZsoZc+1Dp/R9dx8AQTzWnym2JCQQ== X-Received: by 2002:ac2:5479:0:b0:4f4:c30f:fafd with SMTP id e25-20020ac25479000000b004f4c30ffafdmr73943lfn.28.1685630115372; Thu, 01 Jun 2023 07:35:15 -0700 (PDT) Received: from vdi08.nix.tessares.net (static.219.156.76.144.clients.your-server.de. [144.76.156.219]) by smtp.gmail.com with ESMTPSA id bg22-20020a05600c3c9600b003f4283f5c1bsm9709927wmb.2.2023.06.01.07.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 07:35:15 -0700 (PDT) From: Matthieu Baerts Date: Thu, 01 Jun 2023 16:34:36 +0200 Subject: [PATCH net-next RFC] net: skip printing "link become ready" v6 msg Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230601-net-next-skip_print_link_becomes_ready-v1-1-c13e64c14095@tessares.net> X-B4-Tracking: v=1; b=H4sIAHuseGQC/z2OywrCMBBFf6XM2kAaTRduBT/AbZGQx2iH6jQkQ Sql/24q6OIuDgcOd4GMiTDDsVkg4YsyTVyh3TXgB8t3FBQqg5JqLzvZCsZSNxeRR4omJuJiHsS jceinJ2aT0Ia30M6rTutgrTpAjTmbUbhk2Q9b7lfZVEx4o/n7of+L5nI+wXVdP68tdLChAAAA To: mptcp@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Mat Martineau Cc: Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Matthieu Baerts X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4914; i=matthieu.baerts@tessares.net; h=from:subject:message-id; bh=GLrbycqPqRupQVxPfBAeQV/Ty59syypaKHGw+itKRJo=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBkeKyisVl+FfDll7sOFg0z9Ac39h4Ccw6u+9lvs 3VxxxUncW2JAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZHisogAKCRD2t4JPQmmg c/RaD/4o4Tn8sDVthZGvm2tBUx2KGQVHkcZAGGzkIo8G00uzwSysWhWPO15W/bJqvfl/QUk1PQu SNTv/14k1MprVsFlAaNnopYSG6wYUdSRDFXx9ysTX/htPfX/8fg0FMgLklW8Yxcetc7mTnab9mn 1Qgs0YKoXG8WNwTbu8OdkTd0tRJhl2UhxHM8tjRSn7tgP3awKIzDDkjIpV+TcwfmtvrwGOEVwix AdreqRACDHd/Y1JjsQ+GNKolWzl89DqRKpqXFIRgGteWKBjZ4rKlUnK2XR8t4MrcivwN61slPWs 77svn4X/Y9OF7s4xd51iWjFPZBXeG+q8iJH/5pOmad5WMGZN8/B1ror5bObph/Ay3drNx8flRW3 B19Lde6Tf1rQQHPi9vYl1D9ZnHnfp/Iyux3jgAtvTtlGJVJ3S/m7ri+Kj9PI8OnOCvCTwP1r3PF HGepXXBrTfMCovEZ4hsuHVURyIrHMibgS62aFCs+T9eGDChpk9Ivuyn16vScF8O8JGL2veaL4wn yhd9KDfvXZbedG9i5bxEz1IO8BKTh08QVj6m6lZB8q88Hf26nfJZmZpkJiKQLo7gZExmY95Wdgc gTv9WfPjkgj9dyCwsQpkzNdvIJabpAc6c+RarJIkReU3YvzkYEIU6RIUi7R+IiXwDBkndJjOlbn 86H63IHi/QwtbSQ== X-Developer-Key: i=matthieu.baerts@tessares.net; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 This following message is printed in the console each time a network device configured with an IPv6 addresses is ready to be used: ADDRCONF(NETDEV_CHANGE): : link becomes ready When netns are being extensively used -- e.g. by re-creating netns with veth to discuss with each other for testing purposes like mptcp_join.sh selftest does -- it generates a lot of messages: more than 700 when executing mptcp_join.sh with the latest version. =3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D RFC =3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D TL;DR: can we move this message to the debug level? Or is it better with a sysctl knob? Or something else? When looking at commit 3c21edbd1137 ("[IPV6]: Defer IPv6 device initialization until the link becomes ready.") which introduces this new message, it seems it had been added to verify that the new feature was working as expected. It could have then used a lower level than "info". It is unclear if this message can be useful. Maybe it can be used as a sign to know if there is something wrong, e.g. if a device is being regularly reconfigured by accident? But even then, I don't think that was its goal at the first place and clearly there are better ways to monitor and diagnose such issues. Do you see any usages? If this message is not that useful, it is probably better to simply lower its level, similar to commit 7c62b8dd5ca8 ("net/ipv6: lower the level of "link is not ready" messages"). If we can take this direction, we will just need to switch from pr_info() to pr_debug(). If this message can be useful in many situations, it would be good to have a way to turn it off because in some other situations, it floods the logs without providing any useful input. The proposition here is to have a new per netns sysctl knob to easily skip this specific message when needed. If we prefer to take this direction, we will still need to document the new knob and the modification in the MPTCP selftest should be done in a separated commit. Adding a new sysctl entry just for that seems a bit "heavy", maybe there are better ways that are still easy to put in place? Signed-off-by: Matthieu Baerts --- include/net/netns/ipv6.h | 1 + net/ipv6/addrconf.c | 5 +++-- net/ipv6/sysctl_net_ipv6.c | 9 +++++++++ tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index 3cceb3e9320b..721abf86052f 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h @@ -56,6 +56,7 @@ struct netns_sysctl_ipv6 { bool skip_notify_on_dev_down; u8 fib_notify_on_flag_change; u8 icmpv6_error_anycast_as_unicast; + bool skip_print_link_becomes_ready; }; =20 struct netns_ipv6 { diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 3797917237d0..9cf7b4932309 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3633,8 +3633,9 @@ static int addrconf_notify(struct notifier_block *thi= s, unsigned long event, idev->if_flags |=3D IF_READY; } =20 - pr_info("ADDRCONF(NETDEV_CHANGE): %s: link becomes ready\n", - dev->name); + if (!net->ipv6.sysctl.skip_print_link_becomes_ready) + pr_info("ADDRCONF(NETDEV_CHANGE): %s: link becomes ready\n", + dev->name); =20 run_pending =3D 1; } diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 94a0a294c6a1..c9e82377a8fa 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -213,6 +213,15 @@ static struct ctl_table ipv6_table_template[] =3D { .proc_handler =3D proc_doulongvec_minmax, .extra2 =3D &ioam6_id_wide_max, }, + { + .procname =3D "skip_print_link_becomes_ready", + .data =3D &init_net.ipv6.sysctl.skip_print_link_becomes_ready, + .maxlen =3D sizeof(int), + .mode =3D 0644, + .proc_handler =3D proc_dointvec_minmax, + .extra1 =3D SYSCTL_ZERO, + .extra2 =3D SYSCTL_ONE, + }, { } }; =20 diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index e74d3074ef90..ec7d66a0a57e 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -83,6 +83,7 @@ init_partial() ip netns exec $netns sysctl -q net.mptcp.pm_type=3D0 ip netns exec $netns sysctl -q net.ipv4.conf.all.rp_filter=3D0 ip netns exec $netns sysctl -q net.ipv4.conf.default.rp_filter=3D0 + ip netns exec $netns sysctl -q net.ipv6.skip_print_link_becomes_ready=3D1 if [ $checksum -eq 1 ]; then ip netns exec $netns sysctl -q net.mptcp.checksum_enabled=3D1 fi --- base-commit: 6f4b98147b8dfcabacb19b5c6abd087af66d0049 change-id: 20230601-net-next-skip_print_link_becomes_ready-5bc2655daa24 Best regards, --=20 Matthieu Baerts