]> git.puffer.fish Git - mirror/frr.git/commit
isisd: Add log-pdu-drops log functionality
authorIsabella de Leon <ideleon@microsoft.com>
Fri, 31 Mar 2023 00:00:39 +0000 (17:00 -0700)
committerIsabella de Leon <ideleon@microsoft.com>
Tue, 4 Apr 2023 16:23:21 +0000 (09:23 -0700)
commit4b24eae01dc531b3145bcfb7965aec13a350d39e
treead63bc83a948d3eca055d3f20e8d750290f33068
parent9ace83b9525677c8996fee56cf1ec28a02a96711
isisd: Add log-pdu-drops log functionality

If log-pdu-drops is configured, create an INFO log that displays the PDU type and drop counts when a PDU drop is detected.

Example logs:

2023/03/30 23:54:59.749 ISIS: [VAS9N-1JNNR] PDU drop detected of type: P2P IIH. 1 Total Drops; 0 L1 IIH drops;  0 L2 IIH drops; 1 P2P IIH drops; 0 L1 LSP drops; 0 L2 LSP drops; 0 FS LSP drops; 0 L1 CSNP drops; 0 L2 CSNP drops; 0 L1 PSNP drops; 0 L2 PSNP drops.
2023/03/30 23:54:59.848 ISIS: [VAS9N-1JNNR] PDU drop detected of type: P2P IIH. 2 Total Drops; 0 L1 IIH drops;  0 L2 IIH drops; 2 P2P IIH drops; 0 L1 LSP drops; 0 L2 LSP drops; 0 FS LSP drops; 0 L1 CSNP drops; 0 L2 CSNP drops; 0 L1 PSNP drops; 0 L2 PSNP drops.

Code changes:
Add a new PDU counter function that increments the drop counter and runs the logging functionality if log-pdu-drops is configured.

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
isisd/isis_pdu.c
isisd/isis_pdu.h
isisd/isis_pdu_counter.c
isisd/isis_pdu_counter.h