aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2021-04-25 08:51:57 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2021-04-25 08:58:06 +0000
commitc23385612da5dd3195a9b73bfb22bd969dbd26c2 (patch)
tree44c5f130feaacb0762ed6e6776ecced2240bbf5c
parenta81e2e7890c2fce2a74dbb859e6855e0414a6ea1 (diff)
downloadsrc-c23385612da5dd3195a9b73bfb22bd969dbd26c2.tar.gz
src-c23385612da5dd3195a9b73bfb22bd969dbd26c2.zip
[fib algo] Do not print algo attach/detach message on boot
MFC after: 1 day
-rw-r--r--sys/net/route/fib_algo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index cd7abd282728..43db482d73da 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -239,7 +239,9 @@ SYSCTL_INT(_net_route_algo, OID_AUTO, debug_level, CTLFLAG_RW | CTLFLAG_RWTUN,
#endif
#define _PASS_MSG(_l) (flm_debug_level >= (_l))
-#define ALGO_PRINTF(_fmt, ...) printf("[fib_algo] %s: " _fmt "\n", __func__, ##__VA_ARGS__)
+#define ALGO_PRINTF(_l, _fmt, ...) if (_PASS_MSG(_l)) { \
+ printf("[fib_algo] %s: " _fmt "\n", __func__, ##__VA_ARGS__); \
+}
#define _ALGO_PRINTF(_fib, _fam, _aname, _gen, _func, _fmt, ...) \
printf("[fib_algo] %s.%u (%s#%u) %s: " _fmt "\n",\
print_family(_fam), _fib, _aname, _gen, _func, ## __VA_ARGS__)
@@ -1971,7 +1973,7 @@ fib_module_register(struct fib_lookup_module *flm)
{
FIB_MOD_LOCK();
- ALGO_PRINTF("attaching %s to %s", flm->flm_name,
+ ALGO_PRINTF(LOG_INFO, "attaching %s to %s", flm->flm_name,
print_family(flm->flm_family));
TAILQ_INSERT_TAIL(&all_algo_list, flm, entries);
FIB_MOD_UNLOCK();
@@ -1995,7 +1997,7 @@ fib_module_unregister(struct fib_lookup_module *flm)
return (EBUSY);
}
fib_error_clear_flm(flm);
- ALGO_PRINTF("detaching %s from %s", flm->flm_name,
+ ALGO_PRINTF(LOG_INFO, "detaching %s from %s", flm->flm_name,
print_family(flm->flm_family));
TAILQ_REMOVE(&all_algo_list, flm, entries);
FIB_MOD_UNLOCK();