From 616bc4f4760f72918007a25b08a243b8912719f7 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 22 Dec 2015 15:00:04 +0000 Subject: [PATCH] If bootverbose is enabled every vnet startup and virtual interface creation will print extra lines on the console. We are generally not interested in this (repeated) information for each VNET. Thus only print it for the default VNET. Virtual interfaces on the base system will remain printing information, but e.g. each loopback in each vnet will no longer cause a "bpf attached" line. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D4531 --- sys/net/bpf.c | 2 +- sys/netinet/tcp_subr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 985208b1975a..37edbe827537 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2551,7 +2551,7 @@ bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen, struct bpf_if **driverp) bp->bif_hdrlen = hdrlen; - if (bootverbose) + if (bootverbose && IS_DEFAULT_VNET(curvnet)) if_printf(ifp, "bpf attached\n"); } diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 687816575efa..045d516b383c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -609,7 +609,7 @@ tcp_init(void) */ if (hashsize < 512) hashsize = 512; - if (bootverbose) + if (bootverbose && IS_DEFAULT_VNET(curvnet)) printf("%s: %s auto tuned to %d\n", __func__, tcbhash_tuneable, hashsize); }