FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
netmap

create netmap

Summary/usage

create netmap name <ifname>|valeXXX:YYY [hw-addr <mac-addr>] [pipe] [master|slave].

Description

&#39;<em>netmap</em>&#39; is a framework for very fast packet I/O from userspace. &#39;<em>VALE</em>&#39; is an equally fast in-kernel software switch using the netmap API. &#39;<em>netmap</em>&#39; includes &#39;<em>netmap pipes</em>&#39;, a shared memory packet transport channel. Together, they provide a high speed user-space interface that allows VPP to patch into a linux namespace, a linux container, or a physical NIC without the use of DPDK. Netmap/VALE generates the &#39;<em>netmap.ko</em>&#39; kernel module that needs to be loaded before netmap interfaces can be created.

Create a netmap interface that will attach to a linux interface. The interface must already exist. Once created, a new netmap interface will exist in VPP with the name &#39;<em>netmap-<ifname></em>&#39;, where &#39;<em><ifname></em>&#39; takes one of two forms:

  • <b>ifname</b> - Linux interface to bind too.
  • <b>valeXXX:YYY</b> -
    • Where &#39;<em>valeXXX</em>&#39; is an arbitrary name for a VALE interface that must start with &#39;<em>vale</em>&#39; and is less than 16 characters.
    • Where &#39;<em>YYY</em>&#39; is an existing linux namespace.

This command has the following optional parameters:

  • <b>hw-addr <mac-addr></b> - Optional ethernet address, can be in either X:X:X:X:X:X unix or X.X.X cisco format.
  • <b>pipe</b> - Optional flag to indicate that a &#39;<em>netmap pipe</em>&#39; instance should be created.
  • <b>master | slave</b> - Optional flag to indicate whether VPP should be the master or slave of the &#39;<em>netmap pipe</em>&#39;. Only considered if &#39;<em>pipe</em>&#39; is entered. Defaults to &#39;<em>slave</em>&#39; if not entered.
Example usage
Example of how to create a netmap interface tied to the linux namespace &#39;<em>vpp1</em>&#39;:
vpp# create netmap name vale00:vpp1 hw-addr 02:FE:3F:34:15:9B pipe master
netmap-vale00:vpp1
Once the netmap interface is created, enable the interface using:
vpp# set interface state netmap-vale00:vpp1 up

Declaration and implementation

Declaration: netmap_create_command (extras/deprecated/netmap/cli.c line 152)

Implementation: netmap_create_command_fn.

delete netmap

Summary/usage

delete netmap name &lt;ifname&gt;|valeXXX:YYY.

Description

Delete a netmap interface. Use the &#39;<em><ifname></em>&#39; to identify the netmap interface to be deleted. In VPP, netmap interfaces are named as &#39;<em>netmap-<ifname></em>&#39;, where &#39;<em><ifname></em>&#39; takes one of two forms:

  • <b>ifname</b> - Linux interface to bind too.
  • <b>valeXXX:YYY</b> -
    • Where &#39;<em>valeXXX</em>&#39; is an arbitrary name for a VALE interface that must start with &#39;<em>vale</em>&#39; and is less than 16 characters.
    • Where &#39;<em>YYY</em>&#39; is an existing linux namespace.
Example usage
Example of how to delete a netmap interface named &#39;<em>netmap-vale00:vpp1</em>&#39;:
vpp# delete netmap name vale00:vpp1

Declaration and implementation

Declaration: netmap_delete_command (extras/deprecated/netmap/cli.c line 215)

Implementation: netmap_delete_command_fn.