]> git.puffer.fish Git - mirror/frr.git/commit
zebra: add several fields for debug 14088/head
authoranlan_cs <anlan_cs@tom.com>
Tue, 25 Jul 2023 05:15:44 +0000 (13:15 +0800)
committeranlan_cs <anlan_cs@tom.com>
Tue, 25 Jul 2023 06:23:35 +0000 (14:23 +0800)
commit90bc24408b7a96f21eb7ddb16c14126a1b5eb965
tree24d4033f49a4ba395db799d01ee3ed317550f22e
parent9e32b73634a8bbe893f2425ee89ee27651d93408
zebra: add several fields for debug

Two changes for debug:
1. Add a field to indicate its vrf for nexthop.  When the interface changes
vrf, we can't easily know the vrf of this nexthop according to current log.
2. Add a field to indicate operation type.  We can't know whether to add or
remove route according to current log.

Before:
```
zebra_nhg_increment_ref: nhe 0x555623eb82c0 (76[if 6]) 0 => 1
zebra_interface_nhg_reinstall install nhe 75[77.75.1.75 if 6] nh type 3 flags 0x1
Route 77.75.1.0/24(8) queued for processing into sub-queue Early Route Processing
Route 77.75.1.0/24(8) queued for processing into sub-queue Early Route Processing
```

After:
```
zebra_nhg_increment_ref: nhe 0x555623eb82c0 (76[if 6 vrfid 9]) 0 => 1
zebra_interface_nhg_reinstall install nhe 75[77.75.1.75 if 6 vrfid 8] nh type 3 flags 0x1
Route 77.75.1.0/24(8) (add) queued for processing into sub-queue Early Route Processing
Route 77.75.1.0/24(8) (delete) queued for processing into sub-queue Early Route Processing
```

Signed-off-by: anlan_cs <anlan_cs@tom.com>
lib/nexthop.c
zebra/zebra_rib.c