mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-03 07:31:54 +00:00
TES_HUNGRY doesn't inhibit export cleanup any more
This commit is contained in:
parent
6d5929be24
commit
c1cb2dc31c
@ -3061,10 +3061,19 @@ rt_export_cleanup(struct rtable_private *tab)
|
|||||||
{
|
{
|
||||||
switch (atomic_load_explicit(&eh->h.export_state, memory_order_acquire))
|
switch (atomic_load_explicit(&eh->h.export_state, memory_order_acquire))
|
||||||
{
|
{
|
||||||
case TES_DOWN:
|
/* Export cleanup while feeding isn't implemented */
|
||||||
case TES_HUNGRY:
|
case TES_FEEDING:
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
/* States not interfering with export cleanup */
|
||||||
|
case TES_DOWN: /* This should not happen at all */
|
||||||
|
log(L_WARN "%s: Export cleanup found hook %s in explicit state TES_DOWN", tab->name, eh->h.req->name);
|
||||||
|
/* fall through */
|
||||||
|
case TES_HUNGRY: /* Feeding waiting for uncork */
|
||||||
|
case TES_STOP: /* No more export will happen on this hook */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Regular export */
|
||||||
case TES_READY:
|
case TES_READY:
|
||||||
{
|
{
|
||||||
struct rt_pending_export *last = atomic_load_explicit(&eh->last_export, memory_order_acquire);
|
struct rt_pending_export *last = atomic_load_explicit(&eh->last_export, memory_order_acquire);
|
||||||
@ -3081,8 +3090,7 @@ rt_export_cleanup(struct rtable_private *tab)
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* It's only safe to cleanup when the export state is idle or regular. No feeding or stopping allowed. */
|
bug("%s: Strange export state of hook %s: %d", tab->name, eh->h.req->name, atomic_load_explicit(&eh->h.export_state, memory_order_relaxed));
|
||||||
goto done;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user