diff options
author | Billy McFall <bmcfall@redhat.com> | 2017-01-06 12:40:14 -0500 |
---|---|---|
committer | Chris Luke <chris_luke@comcast.com> | 2017-01-06 22:03:21 +0000 |
commit | a1b99dada3190d793555a075aa4eb3560c68fec7 (patch) | |
tree | b2e6acf6f84d52f5b48b3b7d8a7779198d0a3de0 /src | |
parent | c4aaee11468aa5ed7af01d0747d912493cff002d (diff) |
VPP-279: doxygen documentation for host interface CLI commands
Change-Id: I2c6c16688be35e2e122c2377ded467c68a4c5a97
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/devices/af_packet/cli.c | 38 | ||||
-rw-r--r-- | src/vnet/devices/af_packet/dir.dox | 29 |
2 files changed, 65 insertions, 2 deletions
diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c index 2cbd4152..5c55cb4f 100644 --- a/src/vnet/devices/af_packet/cli.c +++ b/src/vnet/devices/af_packet/cli.c @@ -32,6 +32,13 @@ #include <vnet/devices/af_packet/af_packet.h> +/** + * @file + * @brief CLI for Host Interface Device Driver. + * + * This file contains the source code for CLI for the host interface. + */ + static clib_error_t * af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) @@ -81,10 +88,27 @@ af_packet_create_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } +/*? + * Create a host interface that will attach to a linux AF_PACKET + * interface, one side of a veth pair. The veth pair must already + * exist. Once created, a new host interface will exist in VPP + * with the name '<em>host-<ifname></em>', where '<em><ifname></em>' + * is the name of the specified veth pair. Use the + * '<em>show interfaces</em>' command to display host interface details. + * + * @cliexpar + * Example of how to create a host interface tied to one side of an + * existing linux veth pair named vpp1: + * @cliexstart{create host-interface name vpp1} + * host-vpp1 + * @cliexend + * Once the host interface is created, enable the interface using: + * @cliexcmd{set interface state host-vpp1 up} +?*/ /* *INDENT-OFF* */ VLIB_CLI_COMMAND (af_packet_create_command, static) = { .path = "create host-interface", - .short_help = "create host-interface name <interface name> [hw-addr <mac>]", + .short_help = "create host-interface name <ifname> [hw-addr <mac-addr>]", .function = af_packet_create_command_fn, }; /* *INDENT-ON* */ @@ -119,10 +143,20 @@ af_packet_delete_command_fn (vlib_main_t * vm, unformat_input_t * input, return 0; } +/*? + * Delete a host interface. Use the linux interface name to identify + * the host interface to be deleted. In VPP, host interfaces are + * named as '<em>host-<ifname></em>', where '<em><ifname></em>' + * is the name of the linux interface. + * + * @cliexpar + * Example of how to delete a host interface named host-vpp1: + * @cliexcmd{delete host-interface name vpp1} +?*/ /* *INDENT-OFF* */ VLIB_CLI_COMMAND (af_packet_delete_command, static) = { .path = "delete host-interface", - .short_help = "delete host-interface name <interface name>", + .short_help = "delete host-interface name <ifname>", .function = af_packet_delete_command_fn, }; /* *INDENT-ON* */ diff --git a/src/vnet/devices/af_packet/dir.dox b/src/vnet/devices/af_packet/dir.dox new file mode 100644 index 00000000..78991c6d --- /dev/null +++ b/src/vnet/devices/af_packet/dir.dox @@ -0,0 +1,29 @@ +/* + * 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. + */ + +/* Doxygen directory documentation */ + +/** +@dir +@brief Host Interface Implementation. + +This directory contains the source code for Host Interface driver. The +Host Interface driver leverages the DPDK AF_PACKET driver. + + +*/ +/*? %%clicmd:group_label Host Interface %% ?*/ +/*? %%syscfg:group_label Host Interface %% ?*/ |