aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2021-09-16 20:53:14 +0200
committerNeale Ranns <neale@graphiant.com>2021-09-22 09:02:18 +0000
commit6e4cfb506806a0e214a5498952c2587e128b4870 (patch)
treeaed045509ce249c8a8d0a05468dad25bd316360e /src/vnet/fib
parentc3b62d1d132453390644171673ffbcd775d19850 (diff)
ip: add ip_table_allocate to api
Set tableID = ~0 for auto selection unused ID https://jira.fd.io/browse/VPP-1993 Type: improvement Change-Id: I4eec2cc1d18fc025196cb6ac4c9a4b374388eb56 Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r--src/vnet/fib/fib_table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/fib/fib_table.c b/src/vnet/fib/fib_table.c
index 7cc989d6324..f222828898b 100644
--- a/src/vnet/fib/fib_table.c
+++ b/src/vnet/fib/fib_table.c
@@ -1322,6 +1322,7 @@ fib_table_lock_dec (fib_table_t *fib_table,
{
vec_validate(fib_table->ft_locks, source);
+ ASSERT(fib_table->ft_locks[source] > 0);
fib_table->ft_locks[source]--;
fib_table->ft_total_locks--;
}
@@ -1350,7 +1351,7 @@ fib_table_unlock (u32 fib_index,
if (0 == fib_table->ft_total_locks)
{
/*
- * no more locak from any source - kill it
+ * no more lock from any source - kill it
*/
fib_table_destroy(fib_table);
}