diff options
Diffstat (limited to 'docs/reference')
25 files changed, 0 insertions, 2351 deletions
diff --git a/docs/reference/cmdreference/index.rst b/docs/reference/cmdreference/index.rst deleted file mode 100644 index c791992f779..00000000000 --- a/docs/reference/cmdreference/index.rst +++ /dev/null @@ -1,57 +0,0 @@ -.. _cmdreference: - - -Useful Debug CLI -================== - -This is a reference guide for the vpp debug commands that are referenced within these documents. This is **NOT** a complete list. For a complete list refer to the Debug CLI section of the -`Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_. - -The debug CLI can be executed from a su (superuser) shell using the vppctl command. - -.. code-block:: console - - # sudo bash - # vppctl show interface - - Name Idx State Counter Count - TenGigabitEthernet86/0/0 1 up rx packets 6569213 - rx bytes 9928352943 - tx packets 50384 - tx bytes 3329279 - TenGigabitEthernet86/0/1 2 down - VirtualEthernet0/0/0 3 up rx packets 50384 - rx bytes 3329279 - tx packets 6569213 - tx bytes 9928352943 - drops 1498 - local0 0 down - -Commands can also be executed from the vppctl shell. - -.. code-block:: console - - # vppctl - - vpp# show interface - Name Idx State Counter Count - TenGigabitEthernet86/0/0 1 up rx packets 6569213 - rx bytes 9928352943 - tx packets 50384 - tx bytes 3329279 - TenGigabitEthernet86/0/1 2 down - VirtualEthernet0/0/0 3 up rx packets 50384 - rx bytes 3329279 - tx packets 6569213 - tx bytes 9928352943 - drops 1498 - local0 0 down - -.. toctree:: - :maxdepth: 3 - - interface/index.rst - ip/index.rst - show/index.rst - trace/index.rst - vhost/index.rst diff --git a/docs/reference/cmdreference/interface/basic.rst b/docs/reference/cmdreference/interface/basic.rst deleted file mode 100644 index 9848005502e..00000000000 --- a/docs/reference/cmdreference/interface/basic.rst +++ /dev/null @@ -1,89 +0,0 @@ -.. _interface: - -.. toctree:: - -Basic Interface Commands -========================= - -There are several commands that are associated to Basic Interface: - -* `Show Interface`_ -* `Clear Interfaces`_ - -.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ . - -.. _showintcommand: - -Show Interface -++++++++++++++++ -Shows software interface information including counters and features. - -Summary/Usage -------------- - -.. code-block:: shell - - show interface [address|addr|features|feat] [<interface> [<interface> [..]]] - -Examples --------- - -Example of how to show the interface counters: - -.. code-block:: console - - vpp# show int - Name Idx State Counter Count - TenGigabitEthernet86/0/0 1 up rx packets 6569213 - rx bytes 9928352943 - tx packets 50384 - tx bytes 3329279 - TenGigabitEthernet86/0/1 2 down - VirtualEthernet0/0/0 3 up rx packets 50384 - rx bytes 3329279 - tx packets 6569213 - tx bytes 9928352943 - drops 1498 - local0 0 down - -Example of how to display the interface placement: - -.. code-block:: console - - vpp# show interface rx-placement - Thread 1 (vpp_wk_0): - node dpdk-input: - GigabitEthernet7/0/0 queue 0 (polling) - node vhost-user-input: - VirtualEthernet0/0/12 queue 0 (polling) - VirtualEthernet0/0/12 queue 2 (polling) - VirtualEthernet0/0/13 queue 0 (polling) - VirtualEthernet0/0/13 queue 2 (polling) - Thread 2 (vpp_wk_1): - node dpdk-input: - GigabitEthernet7/0/1 queue 0 (polling) - node vhost-user-input: - VirtualEthernet0/0/12 queue 1 (polling) - VirtualEthernet0/0/12 queue 3 (polling) - VirtualEthernet0/0/13 queue 1 (polling) - VirtualEthernet0/0/13 queue 3 (polling) - -Clear Interfaces -+++++++++++++++++ -Clear the statistics for all interfaces (statistics associated with the -'*show interface*' command). - -Summary/Usage -------------- - -.. code-block:: shell - - clear interfaces - -Example -------- -Example of how to clear the statistics for all interfaces: - -.. code-block:: console - - vpp# clear interfaces diff --git a/docs/reference/cmdreference/interface/create_interface.rst b/docs/reference/cmdreference/interface/create_interface.rst deleted file mode 100644 index fa50c6a626c..00000000000 --- a/docs/reference/cmdreference/interface/create_interface.rst +++ /dev/null @@ -1,224 +0,0 @@ -.. _interface: - -.. toctree:: - -Create Interfaces Commands -=========================== -This section contains those interface commands that are associated to creating an interface: - -* `Create Host-Interface`_ -* `Create Interface Memif`_ -* `Create Loopback Interface`_ -* `Create Sub-Interfaces`_ - -.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ . - -Create Host-Interface -++++++++++++++++++++++ -Summary/Usage -------------- - -create host-interface name <*ifname*> [*hw-addr <*mac-addr*>] - -Description ------------- - -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-<*ifname*>', where '<*ifname*>' is the name of the specified veth pair. -Use the `show interface` command to display host interface details. - -This command has the following optional parameters: - - hw-addr <*mac-addr*> - Optional ethernet address, can be in either X:X:X:X:X:X unix or X.X.X cisco format - -Example Usage -------------- - -Example of how to create a host interface tied to one side of an existing linux veth pair named vpp1: - - .. code-block:: console - - vpp# create host-interface name vpp1 - - host-vpp1 - -Once the host interface is created, enable the interface using: - - .. code-block:: console - - vpp# set interface state host-vpp1 up - -Declaration and Implementation -------------------------------- - -**Declaration:** af_packet_create_command (src/vnet/devices/af_packet/cli.c line 133) - -**Implementation:** af_packet_create_command_fn - -Create Interface Memif -+++++++++++++++++++++++ - -Summary/Usage -------------- - -create interface memif [id <*id*>] [socket-id <*socket-id*>] [ring-size <*size*>] [buffer-size <*size*>] [hw-addr <*mac-address*>] <master|slave> [rx-queues <*number*>] [tx-queues <*number*>] [mode ip] [secret <*string*>] - -Declaration and Implementation -------------------------------- - -**Declaration:** memif_create_command (src/plugins/memif/cli.c line 258) - -**Implementation:** memif_create_command_fn - - -Create Loopback Interface -++++++++++++++++++++++++++ - -Summary/Usage --------------- - -create loopback interface [mac <*mac-addr*>] [instance <*instance*>] - -Description ------------- - -Create a loopback interface. Optionally, a MAC Address can be provided. If not provided, de:ad:00:00:00:<*loopId*> will be used. - -Example Usage --------------- -The following two command syntaxes are equivalent: - - .. code-block:: console - - vpp# loopback create-interface [mac <*mac-addr*>] [instance <*instance*>] - - vpp# create loopback interface [mac <*mac-addr*>] [instance <*instance*>] - -Example of how to create a loopback interface: - - .. code-block:: console - - vpp# create loopback interface - -Declaration and Implementation -------------------------------- - -**Declaration:** create_loopback_interface_command (src/vnet/ethernet/interface.c line 879) - -**Implementation:** create_simulated_ethernet_interfaces - - -Create Sub-Interfaces -++++++++++++++++++++++ - -This command is used to add VLAN IDs to interfaces, also known as -subinterfaces. The primary input to this command is the *interface* -and *subId* (subinterface Id) parameters. If no additional VLAN ID is -provide, the VLAN ID is assumed to be the *subId*. The VLAN ID and -*subId* can be different, but this is not recommended. - -This command has several variations: - -- **create sub-interfaces** <*interface*> <*subId*> - Create a subinterface - to process packets with a given 802.1q VLAN ID (same value as the - *subId*). -- **create sub-interfaces** <*interface*> <*subId*> default - Adding the - *default* parameter indicates that packets with VLAN IDs that do - not match any other subinterfaces should be sent to this - subinterface. -- **create sub-interfaces** <*interface*> <*subId*> untagged - Adding the - *untagged* parameter indicates that packets no VLAN IDs should be - sent to this subinterface. -- **create sub-interfaces** <*interface*> <*subId*>-<*subId*> - Create a - range of subinterfaces to handle a range of VLAN IDs. -- **create sub-interfaces** <*interface*> <*subId*> dot1q|dot1ad <*vlanId*>|any - [exact-match] - Use this command to explicitly specify the outer VLAN ID, - or to make the VLAN ID different from the *subId*. -- **create sub-interfaces** <*interface*> <*subId*> dot1q|dot1ad <*vlanId*>|any - inner-dot1q <*vlanId*>|any [exact-match] - Use this command to - specify the outer VLAN ID and the inner VLAN ID. - -When *dot1q* or *dot1ad* is explicitly entered, subinterfaces can be -configured as either *exact-match* or *non-exact match*. *Non-exact match* is -the CLI default. If *exact-match* is specified, packets must have the -same number of VLAN tags as the configuration. For *non-exact-match*, -packets must at least that number of tags. L3 (routed) interfaces must -be configured as exact-match. L2 interfaces are typically configured as -non-exact-match. If *dot1q* or *dot1ad* is NOT entered, then the -default behavior is *exact-match*. - -Use the **show interface** command to display all subinterfaces. - -Summary/Usage -------------- - -.. code-block:: shell - - create sub-interfaces <interface> {<subId> [default|untagged]} | {<subId>-<subId>} | {<subId> dot1q|dot1ad <vlanId>|any [inner-dot1q <vlanId>|any] [exact-match]} - -Example Usage --------------- - -Example of how to create a VLAN subinterface 11 to process packets on 802.1q VLAN ID 11: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 11 - -The previous example is shorthand and is equivalent to: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1q 11 exact-match - -Example of how to create a subinterface number that is different from the VLAN ID: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1q 100 - -Examples of how to create q-in-q and q-in-any subinterfaces: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1q 100 inner-dot1q 200 - vpp# create sub-interfaces GigabitEthernet2/0/0 12 dot1q 100 inner-dot1q any - -Examples of how to create dot1ad interfaces: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 11 dot1ad 11 - vpp# create sub-interfaces GigabitEthernet2/0/0 12 dot1ad 100 inner-dot1q 200 - -Examples of *exact-match* versus non-exact match. A packet with outer VLAN 100 and inner VLAN 200 would match this interface, because the default is non-exact match: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 5 dot1q 100 - -However, the same packet would NOT match this interface because *exact-match* is specified and only one VLAN is configured, but packet contains two VLANs: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 5 dot1q 100 exact-match - -Example of how to created a subinterface to process untagged packets: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 5 untagged - -Example of how to created a subinterface to process any packet with a VLAN ID that does not match any other subinterface: - -.. code-block:: console - - vpp# create sub-interfaces GigabitEthernet2/0/0 7 default - -When subinterfaces are created, they are in the down state. Example of how to enable a newly created subinterface: - -.. code-block:: console - - vpp# set interface GigabitEthernet2/0/0.7 up - diff --git a/docs/reference/cmdreference/interface/hardware.rst b/docs/reference/cmdreference/interface/hardware.rst deleted file mode 100644 index 2c28d655c4a..00000000000 --- a/docs/reference/cmdreference/interface/hardware.rst +++ /dev/null @@ -1,167 +0,0 @@ -.. _interface: - -.. toctree:: - -Hardware-Interfaces Commands -============================ -This section contains those interface commands that are related to hardware-interfaces: - - -* `Show Bridge-Domain`_ -* `Show Hardware-Interfaces`_ -* `Clear Hardware-Interfaces`_ - -.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ . - -Show Bridge-Domain -+++++++++++++++++++ - -Summary/Usage -------------- - -show bridge-domain [*bridge-domain-id* [detail|int|arp| *bd-tag* ]] - -Description ------------ - -Show a summary of all the bridge-domain instances or detailed view of a single bridge-domain. -Bridge-domains are created by adding an interface to a bridge using the **set interface l2 bridge** command. - -Example Usage -------------- -.. code-block:: console - - Example of displaying all bridge-domains: - - vpp# show bridge-domain - - ID Index Learning U-Forwrd UU-Flood Flooding ARP-Term BVI-Intf - 0 0 off off off off off local0 - 200 1 on on on on off N/A - - Example of displaying details of a single bridge-domains: - - vpp# show bridge-domain 200 detail - - ID Index Learning U-Forwrd UU-Flood Flooding ARP-Term BVI-Intf - 200 1 on on on on off N/A - - Interface Index SHG BVI VLAN-Tag-Rewrite - GigabitEthernet0/8/0.200 3 0 - none - GigabitEthernet0/9/0.200 4 0 - none - -Declaration and Implementation ------------------------------- - -**Declaration:** bd_show_cli (src/vnet/l2/l2_bd.c line 1151) - -**Implementation:** bd_show - -Show Hardware-Interfaces -+++++++++++++++++++++++++ -Display more detailed information about all or a list of given -interfaces. The verboseness of the output can be controlled by the -following optional parameters: - -- **brief**: Only show name, index and state (default for bonded - interfaces). -- **verbose**: Also display additional attributes (default for all other - interfaces). -- **detail**: Also display all remaining attributes and extended - statistics. - -.. note:: - To limit the output of the command to bonded interfaces and their - slave interfaces, use the '*bond*' optional parameter. - -Summary/Usage -------------- - -.. code-block:: shell - - show hardware-interfaces [brief|verbose|detail] [bond] [<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]]. - -Examples --------- -Example of how to display default data for all interfaces: - -.. code-block:: console - - vpp# show hardware-interfaces - Name Idx Link Hardware - GigabitEthernet7/0/0 1 up GigabitEthernet7/0/0 - Ethernet address ec:f4:bb:c0:bc:fc - Intel e1000 - carrier up full duplex speed 1000 mtu 9216 - rx queues 1, rx desc 1024, tx queues 3, tx desc 1024 - cpu socket 0 - GigabitEthernet7/0/1 2 up GigabitEthernet7/0/1 - Ethernet address ec:f4:bb:c0:bc:fd - Intel e1000 - carrier up full duplex speed 1000 mtu 9216 - rx queues 1, rx desc 1024, tx queues 3, tx desc 1024 - cpu socket 0 - VirtualEthernet0/0/0 3 up VirtualEthernet0/0/0 - Ethernet address 02:fe:a5:a9:8b:8e - VirtualEthernet0/0/1 4 up VirtualEthernet0/0/1 - Ethernet address 02:fe:c0:4e:3b:b0 - VirtualEthernet0/0/2 5 up VirtualEthernet0/0/2 - Ethernet address 02:fe:1f:73:92:81 - VirtualEthernet0/0/3 6 up VirtualEthernet0/0/3 - Ethernet address 02:fe:f2:25:c4:68 - local0 0 down local0 - local - -Example of how to display *verbose* data for an interface by name and software index -(where 2 is the software index): - -.. code-block:: console - - vpp# show hardware-interfaces GigabitEthernet7/0/0 2 verbose - Name Idx Link Hardware - GigabitEthernet7/0/0 1 up GigabitEthernet7/0/0 - Ethernet address ec:f4:bb:c0:bc:fc - Intel e1000 - carrier up full duplex speed 1000 mtu 9216 - rx queues 1, rx desc 1024, tx queues 3, tx desc 1024 - cpu socket 0 - GigabitEthernet7/0/1 2 down GigabitEthernet7/0/1 - Ethernet address ec:f4:bb:c0:bc:fd - Intel e1000 - carrier up full duplex speed 1000 mtu 9216 - rx queues 1, rx desc 1024, tx queues 3, tx desc 1024 - cpu socket 0 - -Clear Hardware-Interfaces -+++++++++++++++++++++++++ - -Clear the extended statistics for all or a list of given interfaces -(statistics associated with the **show hardware-interfaces** command). - - -Summary/Usage -------------- - -.. code-block:: shell - - clear hardware-interfaces [<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]]. - - -Examples --------- - -Example of how to clear the extended statistics for all interfaces: - - -.. code-block:: console - - vpp# clear hardware-interfaces - -Example of how to clear the extended statistics for an interface by name and software index -(where 2 is the software index): - -.. code-block:: console - - vpp# clear hardware-interfaces GigabitEthernet7/0/0 2 - - diff --git a/docs/reference/cmdreference/interface/index.rst b/docs/reference/cmdreference/interface/index.rst deleted file mode 100644 index 9e7fd17a00a..00000000000 --- a/docs/reference/cmdreference/interface/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. _interface: - -.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ . - -.. _intcommands: - -Interface Commands -================== -This section identifies the following types of interface commands: - -.. toctree:: - :maxdepth: 2 - - basic - hardware - create_interface - setinterface -
\ No newline at end of file diff --git a/docs/reference/cmdreference/interface/setinterface.rst b/docs/reference/cmdreference/interface/setinterface.rst deleted file mode 100644 index 69063582dcf..00000000000 --- a/docs/reference/cmdreference/interface/setinterface.rst +++ /dev/null @@ -1,193 +0,0 @@ -.. _interface:
-
-.. toctree::
-
-Set Interface Commands
-=======================
-This section covers those commands that are related to setting an interface:
-
-* `Set Interface`_
-* `Set Interface IP Address`_
-* `Set Interface L2 Bridge`_
-* `Set Interface MTU`_
-* `Set Interface Promiscuous`_
-* `Set Interface State`_
-
-.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ .
-
-Set Interface
-++++++++++++++++
-
-Summary/Usage
--------------
-
-Interface commands.
-
-Declaration and Implementation
--------------------------------
-
-**Declaration:** vnet_cli_set_interface_command (src/vnet/interface_cli.c line 484)
-
-Set Interface IP Address
-+++++++++++++++++++++++++
-
-Summary/Usage
--------------
-
-set interface ip address [del] <*interface*> <*ip-addr*>/<*mask*> | [all]
-
-Description
--------------
-
-Add an IP Address to an interface or remove and IP Address from an interface.
-The IP Address can be an IPv4 or an IPv6 address. Interfaces may have multiple IPv4 and IPv6
-addresses. There is no concept of primary vs. secondary interface addresses; they're just addresses.
-
-To display the addresses associated with a given interface, use the command **show interface address** <*interface*>.
-
-.. note::
- The debug CLI does not enforce classful mask-width / addressing constraints.
-
-Example Usage
---------------
-
-An example of how to add an IPv4 address to an interface:
-
-.. code-block:: console
-
- vpp# set interface ip address GigabitEthernet2/0/0 172.16.2.12/24
-
-An example of how to add an IPv6 address to an interface:
-
-.. code-block:: console
-
- vpp# set interface ip address GigabitEthernet2/0/0 ::a:1:1:0:7/126
-
-To delete a specific interface ip address:
-
-.. code-block:: console
-
- vpp# set interface ip address GigabitEthernet2/0/0 172.16.2.12/24 del
-
-To delete all interfaces addresses (IPv4 and IPv6):
-
-.. code-block:: console
-
- vpp# set interface ip address GigabitEthernet2/0/0 del all
-
-Declaration and Implementation
--------------------------------
-
-**Declaration:** set_interface_ip_address_command (src/vnet/ip/ip46_cli.c line 216)
-
-**Implementation:** add_del_ip_address
-
-
-Set Interface L2 Bridge
-+++++++++++++++++++++++++
-
-Summary/Usage
--------------
-
-set interface l2 bridge <*interface*> <*bridge-domain-id*> [bvi|uu-fwd] [shg]
-
-Description
--------------
-
-Use this command put an interface into Layer 2 bridge domain. If a bridge-domain with the provided
-bridge-domain-id does not exist, it will be created. Interfaces in a bridge-domain forward packets
-to other interfaces in the same bridge-domain based on destination mac address. To remove an interface
-from a the Layer 2 bridge domain, put the interface in a different mode, for example Layer 3 mode.
-
-Optionally, an interface can be added to a Layer 2 bridge-domain as a Bridged Virtual Interface (bvi).
-Only one interface in a Layer 2 bridge-domain can be a bvi.
-
-Optionally, a split-horizon group can also be specified. This defaults to 0 if not specified.
-
-Example Usage
---------------
-Example of how to configure a Layer 2 bridge-domain with three interfaces (where 200 is the bridge-domain-id):
-
-.. code-block:: console
-
- vpp# set interface l2 bridge GigabitEthernet0/8/0.200 200
-
-This interface is added a BVI interface:
-
-.. code-block:: console
-
- vpp# set interface l2 bridge GigabitEthernet0/9/0.200 200 bvi
-
-This interface also has a split-horizon group of 1 specified:
-
-.. code-block:: console
-
- vpp# set interface l2 bridge GigabitEthernet0/a/0.200 200 1
-
-Example of how to remove an interface from a Layer2 bridge-domain:
-
-.. code-block:: console
-
- vpp# set interface l3 GigabitEthernet0/a/0.200
-
-Declaration and Implementation
--------------------------------
-
-**Declaration:** int_l2_bridge_cli (src/vnet/l2/l2_input.c line 949)
-
-**Implementation:** int_l2_bridge
-
-Set Interface MTU
-++++++++++++++++++
-
-Summary/Usage
--------------
-
-.. code-block:: shell
-
- set interface mtu [packet|ip4|ip6|mpls] <value> <interface>
-
-Set Interface Promiscuous
-++++++++++++++++++++++++++
-
-Summary/Usage
--------------
-
-.. code-block:: shell
-
- set interface promiscuous [on|off] <interface>.
-
-.. _setintstate:
-
-Set Interface State
-++++++++++++++++++++
-This command is used to change the admin state (up/down) of an
-interface.
-
-If an interface is down, the optional *punt* flag can also be set. The
-*punt* flag implies the interface is disabled for forwarding but punt
-all traffic to slow-path. Use the *enable* flag to clear *punt* flag
-(interface is still down).
-
-Summary/Usage
--------------
-
-.. code-block:: shell
-
- set interface state <interface> [up|down|punt|enable].
-
-Example Usage
-----------------
-
-Example of how to configure the admin state of an interface to **up**:
-
-.. code-block:: console
-
- vpp# set interface state GigabitEthernet2/0/0 up
-
-Example of how to configure the admin state of an interface to **down**:
-
-.. code-block:: console
-
- vpp# set interface state GigabitEthernet2/0/0 down
-
diff --git a/docs/reference/cmdreference/ip/index.rst b/docs/reference/cmdreference/ip/index.rst deleted file mode 100644 index 1a063210847..00000000000 --- a/docs/reference/cmdreference/ip/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. ip:
-
-.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ .
-
-IP Commands
-============
-This section identifies the following types of IP commands:
-
-.. toctree::
- :maxdepth: 2
-
- ip
\ No newline at end of file diff --git a/docs/reference/cmdreference/ip/ip.rst b/docs/reference/cmdreference/ip/ip.rst deleted file mode 100644 index a709215f45b..00000000000 --- a/docs/reference/cmdreference/ip/ip.rst +++ /dev/null @@ -1,151 +0,0 @@ -.. _ip1:
-
-.. toctree::
-
-.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ .
-
-IP Route
-==========
-
-Summary/Usage
---------------
-
-`ip route [add|del] [count <*n*>] <*dst-ip-addr*>/<*width*> [table <*table-id*>] via [next-hop-address[next-hop-interface] [next-hop-table <*value*>] [weight <*value*>] [preference <*value*>] [udp-encap-id <*value*>] [ip4-lookup-in-table <*value*>] [ip6-lookup-in-table <*value*>] [mpls-lookup-in-table <*value*>] [resolve-via-host] [resolve-via-connected] [rx-ip4 <*interface*>] [out-labels <*value value value*>]`
-
-Description
-------------
-
-This command is used to add or delete IPv4 or IPv6 routes. All IP Addresses
-('<*dst-ip-addr*>/<*width*>', '<*next-hop-ip-addr*>' and '<*adj-hop-ip-addr*>') can be IPv4 or IPv6,
-but all must be of the same form in a single command. To display the current set of routes,
-use the commands 'show ip fib' and 'show ip6 fib'.
-
-Example Usage
---------------
-
-Example of how to add a straight forward static route:
-
-.. code-block:: console
-
- vpp# ip route add 6.0.1.2/32 via 6.0.0.1 GigabitEthernet2/0/0
-
-Example of how to delete a straight forward static route:
-
-.. code-block:: console
-
- vpp# ip route del 6.0.1.2/32 via 6.0.0.1 GigabitEthernet2/0/0
-
-Mainly for route add/del performance testing, one can add or delete multiple routes by adding
-'count N' to the previous item:
-
-.. code-block:: console
-
- vpp# ip route add count 10 7.0.0.0/24 via 6.0.0.1 GigabitEthernet2/0/0
-
-Add multiple routes for the same destination to create equal-cost multipath:
-
-.. code-block:: console
-
- vpp# ip route add 7.0.0.1/32 via 6.0.0.1 GigabitEthernet2/0/0
-
- vpp# ip route add 7.0.0.1/32 via 6.0.0.2 GigabitEthernet2/0/0
-
-For unequal-cost multipath, specify the desired weights. This combination of weights
-results in 3/4 of the traffic following the second path, 1/4 following the first path:
-
-.. code-block:: console
-
- vpp# ip route add 7.0.0.1/32 via 6.0.0.1 GigabitEthernet2/0/0 weight 1
-
- vpp# ip route add 7.0.0.1/32 via 6.0.0.2 GigabitEthernet2/0/0 weight 3
-
-To add a route to a particular FIB table (VRF), use:
-
-.. code-block:: console
-
- vpp# ip route add 172.16.24.0/24 table 7 via GigabitEthernet2/0/0
-
-Declaration and Implementation
----------------------------------
-
-**Declaration:** ip_route_command (src/vnet/ip/lookup.c line 641)
-
-**Implementation:** vnet_ip_route_cmd
-
-Ping
-=====
-
-Summary/Usage
---------------
-
-ping {<*ip-addr*> | ipv4 <*ip4-addr*> | ipv6 <*ip6-addr*>} [ipv4 <*ip4-addr*> | ipv6 <*ip6-addr*>] [source <*interface*>] [size <*pktsize*>] [interval <*sec*>] [repeat <*cnt*>] [table-id <*id*>] [verbose]
-
-Description
-------------
-
-This command sends an ICMP ECHO_REQUEST to network hosts. The address can be an IPv4 or IPv6
-address (or both at the same time).
-
-Example Usage
---------------
-
-Example of how ping an IPv4 address:
-
-.. code-block:: console
-
- vpp# ping 172.16.1.2 source GigabitEthernet2/0/0 repeat 2
-
- 64 bytes from 172.16.1.2: icmp_seq=1 ttl=64 time=.1090 ms
- 64 bytes from 172.16.1.2: icmp_seq=2 ttl=64 time=.0914 ms
-
- Statistics: 2 sent, 2 received, 0% packet loss
-
- Example of how ping both an IPv4 address and IPv6 address at the same time:
-
- vpp# ping 172.16.1.2 ipv6 fe80::24a5:f6ff:fe9c:3a36 source GigabitEthernet2/0/0 repeat 2 verbose
-
- Adjacency index: 10, sw_if_index: 1
- Adj: ip6-discover-neighbor
- Adj Interface: 0
- Forced set interface: 1
- Adjacency index: 0, sw_if_index: 4294967295
- Adj: ip4-miss
- Adj Interface: 0
- Forced set interface: 1
- Source address: 172.16.1.1
- 64 bytes from 172.16.1.2: icmp_seq=1 ttl=64 time=.1899 ms
- Adjacency index: 10, sw_if_index: 1
- Adj: ip6-discover-neighbor
- Adj Interface: 0
- Forced set interface: 1
- Adjacency index: 0, sw_if_index: 4294967295
- Adj: ip4-miss
- Adj Interface: 0
- Forced set interface: 1
- Source address: 172.16.1.1
- 64 bytes from 172.16.1.2: icmp_seq=2 ttl=64 time=.0910 ms
-
- Statistics: 4 sent, 2 received, 50% packet loss
-
-Declaration and Implementation
--------------------------------
-
-Declaration: ping_command (src/vnet/ip/ping.c line 899)
-
-Implementation: ping_ip_address
-
-Set Interface IP Address
-=========================
-
-`Set Interface IP Address <../interface/setinterface.html#set-interface-ip-address>`_
-
-Show IP Arp
-=============
-
-`Show IP-Arp <../show/show.html#show-ip-arp>`_
-
-
-Show IP Fib
-============
-
-`Show IP-Fib <../show/show.html#show-ip-fib>`_
diff --git a/docs/reference/cmdreference/show/index.rst b/docs/reference/cmdreference/show/index.rst deleted file mode 100644 index 6f1e01284b2..00000000000 --- a/docs/reference/cmdreference/show/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. _interface:
-
-.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ .
-
-Show Commands
-==================
-This section identifies the following types of show commands:
-
-.. toctree::
- :maxdepth: 2
-
- show
\ No newline at end of file diff --git a/docs/reference/cmdreference/show/show.rst b/docs/reference/cmdreference/show/show.rst deleted file mode 100644 index 61c53604594..00000000000 --- a/docs/reference/cmdreference/show/show.rst +++ /dev/null @@ -1,286 +0,0 @@ -.. _interface:
-
-.. toctree::
-
-.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ .
-
-Show Bridge-Domain
-===================
-
-`Show Bridge-Domain <../interface/hardware.html#show-bridge-domain>`_
-
-Show Interface
-================
-
-`Show Interface <../interface/basic.html#show-interface>`_
-
-Show IP Arp
-============
-
-Summary/Usage
----------------
-
-show ip arp
-
-Description
-------------
-
-Display all the IPv4 ARP entries.
-
-Example Usage
---------------
-Example of how to display the IPv4 ARP table:
-
-.. code-block:: console
-
- vpp# **show ip arp**
- Time FIB IP4 Flags Ethernet Interface
- 346.3028 0 6.1.1.3 de:ad:be:ef:ba:be GigabitEthernet2/0/0
- 3077.4271 0 6.1.1.4 S de:ad:be:ef:ff:ff GigabitEthernet2/0/0
- 2998.6409 1 6.2.2.3 de:ad:be:ef:00:01 GigabitEthernet2/0/0
- Proxy arps enabled for:
- Fib_index 0 6.0.0.1 - 6.0.0.11
-
-
-Declaration and Implementation
--------------------------------
-
-**Declaration:** show_ip4_arp_command (src/vnet/ethernet/arp.c line 1465)
-
-**Implementation:** show_ip4_arp
-
-Show IP Fib
-=============
-
-Summary/Usage
----------------
-
-show ip fib [summary] [table <*table-id*>] [index <*fib-id*>] [<*ip4-addr*>[/<*mask*>]] [mtrie] [detail]
-
-Description
-------------
-
-This command displays the IPv4 FIB Tables (VRF Tables) and the route entries for each table.
-
-.. note::
- This command will run for a long time when the FIB tables are comprised of
- millions of entries. For those scenarios, consider displaying a single table or summary mode.
-
-Example Usage
---------------
-Example of how to display all the IPv4 FIB tables:
-
-.. code-block:: console
-
- vpp# **show ip fib**
-
- ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
- 0.0.0.0/0
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:0 buckets:1 uRPF:0 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 0.0.0.0/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:1 buckets:1 uRPF:1 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 6.0.1.2/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:30 buckets:1 uRPF:29 to:[0:0]]
- [0] [@3]: arp-ipv4: via 6.0.0.1 af_packet0
- 7.0.0.1/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:31 buckets:4 uRPF:30 to:[0:0]]
- [0] [@3]: arp-ipv4: via 6.0.0.2 af_packet0
- [1] [@3]: arp-ipv4: via 6.0.0.2 af_packet0
- [2] [@3]: arp-ipv4: via 6.0.0.2 af_packet0
- [3] [@3]: arp-ipv4: via 6.0.0.1 af_packet0
- 224.0.0.0/8
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:3 buckets:1 uRPF:3 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 240.0.0.0/8
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:2 buckets:1 uRPF:2 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 255.255.255.255/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:4 buckets:1 uRPF:4 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- ipv4-VRF:7, fib_index 1, flow hash: src dst sport dport proto
- 0.0.0.0/0
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:12 buckets:1 uRPF:11 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 0.0.0.0/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:13 buckets:1 uRPF:12 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 172.16.1.0/24
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:17 buckets:1 uRPF:16 to:[0:0]]
- [0] [@4]: ipv4-glean: af_packet0
- 172.16.1.1/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:18 buckets:1 uRPF:17 to:[1:84]]
- [0] [@2]: dpo-receive: 172.16.1.1 on af_packet0
- 172.16.1.2/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:21 buckets:1 uRPF:20 to:[0:0]]
- [0] [@5]: ipv4 via 172.16.1.2 af_packet0: IP4: 02:fe:9e:70:7a:2b -> 26:a5:f6:9c:3a:36
- 172.16.2.0/24
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:19 buckets:1 uRPF:18 to:[0:0]]
- [0] [@4]: ipv4-glean: af_packet1
- 172.16.2.1/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:20 buckets:1 uRPF:19 to:[0:0]]
- [0] [@2]: dpo-receive: 172.16.2.1 on af_packet1
- 224.0.0.0/8
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:15 buckets:1 uRPF:14 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 240.0.0.0/8
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:14 buckets:1 uRPF:13 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 255.255.255.255/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:16 buckets:1 uRPF:15 to:[0:0]]
- [0] [@0]: dpo-drop ip6
-
-Example of how to display a single IPv4 FIB table:
-
-.. code-block:: console
-
- vpp# **show ip fib table 7**
-
- ipv4-VRF:7, fib_index 1, flow hash: src dst sport dport proto
- 0.0.0.0/0
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:12 buckets:1 uRPF:11 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 0.0.0.0/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:13 buckets:1 uRPF:12 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 172.16.1.0/24
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:17 buckets:1 uRPF:16 to:[0:0]]
- [0] [@4]: ipv4-glean: af_packet0
- 172.16.1.1/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:18 buckets:1 uRPF:17 to:[1:84]]
- [0] [@2]: dpo-receive: 172.16.1.1 on af_packet0
- 172.16.1.2/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:21 buckets:1 uRPF:20 to:[0:0]]
- [0] [@5]: ipv4 via 172.16.1.2 af_packet0: IP4: 02:fe:9e:70:7a:2b -*> 26:a5:f6:9c:3a:36
- 172.16.2.0/24
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:19 buckets:1 uRPF:18 to:[0:0]]
- [0] [@4]: ipv4-glean: af_packet1
- 172.16.2.1/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:20 buckets:1 uRPF:19 to:[0:0]]
- [0] [@2]: dpo-receive: 172.16.2.1 on af_packet1
- 224.0.0.0/8
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:15 buckets:1 uRPF:14 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 240.0.0.0/8
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:14 buckets:1 uRPF:13 to:[0:0]]
- [0] [@0]: dpo-drop ip6
- 255.255.255.255/32
- unicast-ip4-chain
- [@0]: dpo-load-balance: [index:16 buckets:1 uRPF:15 to:[0:0]]
- [0] [@0]: dpo-drop ip6
-
-Example of how to display a summary of all IPv4 FIB tables:
-
-.. code-block:: console
-
- vpp# **show ip fib summary**
-
- ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
- Prefix length Count
- 0 1
- 8 2
- 32 4
- ipv4-VRF:7, fib_index 1, flow hash: src dst sport dport proto
- Prefix length Count
- 0 1
- 8 2
- 24 2
- 32 4
-
-Declaration and Implementation
--------------------------------
-
-**Declaration:** ip4_show_fib_command (src/vnet/fib/ip4_fib.c line 873)
-
-**Implementation:** ip4_show_fib
-
-Show L2fib
-============
-
-Summary/Usage
-------------------
-
-show l2fib [all] | [bd_id <*nn*> | bd_index <*nn*>] [learn | add] | [raw]
-
-Description
-------------
-
-This command displays the MAC Address entries of the L2 FIB table.
-Output can be filtered to just get the number of MAC Addresses or display each
-MAC Address for all bridge domains or just a single bridge domain.
-
-Example Usage
---------------
-Example of how to display the number of MAC Address entries in the L2 FIB table:
-
-
-.. code-block:: console
-
- vpp# **show l2fib**
-
- 3 l2fib entries
-
- Example of how to display all the MAC Address entries in the L2 FIB table:
-
- vpp# **show l2fib all**
-
- Mac Address BD Idx Interface Index static filter bvi refresh timestamp
- 52:54:00:53:18:33 1 GigabitEthernet0/8/0.200 3 0 0 0 0 0
- 52:54:00:53:18:55 1 GigabitEthernet0/8/0.200 3 1 0 0 0 0
- 52:54:00:53:18:77 1 N/A -1 1 1 0 0 0
- 3 l2fib entries
-
-Declaration and Implementation
--------------------------------
-
-**Declaration:** show_l2fib_cli (src/vnet/l2/l2_fib.c line 311)
-
-**Implementation:** show_l2fib
-
-Show Trace
-===========
-
-Summary/Usage
---------------
-
-show trace buffer [max COUNT]
-
-Declaration and Implementation
-------------------------------
-
-**Declaration:** show_trace_cli (src/vlib/trace.c line 347)
-
-**Implementation:** cli_show_trace_buffer
-
-Show Vhost-User
-================
-
-`Show Vhost-User <../vhost/vhostuser.html#show-vhost-user>`_
-
diff --git a/docs/reference/cmdreference/trace/index.rst b/docs/reference/cmdreference/trace/index.rst deleted file mode 100644 index 1dbbe2e7b3e..00000000000 --- a/docs/reference/cmdreference/trace/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. _interface:
-
-.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ .
-
-Trace Commands
-===============
-This section identifies the following types of trace commands:
-
-.. toctree::
- :maxdepth: 2
-
- trace
\ No newline at end of file diff --git a/docs/reference/cmdreference/trace/trace.rst b/docs/reference/cmdreference/trace/trace.rst deleted file mode 100644 index 927342fa3d7..00000000000 --- a/docs/reference/cmdreference/trace/trace.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. _interface: - -.. toctree:: - -.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ . - - -API Trace -=========== - -Summary/Usage --------------- - -api trace [tx][on|off][first <n>][last <n>][status][free] - [post-mortem-on][dump|dump-file|dump-json|save|tojson|save-json|replay <file>][nitems <n>][initializers <file>] - -Description ------------- - -Display, replay, or save a binary API trace. - -Declaration and Implementation -------------------------------- - -**Declaration:** api_trace_command (src/vlibmemory/vlib_api_cli.c line 783) - -**Implementation:** api_trace_command_fn - -Clear Trace -============= - -Summary/Usage --------------- -Clear trace buffer and free memory. -Declaration and implementation - -**Declaration:** clear_trace_cli (src/vlib/trace.c line 519) - -**Implementation:** cli_clear_trace_buffer - -Show Trace -=========== - -`Show Trace <../show/show.html#show-trace>`_ - -Trace Add -=========== - -Summary/Usage --------------- - -Trace given number of packets. - -Declaration and Implementation -------------------------------- - -**Declaration:** add_trace_cli (src/vlib/trace.c line 405) - -**Implementation:** cli_add_trace_buffer diff --git a/docs/reference/cmdreference/vhost/index.rst b/docs/reference/cmdreference/vhost/index.rst deleted file mode 100644 index d1cce23ff76..00000000000 --- a/docs/reference/cmdreference/vhost/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _vhostcommands: - -.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ . - -Vhost User Commands -=================== - -.. toctree:: - - vhostuser diff --git a/docs/reference/cmdreference/vhost/vhostuser.rst b/docs/reference/cmdreference/vhost/vhostuser.rst deleted file mode 100644 index 0c2498b7f2c..00000000000 --- a/docs/reference/cmdreference/vhost/vhostuser.rst +++ /dev/null @@ -1,271 +0,0 @@ -.. vhost: - -.. toctree:: - -.. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ . - -.. _createvhostuser: - -Create Vhost-User -================= - -Create a vHost User interface. Once created, a new virtual interface -will exist with the name '*VirtualEthernet0/0/x*', where '*x*' is the -next free index. - -There are several parameters associated with a vHost interface: - -- **socket <*socket-filename*>** - Name of the linux socket used by - hypervisor and VPP to manage the vHost interface. If in '*server*' - mode, VPP will create the socket if it does not already exist. If in - '*client*' mode, hypervisor will create the socket if it does not - already exist. The VPP code is indifferent to the file location. - However, if SELinux is enabled, then the socket needs to be created - in '*/var/run/vpp/*'. -- **server** - Optional flag to indicate that VPP should be the server - for the linux socket. If not provided, VPP will be the client. In - '*server*' mode, the VM can be reset without tearing down the vHost - Interface. In '*client*' mode, VPP can be reset without bringing down - the VM and tearing down the vHost Interface. -- **feature-mask <hex>** - Optional virtio/vhost feature set negotiated - at startup. **This is intended for debugging only.** It is - recommended that this parameter not be used except by experienced - users. By default, all supported features will be advertised. - Otherwise, provide the set of features desired. - - - 0x000008000 (15) - VIRTIO_NET_F_MRG_RXBUF - - 0x000020000 (17) - VIRTIO_NET_F_CTRL_VQ - - 0x000200000 (21) - VIRTIO_NET_F_GUEST_ANNOUNCE - - 0x000400000 (22) - VIRTIO_NET_F_MQ - - 0x004000000 (26) - VHOST_F_LOG_ALL - - 0x008000000 (27) - VIRTIO_F_ANY_LAYOUT - - 0x010000000 (28) - VIRTIO_F_INDIRECT_DESC - - 0x040000000 (30) - VHOST_USER_F_PROTOCOL_FEATURES - - 0x100000000 (32) - VIRTIO_F_VERSION_1 - -- **hwaddr <mac-addr>** - Optional ethernet address, can be in either - X:X:X:X:X:X unix or X.X.X cisco format. -- **renumber <dev_instance>** - Optional parameter which allows the - instance in the name to be specified. If instance already exists, - name will be used anyway and multiple instances will have the same - name. Use with caution. - - -Summary/Usage -------------- - -.. code-block:: shell - - create vhost-user socket <socket-filename> [server] [feature-mask <hex>] [hwaddr <mac-addr>] [renumber <dev_instance>] - - -Examples --------- - -Example of how to create a vhost interface with VPP as the client -and all features enabled: - -.. code-block:: console - - vpp# create vhost-user socket /var/run/vpp/vhost1.sock - VirtualEthernet0/0/0 - -Example of how to create a vhost interface with VPP as the server -and with just multiple queues enabled: - -.. code-block:: console - - vpp# create vhost-user socket /var/run/vpp/vhost2.sock server feature-mask 0x40400000 - VirtualEthernet0/0/1 - -Once the vHost interface is created, enable the interface using: - -.. code-block:: console - - vpp# set interface state VirtualEthernet0/0/0 up - -.. _showvhost: - -Show Vhost-User -=============== - -Display the attributes of a single vHost User interface (provide -interface name), multiple vHost User interfaces (provide a list of -interface names separated by spaces) or all Vhost User interfaces (omit -an interface name to display all vHost interfaces). - -Summary/Usage -------------- - -.. code-block:: shell - - show vhost-user [<interface> [<interface> [..]]] [descriptors]. - -Examples --------- -Example of how to display a vhost interface: - -.. code-block:: console - - vpp# show vhost-user VirtualEthernet0/0/0 - Virtio vhost-user interfaces - Global: - coalesce frames 32 time 1e-3 - Interface: VirtualEthernet0/0/0 (ifindex 1) - virtio_net_hdr_sz 12 - features mask (0xffffffffffffffff): - features (0x50408000): - VIRTIO_NET_F_MRG_RXBUF (15) - VIRTIO_NET_F_MQ (22) - VIRTIO_F_INDIRECT_DESC (28) - VHOST_USER_F_PROTOCOL_FEATURES (30) - protocol features (0x3) - VHOST_USER_PROTOCOL_F_MQ (0) - VHOST_USER_PROTOCOL_F_LOG_SHMFD (1) - - socket filename /var/run/vpp/vhost1.sock type client errno "Success" - - rx placement: - thread 1 on vring 1 - thread 1 on vring 5 - thread 2 on vring 3 - thread 2 on vring 7 - tx placement: spin-lock - thread 0 on vring 0 - thread 1 on vring 2 - thread 2 on vring 0 - - Memory regions (total 2) - region fd guest_phys_addr memory_size userspace_addr mmap_offset mmap_addr - ====== ===== ================== ================== ================== ================== ================== - 0 60 0x0000000000000000 0x00000000000a0000 0x00002aaaaac00000 0x0000000000000000 0x00002aab2b400000 - 1 61 0x00000000000c0000 0x000000003ff40000 0x00002aaaaacc0000 0x00000000000c0000 0x00002aababcc0000 - - Virtqueue 0 (TX) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 128 used.flags 1 used.idx 0 - kickfd 62 callfd 64 errfd -1 - - Virtqueue 1 (RX) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 0 used.flags 1 used.idx 0 - kickfd 65 callfd 66 errfd -1 - - Virtqueue 2 (TX) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 128 used.flags 1 used.idx 0 - kickfd 63 callfd 70 errfd -1 - - Virtqueue 3 (RX) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 0 used.flags 1 used.idx 0 - kickfd 72 callfd 74 errfd -1 - - Virtqueue 4 (TX disabled) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 0 used.flags 1 used.idx 0 - kickfd 76 callfd 78 errfd -1 - - Virtqueue 5 (RX disabled) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 0 used.flags 1 used.idx 0 - kickfd 80 callfd 82 errfd -1 - - Virtqueue 6 (TX disabled) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 0 used.flags 1 used.idx 0 - kickfd 84 callfd 86 errfd -1 - - Virtqueue 7 (RX disabled) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 0 used.flags 1 used.idx 0 - kickfd 88 callfd 90 errfd -1 - -The optional '*descriptors*' parameter will display the same output as the -previous example but will include the descriptor table for each queue. The output is truncated below: - -.. code-block:: console - - vpp# show vhost-user VirtualEthernet0/0/0 descriptors - - Virtio vhost-user interfaces - Global: - coalesce frames 32 time 1e-3 - Interface: VirtualEthernet0/0/0 (ifindex 1) - virtio_net_hdr_sz 12 - features mask (0xffffffffffffffff): - features (0x50408000): - VIRTIO_NET_F_MRG_RXBUF (15) - VIRTIO_NET_F_MQ (22) - : - Virtqueue 0 (TX) - qsz 256 last_avail_idx 0 last_used_idx 0 - avail.flags 1 avail.idx 128 used.flags 1 used.idx 0 - kickfd 62 callfd 64 errfd -1 - - descriptor table: - id addr len flags next user_addr - ===== ================== ===== ====== ===== ================== - 0 0x0000000010b6e974 2060 0x0002 1 0x00002aabbc76e974 - 1 0x0000000010b6e034 2060 0x0002 2 0x00002aabbc76e034 - 2 0x0000000010b6d6f4 2060 0x0002 3 0x00002aabbc76d6f4 - 3 0x0000000010b6cdb4 2060 0x0002 4 0x00002aabbc76cdb4 - 4 0x0000000010b6c474 2060 0x0002 5 0x00002aabbc76c474 - 5 0x0000000010b6bb34 2060 0x0002 6 0x00002aabbc76bb34 - 6 0x0000000010b6b1f4 2060 0x0002 7 0x00002aabbc76b1f4 - 7 0x0000000010b6a8b4 2060 0x0002 8 0x00002aabbc76a8b4 - 8 0x0000000010b69f74 2060 0x0002 9 0x00002aabbc769f74 - 9 0x0000000010b69634 2060 0x0002 10 0x00002aabbc769634 - 10 0x0000000010b68cf4 2060 0x0002 11 0x00002aabbc768cf4 - : - 249 0x0000000000000000 0 0x0000 250 0x00002aab2b400000 - 250 0x0000000000000000 0 0x0000 251 0x00002aab2b400000 - 251 0x0000000000000000 0 0x0000 252 0x00002aab2b400000 - 252 0x0000000000000000 0 0x0000 253 0x00002aab2b400000 - 253 0x0000000000000000 0 0x0000 254 0x00002aab2b400000 - 254 0x0000000000000000 0 0x0000 255 0x00002aab2b400000 - 255 0x0000000000000000 0 0x0000 32768 0x00002aab2b400000 - - Virtqueue 1 (RX) - qsz 256 last_avail_idx 0 last_used_idx 0 - - -Debug Vhost-User -================ -Turn on/off debug for vhost. - - -Summary/Usage -------------- - -.. code-block:: shell - - debug vhost-user <on | off> - -Delete Vhost-User -======================== -Delete a vHost User interface using the interface name or the software -interface index. Use the '*show interface*' command to determine the -software interface index. On deletion, the linux socket will not be -deleted. - -Summary/Usage -------------- - -.. code-block:: shell - - delete vhost-user {<interface> | sw_if_index <sw_idx>} - -Examples --------- -Example of how to delete a vhost interface by name: - -.. code-block:: console - - vpp# delete vhost-user VirtualEthernet0/0/1 - -Example of how to delete a vhost interface by software interface index: - -.. code-block:: console - - vpp# delete vhost-user sw_if_index 1 diff --git a/docs/reference/github/index.rst b/docs/reference/github/index.rst deleted file mode 100644 index 1d7231a9ba4..00000000000 --- a/docs/reference/github/index.rst +++ /dev/null @@ -1,237 +0,0 @@ -.. _pushingapatch: - -================= -Github Repository -================= - -**The github repository is only being used as a source for readthedocs.** -**There should be no reason for the typical developer to use this repository.** -**It should only be used by a document developer.** - -Overview -________ - -This section will cover how to fork your own branch of the `fdioDocs/vpp-docs <https://github.com/fdioDocs/vpp-docs>`_ repository, clone that repo locally to your computer, make changes to it, and how to issue a pull request when you want your changes to be reflected on the main repo. - -.. toctree:: - -Forking your own branch -_______________________ - -In your browser, navigate to the repo you want to branch off of. In this case, the `fdioDocs/vpp-docs <https://github.com/fdioDocs/vpp-docs>`_ repo. At the top right of the page you should see this: - -.. figure:: /_images/ForkButtons.png - :alt: Figure: Repository options on Github - :scale: 50% - :align: right - -| -| -| - -Click on "Fork", and then a pop-up should appear where you should then click your Github username. Once this is done, it should automatically take you to the Github page where your new branch is located, just like in the image below. - -.. figure:: /_images/usernameFork.png - :alt: Figure: Your own branch of the main repo on Github - :scale: 35% - :align: center - - -Now your **own branch** can be **cloned** to your computer using the URL (https://github.com/YOURUSERNAME/vpp-docs) of the Github page where your branch is located. - - -Creating a local repository -___________________________ - -Now that you have your own branch of the main repository on Github, you can store it locally on your computer. In your shell, navigate to the directory where you want to store your branch/repo. Then execute: - -.. code-block:: console - - $ git clone https://github.com/YOURUSERNAME/vpp-docs - -This will create a directory on your computer named **vpp-docs**, the name of the repo. - -Now that your branch is on your computer, you can modify and build files however you wish. - -If you are not on the master branch, move to it. - -.. code-block:: console - - $ git checkout master - - -Keeping your files in sync with the main repo -_____________________________________________ - -The following talks about remote branches, but keep in mind that there are currently *two* branches, your local "master" branch (on your computer), and your remote "origin or origin/master" branch (the one you created using "Fork" on the Github website). - -You can view your *remote* repositories with: - -.. code-block:: console - - $ git remote -v - -At this point, you may only see the remote branch that you cloned from. - -.. code-block:: console - - Macintosh:docs Andrew$ git remote -v - origin https://github.com/a-olechtchouk/vpp-docs (fetch) - origin https://github.com/a-olechtchouk/vpp-docs (push) - -Now you want to create a new remote repository of the main vpp-docs repo (naming it upstream). - -.. code-block:: console - - $ git remote add upstream https://github.com/fdioDocs/vpp-docs - - -You can verify that you have added a remote repo using the previous **git remote -v** command. - -.. code-block:: console - - $ git remote -v - origin https://github.com/a-olechtchouk/vpp-docs (fetch) - origin https://github.com/a-olechtchouk/vpp-docs (push) - upstream https://github.com/fdioDocs/vpp-docs (fetch) - upstream https://github.com/fdioDocs/vpp-docs (push) - - -If there have been any changes to files in the main repo (hopefully not the same files you were working on!), you want to make sure your local branch is in sync with them. - -To do so, fetch any changes that the main repo has made, and then merge them into your local master branch using: - -.. code-block:: console - - $ git fetch upstream - $ git merge upstream/master - - -.. note:: **This is optional, so don't do these commands if you just want one local branch!!!** - - You may want to have multiple branches, where each branch has its own different features, allowing you to have multiple pull requests out at a time. To create a new local branch: - -.. code-block:: shell - - $ git checkout -b cleanup-01 - $ git branch - * cleanup-01 - master - overview - - Now you can redo the previous steps for "Keeping your files in sync with the main repo" for your newly created local branch, and then depending on which branch you want to send out a pull reqest for, proceed below. - - -Pushing to your branch -______________________ - -Now that your files are in sync, you want to add modified files, commit, and push them from *your local branch* to your *personal remote branch* (not the main fdioDocs repo). - -To check the status of your files, run: - -.. code-block:: console - - $ git status - - -In the output example below, I deleted gettingsources.rst, made changes to index.rst and pushingapatch.rst, and have created a new file called buildingrst.rst. - -.. code-block:: console - - Macintosh:docs Andrew$ git status - On branch master - Your branch is up-to-date with 'origin/master'. - Changes to be committed: - (use "git reset HEAD <file>..." to unstage) - - deleted: tasks/writingdocs/gettingsources.rst - - Changes not staged for commit: - (use "git add <file>..." to update what will be committed) - (use "git checkout -- <file>..." to discard changes in working directory) - - modified: tasks/writingdocs/index.rst - modified: tasks/writingdocs/pushingapatch.rst - - Untracked files: - (use "git add <file>..." to include in what will be committed) - - tasks/writingdocs/buildingrst.rst - - - -To add files (use **git add -A** to add all modified files): - -.. code-block:: console - - $ git add FILENAME1 FILENAME2 - -Commit and push using: - -.. code-block:: console - - $ git commit -m 'A descriptive commit message for two files.' - -Push your changes for the branch where your changes were made - -.. code-block:: console - - $ git push origin <branch name> - -Here, your personal remote branch is "origin" and your local branch is "master". - -.. note:: - - Using **git commit** after adding your files saves a "Snapshot" of them, so it's very hard to lose your work if you *commit often*. - - - -Initiating a pull request (Code review) -_______________________________________ - -Once you've pushed your changes to your remote branch, go to your remote branch on Github (https://github.com/YOURUSERNAME/vpp-docs), and click on "New pull request". - -.. figure:: /_images/issuePullReq.png - :alt: Figure: Your own branch of the main repo on Github - :scale: 35% - :align: center - -This will bring you to a "Comparing changes" page. Click "Create new pull request". - -.. figure:: /_images/createNewPullReq.png - :scale: 35% - :align: left - -| -| -| - -Which will open up text fields to add information to your pull request. - -.. figure:: /_images/examplePullReq.png - :scale: 35% - :align: center - - - Then finally click "Create pull request" to complete the pull request. - -Your documents will be reviewed. To this same branch make the changes requested from the review and then push your new changes. There is no need to create another pull request. - -.. code-block:: console - - $ git commit -m 'A descriptive commit message for the new changes' - $ git push origin <branch name> - - -Additional Git commands -_______________________ - -You may find some of these Git commands useful: - -Use **git diff** to quickly show the file changes and repo differences of your commits. - -Use **git rm FILENAME** to stop tracking a file and to remove it from your remote branch and local directory. Use flag **-r** to remove folders/directories. E.g (**git rm -r oldfolder**) - - -.. _fdioDocs: https://github.com/fdioDocs/vpp-docs - diff --git a/docs/reference/index.rst b/docs/reference/index.rst deleted file mode 100644 index 76156a2a07d..00000000000 --- a/docs/reference/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. _reference: - -###################### -Reference -###################### - -.. toctree:: - :maxdepth: 2 - - cmdreference/index.rst - vppvagrant/index.rst - readthedocs/index.rst - github/index.rst diff --git a/docs/reference/readthedocs/index.rst b/docs/reference/readthedocs/index.rst deleted file mode 100644 index 5ddade8751f..00000000000 --- a/docs/reference/readthedocs/index.rst +++ /dev/null @@ -1,129 +0,0 @@ -.. _readthedocs: - -Read The Docs -================= - -`Read the Docs <https://readthedocs.org/>`_ is a website that "simplifies software documentation by automating building, versioning, and hosting of your docs for you". Essentially, it accesses your Github repo to generate the **index.html** file, and then displays it on its own *Read the Docs* webpage so others can view your documentation. - -Create an account on *Read the Docs* if you haven't already. - -Go to your `dashboard <https://readthedocs.org/dashboard/>`_ , and click on "Import a Project". - -.. figure:: /_images/importReadDocs.png - :scale: 35% - :align: left - - This will bring you to a page where you can choose to import a repo from your Github account (only if you've linked your Github account to your Read the Docs account), or to import a repo manually. In this example, we'll do it manually. Click "Import Manually". - -| -| -| -| -| -| -| - - - -This will bring you to a page that asks for your repo details. Set "Name" to your forked repo name, or whatever you want. Set "Repository URL" to the URL of your forked repo (https://github.com/YOURUSERNAME/vpp-docs). "Repository type" should already be selected to "Git". Then click "Next". - - -.. figure:: /_images/importRTDManually.png - :scale: 35% - :align: left - -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - - -This will bring you to a project page of your repo on Read the Docs. You can confirm it's the correct repo by checking on the right side of the page the Repository URL. - -Then click on "Build Version". - -.. figure:: /_images/buildVerRTD.png - :scale: 35% - :align: left - -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - -Which takes you to another page showing your recent builds. - -Then click on "Build Version:". This should "Trigger" a build. After about a minute or so you can refresh the page and see that your build "Passed". - - -.. figure:: /_images/passedBuild.png - :scale: 35% - :align: left - - -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - - -Now on your builds page from the previous image, you can click "View Docs" at the top-right, which will take you a *readthedocs.io* page of your generated build! - -.. figure:: /_images/rtdWebpage.png - :scale: 30% - :align: left diff --git a/docs/reference/vppvagrant/VagrantVMSetup.rst b/docs/reference/vppvagrant/VagrantVMSetup.rst deleted file mode 100644 index c13a87e30f9..00000000000 --- a/docs/reference/vppvagrant/VagrantVMSetup.rst +++ /dev/null @@ -1,56 +0,0 @@ -.. _VagrantVMSetup: - -.. toctree:: - -Accessing your VM -^^^^^^^^^^^^^^^^^ -ssh into the newly created box: - -.. code-block:: shell - - $ vagrant ssh <id> - -Sample output looks like: - -.. code-block:: console - - $ vagrant ssh c1c - Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-21-generic x86_64) - - * Documentation: https://help.ubuntu.com/ - Last login: Mon Jun 25 08:05:38 2018 from 10.0.2.2 - vagrant@localhost:~$ - - -.. note:: - - Type **exit** in the command-line if you want to exit the VM. - -Become the root with: - -.. code-block:: shell - - $ sudo bash - -Now *install* VPP in the VM. Keep in mind that VPP is already built (but not yet installed) at this point based on the commands from the provisioned script *build.sh*. - -When you ssh into your Vagrant box you will be placed in the directory */home/vagrant*. Change directories to */vpp/build-root*, and run these commands to install VPP based on your OS and architecture: - -For Ubuntu systems: - -.. code-block:: shell - - # dpkg -i *.deb - -For CentOS systems: - -.. code-block:: shell - - # rpm -Uvh *.rpm - - -Since VPP is now installed, you can start running VPP with: - -.. code-block:: shell - - # service vpp start diff --git a/docs/reference/vppvagrant/Vagrantfile b/docs/reference/vppvagrant/Vagrantfile deleted file mode 100644 index 642969faa63..00000000000 --- a/docs/reference/vppvagrant/Vagrantfile +++ /dev/null @@ -1,112 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure(2) do |config| - - # Pick the right distro and bootstrap, default is ubuntu1604 - distro = ( ENV['VPP_VAGRANT_DISTRO'] || "ubuntu1604") - if distro == 'centos7' - config.vm.box = "centos/7" - config.vm.box_version = "1708.01" - config.ssh.insert_key = false - else - config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm" - end - config.vm.box_check_update = false - - config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"update.sh") - config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"build.sh"), :args => "/vpp vagrant" - - post_build = ( ENV['VPP_VAGRANT_POST_BUILD'] ) - if post_build == "test" - config.vm.provision "shell", inline: "echo Testing VPP; cd /vpp; make test" - elsif post_build == "install" - config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh"), :args => "/vpp" - config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh") - config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"run.sh") - end - - # Add .gnupg dir in so folks can sign patches - # Note, as gnupg puts socket files in that dir, we have - # to be cautious and make sure we are dealing with a plain file - homedir = File.expand_path("~/") - Dir["#{homedir}/.gnupg/**/*"].each do |fname| - if File.file?(fname) - destname = fname.sub(Regexp.escape("#{homedir}/"),'') - config.vm.provision "file", source: fname, destination: destname - end - end - - # Copy in the .gitconfig if it exists - if File.file?(File.expand_path("~/.gitconfig")) - config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" - end - - # vagrant-cachier caches apt/yum etc to speed subsequent - # vagrant up - # to enable, run - # vagrant plugin install vagrant-cachier - # - if Vagrant.has_plugin?("vagrant-cachier") - config.cache.scope = :box - end - - # Define some physical ports for your VMs to be used by DPDK - nics = (ENV['VPP_VAGRANT_NICS'] || "2").to_i(10) - for i in 1..nics - config.vm.network "private_network", type: "dhcp" - end - - # use http proxy if available - if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf") - config.proxy.http = ENV['http_proxy'] - config.proxy.https = ENV['https_proxy'] - config.proxy.no_proxy = "localhost,127.0.0.1" - end - - vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2) - vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096) - - config.ssh.forward_agent = true - config.ssh.forward_x11 = true - - config.vm.provider "virtualbox" do |vb| - vb.customize ["modifyvm", :id, "--ioapic", "on"] - vb.memory = "#{vmram}" - vb.cpus = "#{vmcpu}" - - # rsync the vpp directory if provision hasn't happened yet - unless File.exist? (".vagrant/machines/default/virtualbox/action_provision") - config.vm.synced_folder "../../", "/vpp", type: "rsync", - rsync__auto: false, - rsync__exclude: [ - "build-root/build*/", - "build-root/install*/", - "build-root/images*/", - "build-root/*.deb", - "build-root/*.rpm", - "build-root/*.changes", - "build-root/python", - "build-root/deb/debian/*.dkms", - "build-root/deb/debian/*.install", - "build-root/deb/debian/changes", - "build-root/tools"] - end - - #support for the SSE4.x instruction is required in some versions of VB. - vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.1", "1"] - vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.2", "1"] - end - config.vm.provider "vmware_fusion" do |fusion,override| - fusion.vmx["memsize"] = "#{vmram}" - fusion.vmx["numvcpus"] = "#{vmcpu}" - end - config.vm.provider "libvirt" do |lv| - lv.memory = "#{vmram}" - lv.cpus = "#{vmcpu}" - end - config.vm.provider "vmware_workstation" do |vws,override| - vws.vmx["memsize"] = "#{vmram}" - vws.vmx["numvcpus"] = "#{vmcpu}" - end -end diff --git a/docs/reference/vppvagrant/boxSetup.rst b/docs/reference/vppvagrant/boxSetup.rst deleted file mode 100644 index ed20c9d37c1..00000000000 --- a/docs/reference/vppvagrant/boxSetup.rst +++ /dev/null @@ -1,122 +0,0 @@ -.. _boxSetup: - -.. toctree:: - - -Vagrantfiles -============ - -A `Vagrantfile <https://www.vagrantup.com/docs/vagrantfile/>`_ contains the box and provision configuration settings for your VM. The syntax of Vagrantfiles is Ruby (Ruby experience is not necessary). - -The command **vagrant up** creates a *Vagrant Box* based on your Vagrantfile. A Vagrant box is one of the motivations for using Vagrant - its a "development-ready box" that can be copied to other machines to recreate the same environment. - -It's common for people to think that a Vagrant box *is* the VM. But rather, the VM is *inside* a Vagrant box, with the box containing additional configuration options you can set, such as VM options, scripts to run on boot, etc. - -This `Vagrant website for boxes <https://app.vagrantup.com/boxes/search>`_ shows you how to configure a basic Vagrantfile for your specific OS and VM software. - - -Box configuration -_________________ - - -Looking at the :ref:`vppVagrantfile`, we can see that the default OS is Ubuntu 16.04 (since the variable *distro* equals *ubuntu1604* if there is no VPP_VAGRANT_DISTRO variable set - thus the **else** case is executed.) - -.. code-block:: ruby - - # -*- mode: ruby -*- - # vi: set ft=ruby : - - Vagrant.configure(2) do |config| - - # Pick the right distro and bootstrap, default is ubuntu1604 - distro = ( ENV['VPP_VAGRANT_DISTRO'] || "ubuntu1604") - if distro == 'centos7' - config.vm.box = "centos/7" - config.vm.box_version = "1708.01" - config.ssh.insert_key = false - else - config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm" - -As mentioned in the previous page, you can specify which OS and VM provider you want for your Vagrant box from the `Vagrant boxes page <https://app.vagrantup.com/boxes/search>`_, and setting your ENV variable appropriately in *env.sh*. - -Next in the Vagrantfile, you see some *config.vm.provision* commands. As paraphrased from `Basic usage of Provisioners <https://www.vagrantup.com/docs/provisioning/basic_usage.html>`_, by default these are only run *once* - during the first boot of the box. - -.. code-block:: ruby - - config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"update.sh") - config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"build.sh"), :args => "/vpp vagrant" - -The two lines above set the VM to run two scripts during its first bootup: an update script *update.sh* that does basic updating and installation of some useful tools, as well as *build.sh* that builds (but does **not** install) VPP in the VM. You can view these scripts on your own for more detail on the commands used. - - -Looking further in the :ref:`vppVagrantfile`, you can see more Ruby variables being set to ENV's or to a default value: - -.. code-block:: ruby - - # Define some physical ports for your VMs to be used by DPDK - nics = (ENV['VPP_VAGRANT_NICS'] || "2").to_i(10) - for i in 1..nics - config.vm.network "private_network", type: "dhcp" - end - - # use http proxy if available - if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf") - config.proxy.http = ENV['http_proxy'] - config.proxy.https = ENV['https_proxy'] - config.proxy.no_proxy = "localhost,127.0.0.1" - end - - vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2) - vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096) - - -You can see how the box or VM is configured, such as the amount of NICs (defaults to 3 NICs: 1 x NAT - host access and 2 x VPP DPDK enabled), CPUs (defaults to 2), and RAM (defaults to 4096 MB). - - -Box bootup -__________ - - -Once you're satisfied with your *Vagrantfile*, boot the box with: - -.. code-block:: shell - - $ vagrant up - -Doing this above command will take quite some time, since you are installing a VM and building VPP. Take a break and get some scooby snacks while you wait. - -To confirm it is up, show the status and information of Vagrant boxes with: - -.. code-block:: console - - $ vagrant global-status - id name provider state directory - ----------------------------------------------------------------------------------------- - d90a17b default virtualbox poweroff /home/centos/andrew-vpp/vppsb/vpp-userdemo - 77b085e default virtualbox poweroff /home/centos/andrew-vpp/vppsb2/vpp-userdemo - c1c8952 default virtualbox poweroff /home/centos/andrew-vpp/testingVPPSB/extras/vagrant - c199140 default virtualbox running /home/centos/andrew-vpp/vppsb3/vpp-userdemo - - You will have only one machine running, but I have multiple as shown above. - -.. note:: - - To poweroff your VM, type: - - .. code-block:: shell - - $ vagrant halt <id> - - To resume your VM, type: - - .. code-block:: shell - - $ vagrant resume <id> - - To destroy your VM, type: - - .. code-block:: shell - - $ vagrant destroy <id> - - Note that "destroying" a VM does not erase the box, but rather destroys all resources allocated for that VM. For other Vagrant commands, such as destroying a box, refer to the `Vagrant CLI Page <https://www.vagrantup.com/docs/cli/>`_. diff --git a/docs/reference/vppvagrant/index.rst b/docs/reference/vppvagrant/index.rst deleted file mode 100644 index 04da9e3f022..00000000000 --- a/docs/reference/vppvagrant/index.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _vppvagrant: - -VM's with Vagrant -================= - -This reference guide will cover using Vagrant to boot a VM (virtual machine). - -.. toctree:: - - vagrantOverview - installingVboxVagrant - settingENV - boxSetup - VagrantVMSetup - vppVagrantfile diff --git a/docs/reference/vppvagrant/installingVboxVagrant.rst b/docs/reference/vppvagrant/installingVboxVagrant.rst deleted file mode 100644 index 326312899b4..00000000000 --- a/docs/reference/vppvagrant/installingVboxVagrant.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. _installingVboxVagrant: - -Installing Vbox and Vagrant -=========================== - -Installing VirtualBox -_____________________ - -First download VirtualBox, which is virtualization software for creating VM's. - -If you're on CentOS, follow the `steps here <https://wiki.centos.org/HowTos/Virtualization/VirtualBox>`_. - - -If you're on Ubuntu, perform: - -.. code-block:: shell - - $ sudo apt-get install virtualbox - -If you want to download a newer version of Virtual Box or one specific to your OS and architecture, go to the `Virtual Box download page <https://www.virtualbox.org/wiki/Downloads>`_. - -Installing Vagrant -__________________ - -Here we are on a 64-bit version of CentOS, downloading and installing Vagrant 2.1.2: - -.. code-block:: shell - - $ yum -y install https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.rpm - -This is a similar command, but on a 64-bit version of Debian: - -.. code-block:: shell - - $ sudo apt-get install https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.deb - - -If you want to download a newer version of Vagrant or one specific to your OS and architecture, go to the `Vagrant download page <https://www.vagrantup.com/downloads.html>`_. diff --git a/docs/reference/vppvagrant/settingENV.rst b/docs/reference/vppvagrant/settingENV.rst deleted file mode 100644 index 8bd7847d36c..00000000000 --- a/docs/reference/vppvagrant/settingENV.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. _settingENV: - -.. toctree:: - - -Setting your ENV Variables -========================== - - -The :ref:`vppVagrantfile` used in the VPP repo sets the configuration options based on your ENV (environment) variables, or to default the configuration at specified values if your ENV variables are not initialized (if you did not run the *env.sh* script found below). - -This is the *env.sh* script found in *vpp/extras/vagrant*. When run, the script sets ENV variables using the **export** command. - -.. code-block:: bash - - export VPP_VAGRANT_DISTRO="ubuntu1604" - export VPP_VAGRANT_NICS=2 - export VPP_VAGRANT_VMCPU=4 - export VPP_VAGRANT_VMRAM=4096 - -In the :ref:`vppVagrantfile`, you can see these same ENV variables used (discussed on the next page). - -Adding your own ENV variables is easy. For example, if you wanted to setup proxies for your VM, you would add to this file the **export** commands found in the :ref:`building VPP commands section <building>`. Note that this only works if the ENV variable is defined in the :ref:`vppVagrantfile`. - -Once you're finished with *env.sh* script, and you are in the directory containing *env.sh*, run the script to set the ENV variables with: - -.. code-block:: shell - - $ source ./env.sh diff --git a/docs/reference/vppvagrant/vagrantOverview.rst b/docs/reference/vppvagrant/vagrantOverview.rst deleted file mode 100644 index 882b8a68cfd..00000000000 --- a/docs/reference/vppvagrant/vagrantOverview.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _vagrantOverview: - -.. toctree:: - -Overview -^^^^^^^^ - -This guide shows how the VPP :ref:`vppVagrantfile` interacts with shell scripts to configure a `Vagrant box <https://www.vagrantup.com/docs/boxes.html>`_ that boots a VM with VPP. - -.. _prereqlabel: - -Prerequisites -_____________ - -You have the `FD.io VPP repo <https://github.com/FDio/vpp>`_ cloned locally on your machine. - - -This guide will refer to the following files from that repo: *Vagrantfile, build.sh, env.sh, and update.sh*. - - - - - - - diff --git a/docs/reference/vppvagrant/vppVagrantfile.rst b/docs/reference/vppvagrant/vppVagrantfile.rst deleted file mode 100644 index d3c705542bd..00000000000 --- a/docs/reference/vppvagrant/vppVagrantfile.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. _vppVagrantfile: - -Vagrant File -============ - -This is the Vagrantfile provided in the `Git VPP repo <https://github.com/FDio/vpp/blob/master/extras/vagrant/Vagrantfile>`_. - -.. literalinclude:: Vagrantfile - :language: Ruby - :emphasize-lines: 4-17, 20-21, 57-71 - - - -.. toctree:: |