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

Details

Provenance
melifaroAuthored on Jun 22 2022, 3:04 PM
Differential Revision
D35525: routing: improve debug logging
Parents
rGf6ed05f12330: vendor/bc: update to upstream commit ca53adf83b7a
Branches
Unknown
Tags
Unknown