From a1b99dada3190d793555a075aa4eb3560c68fec7 Mon Sep 17 00:00:00 2001 From: Billy McFall Date: Fri, 6 Jan 2017 12:40:14 -0500 Subject: VPP-279: doxygen documentation for host interface CLI commands Change-Id: I2c6c16688be35e2e122c2377ded467c68a4c5a97 Signed-off-by: Billy McFall --- src/vnet/devices/af_packet/cli.c | 38 ++++++++++++++++++++++++++++++++++++-- src/vnet/devices/af_packet/dir.dox | 29 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 src/vnet/devices/af_packet/dir.dox (limited to 'src/vnet') diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c index 2cbd415289e..5c55cb4f10e 100644 --- a/src/vnet/devices/af_packet/cli.c +++ b/src/vnet/devices/af_packet/cli.c @@ -32,6 +32,13 @@ #include +/** + * @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 'host-', where '' + * is the name of the specified veth pair. Use the + * 'show interfaces' 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 [hw-addr ]", + .short_help = "create host-interface name [hw-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 'host-', where '' + * 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 ", + .short_help = "delete host-interface name ", .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 00000000000..78991c6d97f --- /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 %% ?*/ -- cgit 1.2.3-korg