From 3463f295e79bfc34e4e8164f4faabe2bb6d6ed2a Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Fri, 22 Feb 2019 14:12:46 -0500 Subject: [PATCH] zebra: Add error codes for nhg table insert failures Since we are using two different tables to hash the next groups with, lets add an error message in case there is a failure to insert into one of them. This will help to notify if the tables are not synced. Signed-off-by: Stephen Worley --- zebra/zebra_errors.c | 9 +++++++++ zebra/zebra_errors.h | 1 + 2 files changed, 10 insertions(+) diff --git a/zebra/zebra_errors.c b/zebra/zebra_errors.c index 65be47f4bc..74eddf51d0 100644 --- a/zebra/zebra_errors.c +++ b/zebra/zebra_errors.c @@ -283,6 +283,15 @@ static struct log_ref ferr_zebra_err[] = { .description = "Zebra received an event from inotify, but failed to read what it was.", .suggestion = "Notify a developer.", }, + { + .code = EC_ZEBRA_NHG_TABLE_INSERT_FAILED, + .title = + "Nexthop Group Hash Table Insert Failure", + .description = + "Zebra failed in inserting a Nexthop Group into its hash tables.", + .suggestion = + "Check to see if the entry already exists or if the netlink message was parsed incorrectly." + }, /* Warnings */ { .code = EC_ZEBRAING_LM_PROTO_MISMATCH, diff --git a/zebra/zebra_errors.h b/zebra/zebra_errors.h index f35c465975..37e0a22919 100644 --- a/zebra/zebra_errors.h +++ b/zebra/zebra_errors.h @@ -72,6 +72,7 @@ enum zebra_log_refs { EC_ZEBRA_VNI_DEL_FAILED, EC_ZEBRA_VTEP_ADD_FAILED, EC_ZEBRA_VNI_ADD_FAILED, + EC_ZEBRA_NHG_TABLE_INSERT_FAILED, /* warnings */ EC_ZEBRA_NS_NOTIFY_READ, EC_ZEBRAING_LM_PROTO_MISMATCH, -- 2.39.5