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 <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-03-29 07:50:19 -04:00
parent 347ded1ec8
commit 644a8d3560
3 changed files with 2 additions and 9 deletions

View File

@ -164,7 +164,6 @@ int32_t zebra_gr_client_disconnect(struct zserv *client)
zebra_gr_route_stale_delete_timer_expiry, info, zebra_gr_route_stale_delete_timer_expiry, info,
info->stale_removal_time, info->stale_removal_time,
&info->t_stale_removal); &info->t_stale_removal);
info->current_afi = AFI_IP;
info->stale_client_ptr = client; info->stale_client_ptr = client;
info->stale_client = true; info->stale_client = true;
LOG_GR("%s: Client %s vrf %s(%u) Stale timer update to %d", 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), __func__, zebra_route_string(client->proto),
VRF_LOGNAME(vrf), info->vrf_id); VRF_LOGNAME(vrf), info->vrf_id);
info->current_afi = 0;
zebra_gr_delete_stale_client(info); zebra_gr_delete_stale_client(info);
} }
} }
@ -565,7 +563,7 @@ done:
static int32_t zebra_gr_delete_stale_route(struct client_gr_info *info, static int32_t zebra_gr_delete_stale_route(struct client_gr_info *info,
struct zebra_vrf *zvrf) struct zebra_vrf *zvrf)
{ {
afi_t afi, curr_afi; afi_t afi;
uint8_t proto; uint8_t proto;
uint16_t instance; uint16_t instance;
struct zserv *s_client; 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; proto = s_client->proto;
instance = s_client->instance; instance = s_client->instance;
curr_afi = info->current_afi;
LOG_GR("%s: Client %s %s(%u) stale routes are being deleted", __func__, LOG_GR("%s: Client %s %s(%u) stale routes are being deleted", __func__,
zebra_route_string(proto), zvrf->vrf->name, zvrf->vrf->vrf_id); zebra_route_string(proto), zvrf->vrf->name, zvrf->vrf->vrf_id);
/* Process routes for all AFI */ /* 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 = struct zebra_gr_afi_clean *gac =
XCALLOC(MTYPE_ZEBRA_GR, sizeof(*gac)); XCALLOC(MTYPE_ZEBRA_GR, sizeof(*gac));

View File

@ -1152,7 +1152,6 @@ static void zebra_show_stale_client_detail(struct vty *vty,
info->t_stale_removal)); info->t_stale_removal));
} }
} }
vty_out(vty, "Current AFI : %d\n", info->current_afi);
} }
} }
vty_out(vty, "\n"); vty_out(vty, "\n");

View File

@ -51,9 +51,6 @@ struct client_gr_info {
/* VRF for which GR enabled */ /* VRF for which GR enabled */
vrf_id_t vrf_id; vrf_id_t vrf_id;
/* AFI */
afi_t current_afi;
/* Stale time and GR cap */ /* Stale time and GR cap */
uint32_t stale_removal_time; uint32_t stale_removal_time;
enum zserv_client_capabilities capabilities; enum zserv_client_capabilities capabilities;