From 644a8d3560100cb56df34e5da7ad5d1072ad7106 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 29 Mar 2023 07:50:19 -0400 Subject: [PATCH] zebra: remove current_afi as that it is no longer used After the restructure of the gr code to allow zebra_gr to have individual cleanups of afi, this is no longer necessary. Signed-off-by: Donald Sharp --- zebra/zebra_gr.c | 7 ++----- zebra/zserv.c | 1 - zebra/zserv.h | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/zebra/zebra_gr.c b/zebra/zebra_gr.c index fcf391a218..b74150b8a7 100644 --- a/zebra/zebra_gr.c +++ b/zebra/zebra_gr.c @@ -164,7 +164,6 @@ int32_t zebra_gr_client_disconnect(struct zserv *client) zebra_gr_route_stale_delete_timer_expiry, info, info->stale_removal_time, &info->t_stale_removal); - info->current_afi = AFI_IP; info->stale_client_ptr = client; info->stale_client = true; LOG_GR("%s: Client %s vrf %s(%u) Stale timer update to %d", @@ -475,7 +474,6 @@ static void zebra_gr_route_stale_delete_timer_expiry(struct event *thread) __func__, zebra_route_string(client->proto), VRF_LOGNAME(vrf), info->vrf_id); - info->current_afi = 0; zebra_gr_delete_stale_client(info); } } @@ -565,7 +563,7 @@ done: static int32_t zebra_gr_delete_stale_route(struct client_gr_info *info, struct zebra_vrf *zvrf) { - afi_t afi, curr_afi; + afi_t afi; uint8_t proto; uint16_t instance; struct zserv *s_client; @@ -579,13 +577,12 @@ static int32_t zebra_gr_delete_stale_route(struct client_gr_info *info, proto = s_client->proto; instance = s_client->instance; - curr_afi = info->current_afi; LOG_GR("%s: Client %s %s(%u) stale routes are being deleted", __func__, zebra_route_string(proto), zvrf->vrf->name, zvrf->vrf->vrf_id); /* Process routes for all AFI */ - for (afi = curr_afi; afi < AFI_MAX; afi++) { + for (afi = AFI_IP; afi < AFI_MAX; afi++) { struct zebra_gr_afi_clean *gac = XCALLOC(MTYPE_ZEBRA_GR, sizeof(*gac)); diff --git a/zebra/zserv.c b/zebra/zserv.c index 10227d17c1..6abd49310c 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1152,7 +1152,6 @@ static void zebra_show_stale_client_detail(struct vty *vty, info->t_stale_removal)); } } - vty_out(vty, "Current AFI : %d\n", info->current_afi); } } vty_out(vty, "\n"); diff --git a/zebra/zserv.h b/zebra/zserv.h index b62c76ba6c..90aa4d53f4 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -51,9 +51,6 @@ struct client_gr_info { /* VRF for which GR enabled */ vrf_id_t vrf_id; - /* AFI */ - afi_t current_afi; - /* Stale time and GR cap */ uint32_t stale_removal_time; enum zserv_client_capabilities capabilities; -- 2.39.5