mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-12 22:28:44 +00:00
Export event doesn't have to be postponed before requeuing as an export-stop event
This commit is contained in:
parent
769224d79c
commit
ff86f23dc7
@ -2188,19 +2188,16 @@ rt_stop_export(struct rt_export_request *req, void (*stopped)(struct rt_export_r
|
|||||||
ASSERT_DIE(req->hook);
|
ASSERT_DIE(req->hook);
|
||||||
struct rt_export_hook *hook = req->hook;
|
struct rt_export_hook *hook = req->hook;
|
||||||
|
|
||||||
/* Cancel the feeder event */
|
|
||||||
ev_postpone(&hook->event);
|
|
||||||
|
|
||||||
/* Stop feeding from the exporter */
|
/* Stop feeding from the exporter */
|
||||||
CALL(hook->table->class->stop, hook);
|
CALL(hook->table->class->stop, hook);
|
||||||
|
|
||||||
|
/* Update export state */
|
||||||
|
rt_set_export_state(hook, TES_STOP);
|
||||||
|
|
||||||
/* Reset the event as the stopped event */
|
/* Reset the event as the stopped event */
|
||||||
hook->event.hook = hook->table->class->done;
|
hook->event.hook = hook->table->class->done;
|
||||||
hook->stopped = stopped;
|
hook->stopped = stopped;
|
||||||
|
|
||||||
/* Update export state */
|
|
||||||
rt_set_export_state(hook, TES_STOP);
|
|
||||||
|
|
||||||
/* Run the stopped event */
|
/* Run the stopped event */
|
||||||
rt_send_export_event(hook);
|
rt_send_export_event(hook);
|
||||||
}
|
}
|
||||||
@ -4131,9 +4128,6 @@ rt_feed_by_fib(void *data)
|
|||||||
{
|
{
|
||||||
if ((c->h.req->addr_mode == TE_ADDR_NONE) || net_in_netX(n->n.addr, c->h.req->addr))
|
if ((c->h.req->addr_mode == TE_ADDR_NONE) || net_in_netX(n->n.addr, c->h.req->addr))
|
||||||
{
|
{
|
||||||
if (atomic_load_explicit(&c->h.export_state, memory_order_acquire) != TES_FEEDING)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!rt_prepare_feed(c, n, &block))
|
if (!rt_prepare_feed(c, n, &block))
|
||||||
{
|
{
|
||||||
FIB_ITERATE_PUT(fit);
|
FIB_ITERATE_PUT(fit);
|
||||||
@ -4173,9 +4167,6 @@ rt_feed_by_trie(void *data)
|
|||||||
if (!n)
|
if (!n)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (atomic_load_explicit(&c->h.export_state, memory_order_acquire) != TES_FEEDING)
|
|
||||||
RT_RETURN(tab);
|
|
||||||
|
|
||||||
if (!rt_prepare_feed(c, n, &block))
|
if (!rt_prepare_feed(c, n, &block))
|
||||||
{
|
{
|
||||||
RT_UNLOCK(tab);
|
RT_UNLOCK(tab);
|
||||||
|
Loading…
Reference in New Issue
Block a user