summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly McFall <bmcfall@redhat.com>2016-09-14 10:39:58 -0400
committerBilly McFall <bmcfall@redhat.com>2016-09-14 10:59:04 -0400
commit4eaae3d363a18b47cb8a0a2937e1da177b9aecc9 (patch)
treece973d75d200d8c62bc2a84319654a59b29c046b
parent56ca4b7688acdd0778de23a9b43c73707b05516b (diff)
VPP-306: Document changes for vnet/vnet/vxlan
Change-Id: I1ec4a80ee431758998716014e3fb6f80a5b9c168 Signed-off-by: Billy McFall <bmcfall@redhat.com>
-rw-r--r--vnet/vnet/vxlan/dir.dox24
-rw-r--r--vnet/vnet/vxlan/vxlan.c53
2 files changed, 76 insertions, 1 deletions
diff --git a/vnet/vnet/vxlan/dir.dox b/vnet/vnet/vxlan/dir.dox
new file mode 100644
index 00000000000..31a9e2b6112
--- /dev/null
+++ b/vnet/vnet/vxlan/dir.dox
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2016 Cisco 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.
+ */
+
+/**
+@dir
+@brief VXLAN Code.
+
+This directory contains source code to support VXLAN.
+
+*/
+/*? %%clicmd:group_label VXLAN CLI %% ?*/
diff --git a/vnet/vnet/vxlan/vxlan.c b/vnet/vnet/vxlan/vxlan.c
index e10c0a85403..32ad7533e58 100644
--- a/vnet/vnet/vxlan/vxlan.c
+++ b/vnet/vnet/vxlan/vxlan.c
@@ -15,6 +15,23 @@
#include <vnet/vxlan/vxlan.h>
#include <vnet/ip/format.h>
+/**
+ * @file
+ * @brief VXLAN.
+ *
+ * VXLAN provides the features needed to allow L2 bridge domains (BDs)
+ * to span multiple servers. This is done by building an L2 overlay on
+ * top of an L3 network underlay using VXLAN tunnels.
+ *
+ * This makes it possible for servers to be co-located in the same data
+ * center or be separated geographically as long as they are reachable
+ * through the underlay L3 network.
+ *
+ * You can refer to this kind of L2 overlay bridge domain as a VXLAN
+ * (Virtual eXtensible VLAN) segment.
+ */
+
+
vxlan_main_t vxlan_main;
static u8 * format_decap_next (u8 * s, va_list * args)
@@ -548,13 +565,35 @@ vxlan_add_del_tunnel_command_fn (vlib_main_t * vm,
return 0;
}
+/*?
+ * Add or delete a VXLAN Tunnel.
+ *
+ * VXLAN provides the features needed to allow L2 bridge domains (BDs)
+ * to span multiple servers. This is done by building an L2 overlay on
+ * top of an L3 network underlay using VXLAN tunnels.
+ *
+ * This makes it possible for servers to be co-located in the same data
+ * center or be separated geographically as long as they are reachable
+ * through the underlay L3 network.
+ *
+ * You can refer to this kind of L2 overlay bridge domain as a VXLAN
+ * (Virtual eXtensible VLAN) segment.
+ *
+ * @cliexpar
+ * Example of how to create a VXLAN Tunnel:
+ * @cliexcmd{create vxlan tunnel src 10.0.3.1 dst 10.0.3.3 vni 13 encap-vrf-id 7 decap-next l2}
+ * Example of how to delete a VXLAN Tunnel:
+ * @cliexcmd{create vxlan tunnel src 10.0.3.1 dst 10.0.3.3 vni 13 del}
+ ?*/
+/* *INDENT-OFF* */
VLIB_CLI_COMMAND (create_vxlan_tunnel_command, static) = {
.path = "create vxlan tunnel",
.short_help =
"create vxlan tunnel src <local-vtep-addr> dst <remote-vtep-addr> vni <nn>"
- " [encap-vrf-id <nn>] [decap-next [l2|ip4|ip6] [del]\n",
+ " [encap-vrf-id <nn>] [decap-next [l2|ip4|ip6]] [del]",
.function = vxlan_add_del_tunnel_command_fn,
};
+/* *INDENT-ON* */
static clib_error_t *
show_vxlan_tunnel_command_fn (vlib_main_t * vm,
@@ -575,10 +614,22 @@ show_vxlan_tunnel_command_fn (vlib_main_t * vm,
return 0;
}
+/*?
+ * Display all the VXLAN Tunnel entries.
+ *
+ * @cliexpar
+ * Example of how to display the VXLAN Tunnel entries:
+ * @cliexstart{show vxlan tunnel}
+ * [0] 10.0.3.1 (src) 10.0.3.3 (dst) vni 13 encap_fib_index 1 decap_next l2
+ * @cliexend
+ ?*/
+/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_vxlan_tunnel_command, static) = {
.path = "show vxlan tunnel",
+ .short_help = "show vxlan tunnel",
.function = show_vxlan_tunnel_command_fn,
};
+/* *INDENT-ON* */
clib_error_t *vxlan_init (vlib_main_t *vm)