summaryrefslogtreecommitdiffstats
path: root/src/vnet/flow/flow.api
diff options
context:
space:
mode:
authorChenmin Sun <chenmin.sun@intel.com>2020-07-27 17:54:40 +0800
committerDamjan Marion <dmarion@me.com>2020-08-25 12:13:43 +0000
commitd0236f725d31e5e5d23e5f207b1a317fcd96a964 (patch)
tree9ff39dfeb54be6cc17899c999bb6a210a2585060 /src/vnet/flow/flow.api
parent4fa3aad33fffadec7b7614dc68c8f1d3d9f311c9 (diff)
flow: add vnet/flow formal API
This patch adds the API for vnet/flow infra. Currently this API supports the below flow types: VNET_FLOW_TYPE_IP4_N_TUPLE VNET_FLOW_TYPE_IP6_N_TUPLE VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED VNET_FLOW_TYPE_IP4_L2TPV3OIP VNET_FLOW_TYPE_IP4_IPSEC_ESP VNET_FLOW_TYPE_IP4_IPSEC_AH VNET_FLOW_TYPE_IP4_GTPU All the above flows are tested with Intel E810/X710 NIC Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: Icb8ae20cab9bdad6b120dddc3bd4fb1d85634f3f
Diffstat (limited to 'src/vnet/flow/flow.api')
-rw-r--r--src/vnet/flow/flow.api94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/vnet/flow/flow.api b/src/vnet/flow/flow.api
new file mode 100644
index 00000000000..b819847e998
--- /dev/null
+++ b/src/vnet/flow/flow.api
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2020 Intel and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+option version = "0.0.1";
+
+import "vnet/interface_types.api";
+import "vnet/ip/ip_types.api";
+import "vnet/flow/flow_types.api";
+
+/** \brief flow add request
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param flow - flow rule
+*/
+define flow_add
+{
+ u32 client_index;
+ u32 context;
+ vl_api_flow_rule_t flow;
+ option vat_help = "test flow add [src-ip <ip-addr/mask>] [dst-ip <ip-addr/mask>] [src-port <port/mask>] [dst-port <port/mask>] [proto <ip-proto>]";
+};
+
+/** \brief reply for adding flow
+ @param context - sender context, to match reply w/ request
+ @param retval - return code
+ @param flow_index - flow index, can be used for flow del/enable/disable
+*/
+define flow_add_reply
+{
+ u32 context;
+ i32 retval;
+ u32 flow_index;
+};
+
+/** \brief flow del request
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param flow_index - flow index
+*/
+autoreply define flow_del
+{
+ u32 client_index;
+ u32 context;
+ u32 flow_index;
+ option vat_help = "test flow del index <index>";
+};
+
+/** \brief flow enable request
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param flow_index - flow index
+ @param hw_if_index - hardware interface index
+*/
+autoreply define flow_enable
+{
+ u32 client_index;
+ u32 context;
+ u32 flow_index;
+ u32 hw_if_index;
+ option vat_help = "test flow enable index <index> <interface name>";
+};
+
+/** \brief flow disable request
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param flow_index - flow index
+ @param hw_if_index - hardware interface index
+*/
+autoreply define flow_disable
+{
+ u32 client_index;
+ u32 context;
+ u32 flow_index;
+ u32 hw_if_index;
+ option vat_help = "test flow disable index <index> <interface name>";
+};
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */