diff options
author | Aloys Augustin <aloaugus@cisco.com> | 2021-09-16 20:53:14 +0200 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2021-09-22 09:02:18 +0000 |
commit | 6e4cfb506806a0e214a5498952c2587e128b4870 (patch) | |
tree | aed045509ce249c8a8d0a05468dad25bd316360e /src/vnet/ip/ip.api | |
parent | c3b62d1d132453390644171673ffbcd775d19850 (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/ip/ip.api')
-rw-r--r-- | src/vnet/ip/ip.api | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api index 28786fa5a90..ca1e2008e4f 100644 --- a/src/vnet/ip/ip.api +++ b/src/vnet/ip/ip.api @@ -20,7 +20,7 @@ called through a shared memory interface. */ -option version = "3.1.0"; +option version = "3.2.0"; import "vnet/interface_types.api"; import "vnet/fib/fib_types.api"; @@ -57,6 +57,35 @@ autoreply define ip_table_add_del vl_api_ip_table_t table; }; +/** \brief Allocate an unused table + A table can be added multiple times. + If a large number of tables are in use (millions), this API might + fail to find a free ID with very low probability, and will return + EAGAIN. A subsequent attempt may be successful. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param table - if table.table_id == ~0, vpp allocates an unused table_id and + proceeds as in ip_table_add_del with is_add = true + if table.table_id != ~0, vpp uses the table.table_id and + proceeds as in ip_table_add_del with is_add = true + table.table_id should never be 0 +*/ +define ip_table_allocate +{ + u32 client_index; + u32 context; + + vl_api_ip_table_t table; +}; + +define ip_table_allocate_reply +{ + u32 context; + i32 retval; + + vl_api_ip_table_t table; +}; + /** \brief Dump IP all fib tables @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request |