From 346b8b25d90acbbbc829ddf2227ab978ffdaec7a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 16 Dec 2022 10:27:18 -0500 Subject: [PATCH] debugnet: remove spurious message on boot In non-INVARIANTS kernels, hide the warning message printed by debugnet when an interface MTU is configured or link state changes, and debugnet cannot infer the number of mbuf clusters to reserve. The warning isn't really actionable and mostly serves to confuse users. Reviewed by: vangyzen, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D34393 --- sys/net/debugnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/net/debugnet.c b/sys/net/debugnet.c index 3295b33c3dd6..b41d93eca7fe 100644 --- a/sys/net/debugnet.c +++ b/sys/net/debugnet.c @@ -855,6 +855,9 @@ debugnet_any_ifnet_update(struct ifnet *ifp) * dn_init method is available. */ if (nmbuf == 0 || ncl == 0 || clsize == 0) { +#ifndef INVARIANTS + if (bootverbose) +#endif printf("%s: Bad dn_init result from %s (ifp %p), ignoring.\n", __func__, if_name(ifp), ifp); return;