#include <vppinfra/sparse_vec.h>
+/**
+ * @file
+ * @brief Ethernet Forwarding.
+ *
+ * Code in this file handles forwarding Layer 2 packets. This file calls
+ * the FIB lookup, packet learning and the packet flooding as necessary.
+ * Packet is then sent to the next graph node.
+ */
+
typedef struct
{
L2FWD_N_NEXT,
} l2fwd_next_t;
-/** Forward one packet based on the mac table lookup result */
+/** Forward one packet based on the mac table lookup result. */
static_always_inline void
l2fwd_process (vlib_main_t * vm,
VLIB_INIT_FUNCTION (l2fwd_init);
-/** Add the L3 input node for this ethertype to the next nodes structure */
+/** Add the L3 input node for this ethertype to the next nodes structure. */
void
l2fwd_register_input_type (vlib_main_t * vm,
ethernet_type_t type, u32 node_index)
/**
- * set subinterface forward enable/disable
+ * Set subinterface forward enable/disable.
* The CLI format is:
* set interface l2 forward <interface> [disable]
*/
return error;
}
+/*?
+ * Layer 2 unicast forwarding can be enabled and disabled on each
+ * interface and on each bridge-domain. Use this command to
+ * manage interfaces. It is enabled by default.
+ *
+ * @cliexpar
+ * Example of how to enable fowarding:
+ * @cliexcmd{set interface l2 forward GigabitEthernet0/8/0}
+ * Example of how to disable fowarding:
+ * @cliexcmd{set interface l2 forward GigabitEthernet0/8/0 disable}
+?*/
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (int_fwd_cli, static) = {
.path = "set interface l2 forward",