X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip.api;fp=src%2Fvnet%2Fip%2Fip.api;h=ca1e2008e4f5b7a2df5f6590a00444929c3af19e;hb=6e4cfb506806a0e214a5498952c2587e128b4870;hp=28786fa5a90513b554bd45c805ef48dff411e1ee;hpb=c3b62d1d132453390644171673ffbcd775d19850;p=vpp.git 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