summaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat.api
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-02-25 11:14:53 +0100
committerFlorin Coras <florin.coras@gmail.com>2021-02-26 01:55:07 +0000
commit4d237874e5c9922330c62ac1b003a9a171c1bc3b (patch)
tree3ce74a3e85659124653e8406635bec29e156b9f2 /src/plugins/cnat/cnat.api
parent27647a27c7b1e800547e3a3ea97b099b25618177 (diff)
cnat: Add maglev support
* Backend choice in translations is controlled by lb_type switch allowing to enable Maglev. * Size of pool is set with cnat { maglev-len 1009 } Type: feature Change-Id: I956e19d70bc9f3b997b4f8042831164e4b559d17 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat.api')
-rw-r--r--src/plugins/cnat/cnat.api18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/cnat/cnat.api b/src/plugins/cnat/cnat.api
index 685f9e17146..2b79e0d1b8b 100644
--- a/src/plugins/cnat/cnat.api
+++ b/src/plugins/cnat/cnat.api
@@ -19,7 +19,7 @@
used to control the ABF plugin
*/
-option version = "0.1.0";
+option version = "0.2.0";
import "vnet/ip/ip_types.api";
import "vnet/fib/fib_types.api";
import "vnet/interface_types.api";
@@ -29,6 +29,20 @@ enum cnat_translation_flags:u8
CNAT_TRANSLATION_ALLOC_PORT = 1,
};
+enum cnat_endpoint_tuple_flags:u8
+{
+ /* Dont translate said endpoint tuple but
+ * still forward */
+ CNAT_EPT_NO_NAT = 1,
+};
+
+
+enum cnat_lb_type:u8
+{
+ CNAT_LB_TYPE_DEFAULT = 0,
+ CNAT_LB_TYPE_MAGLEV = 1,
+};
+
/* An enpoint is either
* An IP & a port
* An interface, an address familiy and a port */
@@ -44,6 +58,7 @@ typedef cnat_endpoint_tuple
{
vl_api_cnat_endpoint_t dst_ep;
vl_api_cnat_endpoint_t src_ep;
+ u8 flags;
};
typedef cnat_translation
@@ -53,6 +68,7 @@ typedef cnat_translation
vl_api_ip_proto_t ip_proto;
u8 is_real_ip;
u8 flags;
+ vl_api_cnat_lb_type_t lb_type;
u32 n_paths;
vl_api_cnat_endpoint_tuple_t paths[n_paths];
};