Merge pull request #12694 from donaldsharp/zebra_rib_dead_code

remove dead code
This commit is contained in:
Rafael Zalamena 2023-01-26 13:30:55 -03:00 committed by GitHub
commit 1596fa9c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 50 deletions

View File

@ -118,21 +118,6 @@ void wheel_delete(struct timer_wheel *wheel)
XFREE(MTYPE_TIMER_WHEEL, wheel); XFREE(MTYPE_TIMER_WHEEL, wheel);
} }
int wheel_stop(struct timer_wheel *wheel)
{
THREAD_OFF(wheel->timer);
return 0;
}
int wheel_start(struct timer_wheel *wheel)
{
if (!wheel->timer)
thread_add_timer_msec(wheel->master, wheel_timer_thread, wheel,
wheel->nexttime, &wheel->timer);
return 0;
}
int wheel_add_item(struct timer_wheel *wheel, void *item) int wheel_add_item(struct timer_wheel *wheel, void *item)
{ {
long long slot; long long slot;

View File

@ -89,16 +89,6 @@ struct timer_wheel *wheel_init(struct thread_master *master, int period,
*/ */
void wheel_delete(struct timer_wheel *); void wheel_delete(struct timer_wheel *);
/*
* Pause the Wheel from running
*/
int wheel_stop(struct timer_wheel *wheel);
/*
* Start the wheel running again
*/
int wheel_start(struct timer_wheel *wheel);
/* /*
* wheel - The Timer wheel being modified * wheel - The Timer wheel being modified
* item - The generic data structure that will be handed * item - The generic data structure that will be handed

View File

@ -4337,25 +4337,6 @@ void rib_update_table(struct route_table *table, enum rib_update_event event,
} }
} }
static void rib_update_handle_vrf(vrf_id_t vrf_id, enum rib_update_event event,
int rtype)
{
struct route_table *table;
if (IS_ZEBRA_DEBUG_EVENT)
zlog_debug("%s: Handling VRF %s event %s", __func__,
vrf_id_to_name(vrf_id), rib_update_event2str(event));
/* Process routes of interested address-families. */
table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id);
if (table)
rib_update_table(table, event, rtype);
table = zebra_vrf_table(AFI_IP6, SAFI_UNICAST, vrf_id);
if (table)
rib_update_table(table, event, rtype);
}
static void rib_update_handle_vrf_all(enum rib_update_event event, int rtype) static void rib_update_handle_vrf_all(enum rib_update_event event, int rtype)
{ {
struct zebra_router_table *zrt; struct zebra_router_table *zrt;
@ -4371,7 +4352,6 @@ static void rib_update_handle_vrf_all(enum rib_update_event event, int rtype)
struct rib_update_ctx { struct rib_update_ctx {
enum rib_update_event event; enum rib_update_event event;
bool vrf_all;
vrf_id_t vrf_id; vrf_id_t vrf_id;
}; };
@ -4399,10 +4379,7 @@ static void rib_update_handler(struct thread *thread)
ctx = THREAD_ARG(thread); ctx = THREAD_ARG(thread);
if (ctx->vrf_all)
rib_update_handle_vrf_all(ctx->event, ZEBRA_ROUTE_ALL); rib_update_handle_vrf_all(ctx->event, ZEBRA_ROUTE_ALL);
else
rib_update_handle_vrf(ctx->vrf_id, ctx->event, ZEBRA_ROUTE_ALL);
rib_update_ctx_fini(&ctx); rib_update_ctx_fini(&ctx);
} }
@ -4422,7 +4399,6 @@ void rib_update(enum rib_update_event event)
return; return;
ctx = rib_update_ctx_init(0, event); ctx = rib_update_ctx_init(0, event);
ctx->vrf_all = true;
thread_add_event(zrouter.master, rib_update_handler, ctx, 0, thread_add_event(zrouter.master, rib_update_handler, ctx, 0,
&t_rib_update_threads[event]); &t_rib_update_threads[event]);