From 5d4141383344bf244c572f9d23c0175d9573f41d Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Wed, 26 Jan 2022 00:07:57 -0500 Subject: 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 --- zebra/zebra_errors.h | 1 + 1 file changed, 1 insertion(+) (limited to 'zebra/zebra_errors.h') diff --git a/zebra/zebra_errors.h b/zebra/zebra_errors.h index 540c6dd7d0..5164de09d6 100644 --- a/zebra/zebra_errors.h +++ b/zebra/zebra_errors.h @@ -136,6 +136,7 @@ enum zebra_log_refs { EC_ZEBRA_ES_CREATE, EC_ZEBRA_GRE_SET_UPDATE, EC_ZEBRA_SRV6M_UNRELEASED_LOCATOR_CHUNK, + EC_ZEBRA_INTF_UPDATE_FAILURE, }; void zebra_error_init(void); -- cgit v1.2.3