In my code based on the user changing the ipsec backend I need to update the
node in my "encrypt" slots (for v4 and v6). I am calling
vlib_node_add_next_with_slot to do this; however, the function isn't doing what
I want.
Basically vlib_node_add_next_with_slot does the following:
if ((p = hash_get (node->next_slot_by_node, next_node_index)))
{
/* Next already exists: slot must match. */
if (slot != ~0)
ASSERT (slot == p[0]);
vlib_worker_thread_barrier_release (vm);
return p[0];
}
Prior to making the change. It does not remove any old node from
next_slot_by_node after it makes a change though. The result is that if you try
and add back a node that was previously added (and removed) to that slot the
function does nothing b/c it has this dangling reference in the hash table.
Now this could have been by design, but I suspect not as it really doesn't
serve any purpose, that I can see, to leave an old node "back" reference there
when it's no longer true.
If people agree I can submit a patch to remove the old hash table entry when
the slot is changed.
Thanks,
Chris.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14466): https://lists.fd.io/g/vpp-dev/message/14466
Mute This Topic: https://lists.fd.io/mt/40479963/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-