]> git.proxmox.com Git - mirror_frr.git/commit - zebra/dplane_fpm_nl.c
zebra: add support for protodown reason code
authorStephen Worley <sworley@nvidia.com>
Wed, 26 Jan 2022 05:07:57 +0000 (00:07 -0500)
committerStephen Worley <sworley@nvidia.com>
Wed, 9 Mar 2022 22:52:44 +0000 (17:52 -0500)
commit5d4141383344bf244c572f9d23c0175d9573f41d
tree9b0c897fd98627c3b9ee0591d8995b5567dcdd70
parent8e23507a638e4371618913d776e1e69c418e4995
zebra: add support for protodown reason code

Add support for setting the protodown reason code.

https://github.com/torvalds/linux/commit/829eb208e80d6db95c0201cb8fa00c2f9ad87faf

These patches handle all our netlink code for setting the reason.

For protodown reason we only set `frr` as the reason externally
but internally we have more descriptive reasoning available via
`show interface IFNAME`. The kernel only provides a bitwidth of 32
that all userspace programs have to share so this makes the most sense.

Since this is new functionality, it needs to be added to the dplane
pthread instead. So these patches, also move the protodown setting we
were doing before into the dplane pthread. For this, we abstract it a
bit more to make it a general interface LINK update dplane API. This
API can be expanded to support gernal link creation/updating when/if
someone ever adds that code.

We also move a more common entrypoint for evpn-mh and from zapi clients
like vrrpd. They both call common code now to set our internal flags
for protodown and protodown reason.

Also add debugging code for dumping netlink packets with
protodown/protodown_reason.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
18 files changed:
zebra/debug_nl.c
zebra/dplane_fpm_nl.c
zebra/if_netlink.c
zebra/if_netlink.h
zebra/interface.c
zebra/interface.h
zebra/kernel_netlink.c
zebra/rt_netlink.h
zebra/zapi_msg.c
zebra/zebra_dplane.c
zebra/zebra_dplane.h
zebra/zebra_errors.c
zebra/zebra_errors.h
zebra/zebra_evpn_mh.c
zebra/zebra_evpn_mh.h
zebra/zebra_nhg.c
zebra/zebra_rib.c
zebra/zebra_router.h