HomeFreeBSD

routing: improve debug logging

Description

routing: improve debug logging

Use standard logging (FIB_XX_LOG) across nhg code instead of using
old-style DPRINTFs.
Add debug object printer for nhgs (nhgrp_print_buf).

Example:

Jun 19 20:17:09 devel2 kernel: [nhgrp] inet.0 nhgrp_ctl_alloc_default: multipath init done
Jun 19 20:17:09 devel2 kernel: [nhg_ctl] inet.0 alloc_nhgrp: num_nhops: 2, compiled_nhop: 2

Jun 19 20:17:26 devel2 kernel: [nhg_ctl] inet.0 alloc_nhgrp: num_nhops: 3, compiled_nhop: 3
Jun 19 20:17:26 devel2 kernel: [nhg_ctl] inet.0 destroy_nhgrp: destroying nhg#0/sz=2:[#6:1,#5:1]

Differential Revision: https://reviews.freebsd.org/D35525
MFC after: 2 weeks

(cherry picked from commit 5d6894bd66e15bb7cf7c6ee2337ce86dfd0b2f7e)

Details

Provenance
melifaroAuthored on Jun 22 2022, 3:04 PM
Differential Revision
D35525: routing: improve debug logging
Parents
rG9cc645e3e382: netstat: print path weight when showing routes in structured output.
Branches
Unknown
Tags
Unknown