Fast Path Command Line Interface

Starting the CLI

# fp-cli
<fp-0>

You can launch fp-cli with Linux - Fast Path Synchronization enabled or disabled:

Linux - Fast Path Synchronization enabled

You can launch fp-cli right away.

Linux - Fast Path Synchronization disabled

You must launch fp-init, then fp-cli.

Example

This example assumes that Linux - Fast Path Synchronization is enabled. It illustrates how to:

  • enable the eth1 interface,

  • launch fp-cli,

  • dump the logical interfaces table.

# ip link set up dev eth1
# fp-cli
<fp-0> iface
1:lo [VR-0] ifid=1 (virtual) <UP|RUNNING|FWD4|FWD6> (0x63)
          type=loop mac=00:00:00:00:00:00 mtu=16436 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
2:eth3 [VR-0] ifid=2 (port 2) <FWD4|FWD6> (0x60)
          type=ether mac=00:1b:21:c5:7f:76 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
3:eth2 [VR-0] ifid=3 (port 1) <FWD4|FWD6> (0x63)
          type=ether mac=00:1b:21:c5:7f:75 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
4:eth1 [VR-0] ifid=4 (port 0) <UP|RUNNING|FWD4|FWD6> (0x63)
          type=ether mac=00:1b:21:c5:7f:74 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=2  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
5:eth0 [VR-0] ifid=5 (virtual) <FWD4|FWD6> (0x60)
          type=ether mac=00:21:85:c1:82:58 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none
6:eth4 [VR-0] ifid=6 (port 3) <FWD4|FWD6> (0x60)
          type=ether mac=00:1b:21:c5:7f:77 mtu=1500 tcp4mss=0 tcp6mss=0
          IPv4 routes=0  IPv6 routes=0
          if_ops: rx_dev=none tx_dev=none ip_output=none

Initialization

Detecting Linux devices and configuring interface names and MAC addresses

  • Detect Linux devices previously created that represent physical ports

  • Automatically configure interface names and MAC addresses

fp-init

Example

<fp-0> fp-init
Adding interface eth0 (ifuid 7) to port 0
Adding interface eth1 (ifuid 8) to port 1
Adding interface eth2 (ifuid 9) to port 2
Adding interface eth3 (ifuid 10) to port 3

How to find a command

  1. List available commands name sort by fp-cli module:

    list [<module name>]
    list-deprecated [<module name>]
    
    <module name>

    Name or part of a fp-cli module name.

    Note

    It’s not recommended to use deprecated commands. See ‘help <deprecated command>’ to find the command(s) to use as replacement.

    Example

    <fp-0> list bridge
    
    Available commands for fp-bridge:
      bridge
      bridge-fdb
      bridge-port-set
      bridge-fdb-hitflags-set
    <fp-0> list-deprecated bridge
    
    Available commands for fp-bridge:
      bridge-dump
      bridge-dump-fdb
      dump-l2-stats
    
  2. List available commands with their help:

    help [<command name>]
    
    <command name>

    A command name.

    Note

    The word help can be placed anywhere in the command line.

    Example

    <fp-0> help bridge-fdb
    bridge-fdb               : Dump fp-bridge FDB
                    bridge-fdb <ifname>
    <fp-0> help bridge-dump-fdb
    bridge-dump-fdb          : Dump fp-bridge fdb
                    bridge-dump-fdb <ifname>
    This command is deprecated, use new command(s):
                    bridge-fdb <ifname>
    
  3. Search for commands from a keyword.

    find <pattern>
    
    <parttern>

    Word contained in a command name.

    Example

    <fp-0> find fdb
    bridge-fdb: Dump fp-bridge FDB
                    bridge-fdb <ifname>
    bridge-fdb-hitflags-set: Set bridge FDB hitflags parameters
                    bridge-fdb-hitflags-set <period_in_seconds> <max_scanned> <max_sent>
    vxlan-fdb: Display VXLAN FDB
                    vxlan-fdb <ifname>
    

VRF support

The default VR to which all commands apply is displayed in the fp-cli prompt: <fp-X> indicates that commands apply to VRF X.

  1. To execute a command in a specific VRF, use vrf-exec command:

    vrf-exec <vrfid>|all <command name> [<command arguments>]
    
    <vrfid>|all

    Execute the command only in the VRF vrfid or in all VRF.

    <command name> [<command arguments>]

    Command to execute, with its arguments.

    Note

    vrf-exec <cmd> returns an error when:

    • <cmd> is an invalid fp-cli command

    Example

    <fp-0> vrf-exec 0 route4
    vrf0:
    # - Preferred, * - Active, > - selected
    0.0.0.0/0  [02]  NEIGH gw 10.0.2.2 via eth0-vr0 (8)
    
    <fp-0> vrf-exec all route4
    vrf0:
    # - Preferred, * - Active, > - selected
    0.0.0.0/0  [02]  NEIGH gw 10.0.2.2 via eth0-vr0 (8)
    
    vrf1:
    # - Preferred, * - Active, > - selected
    
    vrf3:
    # - Preferred, * - Active, > - selected
    
    <fp-0>
    
  2. To change the current VRF, use the vrf-set command:

    vrf-set <vrfid>
    
    <vrfid>
       The new |vrf| id.
    

    Example

    <fp-0> route4
    # - Preferred, * - Active, > - selected
    0.0.0.0/0  [02]  NEIGH gw 10.0.2.2 via eth0-vr0 (8)
    <fp-0> vrf-set 1
     New reference for VRF: 1
    <fp-1> route4
    # - Preferred, * - Active, > - selected
    <fp-1> so-portset
    portset tcp vrfid 1 16384-32767
    portset udp vrfid 1 16384-32767
    <fp-1>
    

JSON support

Some fp-cli commands can also write their output in JSON format. This is done by suffixing the command name with “-json”.

Note

You can display the help of all JSON commands with fp-cli find json.

Example

<fp-0> iface
2:eth0 [VR-0] ifid=2 (virtual) <UP|RUNNING|FWD4|FWD6> (0x1b)
        type=ether mac=de:ad:de:01:02:03 mtu=1500 numa=0 tcp4mss=0 tcp6mss=0
        IPv4 routes=4  IPv6 routes=0
        if_ops: rx_dev=none tx_dev=none ip_output=none
<fp-0> iface-json
[
  {
    "vrfid": 0,
    "ifaces": [
      {
        "tcp6_mss": 0,
        "flags": [
          "up",
          "running",
          "fwd4",
          "fwd6"
        ],
        "name": "eth0",
        "ipv6_routes": 0,
        "ifid": 2,
        "ipv4_routes": 4,
        "mac": "de:ad:de:01:02:03",
        "tcp4_mss": 0,
        "vrfid": 0,
        "numa": 0,
        "mtu": 1500,
        "master": null,
        "port": "virtual",
        "type": "ether"
      },
    ]
  }
]

Displaying the command status in JSON format

This command displays the status returned by the last executed command.

Note

The command execution is regard as failed if the result is not 0.

cmd-status-json

Example

<fp-0> route4 1.0.0.1
Invalid argument(s)
Usage: route4 [dst <addr dst>|<addr dst/prefix> [src <addr src>]]|[type TYPE]
                        TYPE := [all|fpm|route|addr|local|neigh|connected|black]
<fp-0> cmd-status-json
{
  "result": -1
}
<fp-0> route4
# - Preferred, * - Active, > - selected
0.0.0.0/0  [03]  NEIGH gw 10.0.2.2 via eth0-vr0 (8)
<fp-0> cmd-status-json
{
  "result": 0
}

Displaying statistics in JSON format

This command displays all network statistics.

stats-json [agg[regated]]
agg[regated]

Display sum of Linux and fast path statistics.

NUMA awareness configuration

To enable or disable NUMA awareness:

numa-aware-set [<protocol>] on|off

Example

<fp-0> numa-aware-set lag on
protocol lag numa awareness is on (was off)

The list of protocols that can be NUMA aware and their state can be displayed with the following command:

numa-aware

Example

<fp-0> numa-aware
Numa aware configuration:
     protocol lag is off

This same list can be displayed in JSON format:

numa-aware-json

Example

<fp-0> numa-aware-json
[
   {
      "protocol_name": "lag",
      "numa_aware": "off"
   }
]

Interface management

Displaying the logical interfaces table

iface [<name>]
<name>

Only display information about this interface. If unset, all the interfaces are displayed.

Example

<fp-0> iface
8:eth1 [VR-0] ifid=8 (port 0) <UP|RUNNING|FWD4> (0x23)
        type=ether mac=00:1b:21:c5:7f:74 mtu=1500 tcp4mss=0 tcp6mss=0
        IPv4 routes=2  IPv6 routes=0
9:eth3 [VR-0] ifid=9 (port 2) <UP|RUNNING|FWD4> (0x23)
        type=ether mac=00:1b:21:c5:7f:76 mtu=1500 tcp4mss=0 tcp6mss=0
        IPv4 routes=3  IPv6 routes=0

<fp-0> iface eth1
8:eth1 [VR-0] ifid=8 (port 0) <UP|RUNNING|FWD4> (0x23)
        type=ether mac=00:1b:21:c5:7f:74 mtu=1500 tcp4mss=0 tcp6mss=0
        IPv4 routes=2  IPv6 routes=0

Displaying MACVLAN devices

macvlan

Example

<fp-0> macvlan
eth2-vr0:
        eth2.mv0-vr0: mode: private

Port management

Displaying the physical ports table

port
<fp-0> port
0: eth1-vr0 cached ifp=0x7f2d7f497640
2: eth3-vr0 cached ifp=0x7f2d7f497f00

Changing the number of fast path cores polling a port dynamically

Define which fast path cores poll the port. Default value is all.

If the port configuration is changed with this command, the port must be disabled and re-enabled to apply the configuration.

dpdk-port-rxcores-set <Pi>|<iface> <Ci>[:<Cj>[...]]|all|nb=<number of cores>
<Pi>

Port number.

<iface>

Interface name of the port.

<Ci>[:<Cj>[…]]

A list of fast path cores. Example: 2:3

all

All fast path cores. If the fast path has been started with the –nb-rxq=all:N option, the port is configured to be polled by N cores.

nb=<number of cores>

Number of fast path cores polling the port. Cores are selected depending on the number of RX queues already polled (i.e. cores with the least number of RX queues are selected).

Example

<fp-0> dpdk-port-rxcores-set 0 nb=1

Enabling or disabling a port dynamically

  • An enabled port is polled by fast path cores,

  • A disabled port is no longer polled and its interface is down.

Important

Before disabling a port, bring its network interface down.

dpdk-port-set <Pi>|<iface> enable|disable
<Pi>

Port number.

<iface>

Interface name of the port.

enable or disable

Enable or disable the port.

Example

<fp-0> dpdk-port-set 0 enable
Port 0 enabled.

Displaying the fast path core/port mapping

Display the current polling configuration of the fast path.

dpdk-core-port-mapping [<Pi>|<iface>]
<Pi> or <iface>

Port number. Display all ports if not specified.

Example

<fp-0> dpdk-core-port-mapping
port 0: eth1 (rte_em_pmd)
  nb_rxq=1 nb_txq=1
  rxq0=c1
  txq0=c1,c2,c3
port 1: eth2 (rte_em_pmd)
  nb_rxq=1 nb_txq=1
  rxq0=c1
  txq0=c1,c2,c3

Displaying the RX/TX port’s configuration

Display the configuration of a port. If the TX queue flag is non-zero, the name of the active flag is printed.

dpdk-port-rxtx <Pi>|<iface> [default] [raw]
<Pi> or <iface>

Port number.

default

If this token is provided and if the default configuration exists, it is displayed instead. The default configuration is usually the one applied when the fast path starts, excepted the TX queue flags.

raw

If this token is provided, the configuration is displayed as an hexadecimal dump instead.

Example

<fp-0> dpdk-port-rxtx 0 raw
current: rx
 0000   00 00 00 00 00 00 00 00  ........
current: tx
 0000   00 00 00 00 00 00 00 00  ........
 0008   00 00 00 00 00 00 00 00  ........

Setting the RX/TX port’s configuration

Important

After modifying a configuration, disable, then re-enable the interface to update the configuration on the adapter.

dpdk-port-rxtx-set <Pi>|<iface>
      [rx_pthresh <u8>] [rx_hthresh <u8>] [rx_wthresh <u8>]
      [rx_free_thresh <u16>] [rx_drop_en <u8>]
      [tx_pthresh <u8>] [tx_hthresh <u8>] [tx_wthresh <u8>]
      [tx_rs_thresh <u8>] [tx_free_thresh <u16>]
      [raw rx|tx <offset u32> <size u32> <val size>]
(r|t)x_pthresh <u8>

Set the prefetch threshold register of the RX/TX rings. From 0 to 255 included.

(r|t)x_hthresh <u8>

Set the host threshold register of the RX/TX rings. From 0 to 255 included.

(r|t)x_wthresh <u8>

Set the write-back threshold register of the RX/TX rings. From 0 to 255 included.

(r|t)x_free_thresh <u16>

Set the transmit free threshold of the RX/TX rings. From 0 to rxd or txd included, where rxd or txd is the number of descriptors in the RX or TX rings.

tx_rs_thresh <u8>

Set the transmit RS bit threshold of the TX rings. From 0 to txd included, where txd is the number of descriptors in the TX rings.

rx_drop_en <u8>

Set packet drop for packets with no descriptor. If set to off, such a packet will be cached.

raw

Write directly to the configuration structure.

rx|tx

Set the RX or TX rings configuration.

<offset u32> <size u32> <val size>

The value val will be written at offset on size bytes. For example, a uint8_t is one byte wide, its corresponding size would be 1. Any size greater than 4 will be brought down to 4.

Example

<fp-0> dpdk-port-rxtx-set 0 rx_pthresh 1 tx_pthresh 2 rx_drop_en 1
current   RX                          TX
         thresh:                     thresh:
            pthresh:            1       pthresh:            2
            hthresh:            0       hthresh:            0
            wthresh:            0       wthresh:            0
         rx_free_thresh:        0    tx_free_thresh:        0
         rx_drop_en:            1    tx_rs_thresh:          0
rx:
 0000   01 00 00 00 00 00 01 00  ........
tx:
 0000   02 00 00 00 00 00 00 00  ........
 0008   00 00 00 00 00 00 00 00  ........
<fp-0>dpdk-port-rxtx-set 0 raw rx 1 1 5
current   RX                          TX
         thresh:                     thresh:
            pthresh:            1       pthresh:            2
            hthresh:            5       hthresh:            0
            wthresh:            0       wthresh:            0
         rx_free_thresh:        0    tx_free_thresh:        0
         rx_drop_en:            1    tx_rs_thresh:          0
rx:
 0000   01 05 00 00 00 00 01 00  ........
tx:
 0000   02 00 00 00 00 00 00 00  ........
 0008   00 00 00 00 00 00 00 00  ........

Configuring the Control Plane Protection

Configure the Control Plane Protection. Default is disabled.

When the machine running the fast path is overloaded, some received packets may be dropped by the hardware. The Control Plane Protection is a software mechanism that anticipates this situation, dropping the data plane packets and keeping control plane packets before the hardware drops them.

It can be also be enabled for TX, dropping in priority the data plane packets if the network link is overloaded.

dpdk-cp-filter-set <Pi>|<iface>
   [rx_mode|tx_mode none|software-filter|hardware-filter|dedicated-queue]
   [rx_threshold|tx_threshold <threshold>[%
<Pi> or <iface>

Port number or interface name.

enable|disable

For rx, tx: Enable or disable the Control Plane Protection with default thresholds.

none|software-filter|hardware-filter|dedicated-queue

For tx.rx_mode, choose the Control Plane Protection. Default is none.

<thres>

Control Plane Protection threshold: correspond to a number or a percentage of descriptors in the hardware Rx/Tx ring.

The thresholds control the data plane drop policy. When the number of packets in a Rx/Tx ring is over the threshold, the packets are analyzed and the data plane packets are dropped.

For standard uses, the default thresholds value should be used. Some drivers limitations prevent to use too high thresholds. Setting the thresholds manually requires to understand these driver limitations.

Example

<fp-0> dpdk-cp-filter-set 0 rx_mode none
rx cp filter: rx_mode=none, rxd_count=512
tx cp filter: tx_mode=none, txd_count=512

<fp-0> dpdk-cp-filter-set 0 rx_mode software-filter
rx cp filter: rx_mode=software-filter, rxd_thres=256, rxd_count=512
tx cp filter: tx_mode=none, txd_count=512

<fp-0> dpdk-cp-filter-set 0 tx_mode software-filter tx_threshold 78%
rx cp filter: rx_mode=software-filter, rxd_thres=256, rxd_count=512
tx cp filter: tx_mode=software-filter, txd_thres=399, txd_count=512

Set the default Control Plane Configuration for a device type and reconfigure all the port of this type.

It can also used to configure Control plane protection for exception path, to drop in priority the data plane packets if exception path is overloaded.

dpdk-cp-filter-devtype-set all|phys|excp|virt
[rx_mode|tx_mode none|software-filter|hardware-filter|dedicated-queue]
[rx_threshold|tx_threshold <threshold>[%]
none|software-filter|hardware-filter|dedicated-queue

For mode, choose the Control Plane Protection mode.

<threshold>

Control Plane Protection threshold: correspond to a number or a percentage of descriptors of the Rx/Tx ring.

The thresholds control the data plane drop policy. When the number of packets in a Rx/Tx ring is over the threshold, the packets are analyzed and the data plane packets are dropped.

Example

<fp-0> dpdk-cp-filter-devtype-set excp tx_mode none
cp filter excp device: rx_mode=none, tx_mode=none

<fp-0> dpdk-cp-filter-devtype-set excp tx_mode software-filter
cp filter excp device: rx_mode=none, tx_mode=software-filter, txd_thres=50%

<fp-0> dpdk-cp-filter-devtype-set excp tx_threshold 75%
cp filter excp device: rx_mode=none, tx_mode=software-filter, txd_thres=75%

Configure the Control Plane Protection CPU budget.

Set the CPU usage limit that must not be exceeded for the parsing of packets which is part of Control Plane Protection. This limit is per core and applies to Rx and Tx.

If the limit is exceeded on a core, only a fraction of the packets are analyzed and filtered. Therefore, control plane packets can be dropped in this situation.

dpdk-cp-filter-set <cpu_budget>
<cpu_budget>

The maximum cpu budget allocated to the Control Plane Protection.

Example

<fp-0> dpdk-cp-filter-budget-set 5
cpu budget is 5%

Displaying the Control Plane Protection status

For both Rx and Tx, show the mode of Control Plane Protection (none or software-filter or hardware-filter or dedicated-queue), the value of thresholds, and the number of descriptors for a given port.

dpdk-cp-filter <Pi>|<iface>
<Pi> or <iface>

Port number or interface name.

Example

<fp-0> dpdk-cp-filter 0
rx cp filter: rx_mode=software-filter, rxd_thres=256, rxd_count=512
tx cp filter: tx_mode=software-filter, txd_thres=256, txd_count=512

Statistics can be displayed using ethtool -S ifname and fp-cli dpdk-port-stats. Refer to FPN-SDK Baseline for details.

Show the default Control Plane Protection mode in Rx and Tx used for a device type (i.e. phys, excp, virt), the value of thresholds.

dpdk-cp-filter-devtype

Example

<fp-0> dpdk-cp-filter-devtype all
cp filter phys device: rx_mode=hardware-filter, rxd_thres=50%, tx_mode=none
cp filter excp device: rx_mode=none, tx_mode=software-filter, txd_thres=50%
cp filter virt device: rx_mode=software-filter, rxd_thres=50%, tx_mode=none

Show the CPU budget limit allowed for Control Plane Protection.

dpdk-cp-filter-budget

Example

<fp-0> dpdk-cp-filter-budget
cpu budget is 10%

Configuring tx soft queue size of a port

For some PMD it is not possible to configure the number of tx descriptors. For these PMD it can be useful to provide an additional soft queue to allow configuration of the number of tx descriptors

Configure size of a tx soft queue for a specified port

dpdk-softqueue-set <Pi>|<iface> <queue_size>
<Pi> or <iface>

Port number or interface name.

<queue_size>

Size of the additional tx soft queue.

Configure default size of tx soft queue applied for any new or reconfigured port. By default the tx soft queue size for new ports is 0.

dpdk-softqueue-default-set <queue_size>
<queue_size>

Size of the tx soft queue applied for any new or reconfigured port.

Statistics can be displayed using ethtool -S ifname Refer to FPN-SDK Baseline for details.

Configuring Queue Threshold Statistics

Configure the Queue Threshold Statistics. Default is disabled.

When the fast path takes too long to process some packets or is interrupted by another task (usually kernel threads), the other incoming packets are queued in the hardware. Similarly, when a packet is transmitted on a port whose link is overloaded, the packets are queued in the Tx queue. This increases the latency and the risk of dropping packets.

To monitor this, a per-queue statistic counter can be enabled when the filling level of a queue is above a threshold when it is accessed.

dpdk-qthres-stats-set <Pi>|<iface> rx|tx enable|disable|<thres>
<Pi> or <iface>

Port number or interface name.

enable|disable

Enable or disable the Queue Threshold Statistics with default thresholds.

<thres>

Queue Threshold Statistics threshold: correspond to a number of descriptors in the hardware Rx/Tx ring.

For standard uses, the default thresholds value should be used. Some drivers limitations prevent to use too high thresholds. Setting the thresholds manually requires to understand these driver limitations.

Example

<fp-0> dpdk-qthres-stats-set 0 rx disable
rx qthres stats is disabled: rxd_count=512
tx qthres stats is disabled: txd_count=512

<fp-0> dpdk-qthres-stats-set 0 rx enable
rx qthres stats is enabled: rxd_thres=256, rxd_count=512
tx qthres stats is disabled: txd_count=512

<fp-0> dpdk-qthres-stats-set 0 tx 400
rx qthres stats is enabled: rxd_thres=256, rxd_count=512
tx qthres stats is enabled: txd_thres=400, txd_count=512

Displaying the Queue Threshold Statistics status

For both Rx and Tx, show the status of Queue Threshold Statistics (enabled or disabled), the value of thresholds, and the number of descriptors for a given port.

dpdk-qthres-stats <Pi>|<iface>
<Pi> or <iface>

Port number or interface name.

Example

<fp-0> dpdk-qthres-stats 0
rx qthres stats is enabled: rxd_thres=256, rxd_count=512
tx qthres stats is enabled: txd_thres=256, txd_count=512

Statistics can be displayed using ethtool -S ifname. Refer to FPN-SDK Baseline for details.

Resetting port stats

The port stats can be reseted using the dpdk-port-stats-reset command:

dpdk-port-stats-reset <Pi>|<iface>
<Pi> or <iface>

Port number or interface name.

Example

<fp-0> dpdk-port-stats-reset eth0

Restarting Auto-negotiation

The auto-negociation can be restarted with the dpdk-port-reset command:

dpdk-port-reset <Pi>|<iface>
<Pi> or <iface>

Port number or interface name.

Example

<fp-0> dpdk-port-reset eth0

Displaying The Eeprom

The dpdk-port-modeeprom command enables displaying the entire Eeprom or a part:

dpdk-port-modeeprom <Pi>|<iface> [offset <offset>] [length <len>]
<Pi> or <iface>

Port number or interface name.

offset <offset>

Offset from which to read the Eeprom.

length <len>

Number of bytes to read.

Example

<fp-0> dpdk-port-modeeprom eth0 length 128
Offset          Values
------          ------
0x0000:         03 04 07 10 00 00 01 00 00 00 00 06 67 02 00 00
0x0010:         08 03 00 1e 49 6e 74 65 6c 20 43 6f 72 70 20 20
0x0020:         20 20 20 20 00 00 1b 21 46 54 4c 58 38 35 37 31
0x0030:         44 33 42 43 56 2d 49 54 41 20 20 20 03 52 00 88
0x0040:         00 3a 00 00 41 47 38 30 35 53 47 20 20 20 20 20
0x0050:         20 20 20 20 30 39 30 38 32 36 20 20 68 fa 03 f7
0x0060:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0070:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Configuring flows

Synopsis

dpdk-port-flow <port> <add|del|flush>  patterns <patterns> / end actions
<actions> / end
dpdk-port-flow cmd-help
<port>

DPDK port identifier.

<add|del>

Add or delete a flow rule.

<pattern>

Keyword describing the packet to match.

<action>

Keyword describing the action to apply on the matched flows.

cmd-help

Display the list of pattern and actions keywords.

Each pattern is a layer definition and are seperated between each of them by a ‘/’ character. The list of patterns is ended by a ‘/’ followed by ‘end’.

dpdk-port-flow 0 add patterns eth / vlan / ipv4 / end ....

For each layer, parameters can be defined though a specification spec and a mask mask. If a specification is provided for a parameter, its equivalent mask must be provided, otherwise spec is not used as mask is filled with 0 and thus match anything.

If a layer overrides another one, the last one is used. For instance, “ipv4 / ipv6 / end” is equivalent to “ipv6 / end”.

Actions are a list of actions with a final fate for the rule, if several fates a present, the last possible one is used e.g. “actions queue 0 / rss / end” will discard queue in favor or rss.

Patterns

eth

Synopsis

... / eth [spec src <MAC> dst <MAC> type <ethertype> mask src <MAC> dst
<MAC> type <ethertype>] / ...

Matchs an Ethernet flow.

Possible filters:

  • src <mac address>

  • dst <mac address>

  • type <Ethernet type>

spec and mask may not be present nor contain all filters.

VLAN

Synopsis

... / vlan [spec id <vlan_id> mask <vlan_id>] / ...

Matchs a VLAN layer.

Possible filters: id <vlan_id>

spec and mask may not be present nor contain all filters.

IPV4

Synopsis

... / ipv4 [spec src <ip-src> dst <ip-dst> mask src <ip-src> dst <ip-dst>]
/ ...

Match an IPv4 layer.

Possible filters:

  • src <ip address>

  • dst <ip address>

spec and mask may not be present nor contain all filters.

IPV6

Synopsis

... / ipv6 [spec src <ip-src> dst <ip-dst> mask src <ip-src> dst <ip-dst>]
/ ...

Matchs a VLAN layer.

Possible filters:

  • src <ip address>

  • dst <ip address>

spec and mask may not be present nor contain all filters.

UDP

Synopsis

... / udp [spec sport <src-port> dport <dst-port> mask sport <src-port> dport <dst-port>]
/ ...

Match an UDP layer.

Possible filters:

  • sport <UDP source port>

  • dport <UDP destination port>

spec and mask may not be present nor contain all filters.

TCP

Synopsis

... / tcp [spec sport <src-port> dport <dst-port> mask sport <src-port> dport <dst-port>]
/ ...

Match a TCP layer.

Possible filters:

  • sport <TCP source port>

  • dport <TCP destination port>

spec and mask may not be present nor contain all filters.

GTP-U

Synopsis

... / gtpu [spec version <version> pt <pt> f-eh <f-eh> f-sn <f-sn> f-npdu <f-npdu>  msg-type
<msg-type> msg-len <msg-len> teid <teid> mask version <version> pt <pt> f-eh <f-eh> f-sn <f-sn>
f-npdu <f-npdu>  msg-type <msg-type> msg-len <msg-len> teid <teid>] / ...

Match a GTP-U layer.

Possible filters:

  • version <version>

  • pt <protocol type>

  • f-eh <Flag extension header>

  • f-sn <Flag Sequence number>

  • f-npdu <Flag N-PDU number>

  • msg-type <message type>

  • msg-len <message length>

  • teid <teid>

spec and mask may not be present nor contain all filters.

GTP-PSC

Synopsis

... / gtp-psc [spec pdu-type <pdu-type> mask pdu-type <pdu-type>] / ...

Match a GTP-PSC layer.

Possible filters:

  • pdu-type <pdu-type>

spec and mask may not be present nor contain all filters.

GRE

Synopsis

... / gre [spec protocol <type> mask protocol <type>]
/ ...

Match a GRE layer.

Possible filters:

  • protocol <type>

spec and mask may not be present nor contain all filters.

SCTP

Synopsis

... / sctp [spec sport <src-port> dport <dst-port> mask sport <src-port> dport <dst-port>]
/ ...

Match an SCTP layer.

Possible filters:

  • sport <SCTP source port>

  • dport <SCTP destination port>

spec and mask may not be present nor contain all filters.

ICMP

Synopsis

... / icmp [spec type <type> code <code> mask type <type> code <code>]
/ ...

Match an ICMP layer.

Possible filters:

  • type <ICMP type>

  • code <ICMP code>

spec and mask may not be present nor contain all filters.

ICMPv6

Synopsis

... / icmp6 [spec type <type> code <code> mask type <type> code <code>]
/ ...

Match an ICMPv6 layer.

Possible filters:

  • type <ICMP type>

  • code <ICMP code>

spec and mask may not be present nor contain all filters.

Actions

RSS

Synopsis

... actions rss [types ipv4 ipv6 ... end] / end

Dispatch the matching flows among queues by using the RSS result computed on the types provided. If no type is provided no RSS hash dispatch is performed and all matching traffic will be dispatch on the first Rx queue.

Possible list values:

  • none

  • all

  • eth

  • vlan

  • ipv4

  • ipv4-frag

  • ipv4-tcp

  • ipv4-udp

  • ipv4-sctp

  • ipv4-other

  • ipv6

  • ipv6-frag

  • ipv6-tcp

  • ipv6-udp

  • ipv6-sctp

  • ipv6-other

  • l2-payload

  • ipv6-ex

  • ipv6-tcp-ex

  • ipv6-udp-ex

  • port

  • vxlan

  • geneve

  • nvgre

  • ip

  • udp

  • tcp

  • sctp

  • tunnel

  • esp

  • ah

  • l2tpv3

  • pfcp

  • pppoe

  • gtpu

  • l2-src-only

  • l2-dst-only

  • s-vlan

  • c-vlan

  • l3-pre32

  • l3-pre40

  • l3-pre48

  • l3-pre56

  • l3-pre64

  • l3-pre96

  • l3-src-only

  • l3-dst-only

  • l4-src-only

  • l4-dst-only

Traffic monitoring

The traffic can be duplicated for monitoring

Configuring traffic mirroring

An interface traffic can be duplicated to another. It can be either full traffic or either ingress/egress part.

More than one interface can have its traffic duplicated to another. This allows the creation of a form of interception port.

Both source and destination ifaces can be virtual ifaces and must already exist before this command is used.

Call to this API are cumulative to allow cloning the same interface traffic to more than one destination.

Interfaces that are already recipient of duplicated traffic cannot be source of duplication themselves.

iface-mirror-set <on|off> <ifacesrc[-vrfN]> <ifacedst[-vrfxx]>,[ifacedst2[-vrfyy],...] [ingress|egress]
<on|off>

Select whether traffic mirroring should be enabled or disabled

<ifacesrc>

interface name whose traffic to start/stop mirroring The interface name can be extended with ‘-vrfN’ to choose an interface in a non-current vrf.

<ifacedst>

interface name to start duplicate traffic to. This parameter is needed for ‘on’ only. The interface name can be extended with ‘-vrfN’ to choose an interface in a non-current vrf.

[ingress|egress]

Select either ingress or egress traffic. If not set both are duplicated/disabled

Example

<fp-0> iface-mirror-set on eth0 dummy0 egress
<fp-0> iface-mirror-set on eth0 dummy1-vrf1 ingress
<fp-0> iface-mirror-set off eth0 ingress
<fp-0> iface-mirror-set off eth0

Reading traffic mirroring status

iface-mirror [ifacesrc]
[ifacesrc]

Optional interface name to show traffic mirroring status If not set, all interfaces mirroring status are printed

Example

<fp-0> iface-mirror eth0
       eth0-vrf0:
              Egress traffic is mirrored on: dummy0-vrf1

Filling

The filling of fast path tables can be displayed. It takes each VRF into account.

filling

Examples

<fp-0> filling
interfaces: 6/1344
neigh: 4/5000
routes: 9/50000
vrf: 1/16
lpm-tables: 128/256
lpm-mem: 232448/8388608
pbr-rules: 5/1024
neigh6: 3/5000
routes6: 5/50000
ipsec-sa: 0/8192
ipsec-sp: 0/8192
svti-ifaces: 0/128
vxlan-port: 0/15
vxlan-ifaces: 0/127
vxlan-fdb: 0/5000
vlan-ifaces: 0/127
macvlan-ifaces: 0/127
bridge-fdb: 0/5000
bridge-ifaces: 0/127
bridge-ports: 0/511
lag-ifaces: 0/32
lag-slave-ifaces: 0/65
gre-ifaces: 0/255
ebtables-rules: 32/3072
nfct: 5/1024
nfrules: 94/3072
nf-ipsets: 0/64
nf6ct: 0/1024
nf6rules: 74/2048
fp-vswitch-ports: 0/256
fp-vswitch-flows: 0/65536
fp-vswitch-masks: 0/32768

Statistics

Displaying all statistics

Display all non null statistics.

stats [percore|agg[regated]] [all]
percore

Display all statistics per core running the fast path.

agg[regated]

Display sum of Linux and fast path statistics.

all

Display all statistics (even those that are null).

Examples

<fp-0> stats all
==== interface stats:
eth1-vr0 port:0
  ifs_ipackets:0
  ifs_ierrors:0
  ifs_ilasterror:0
  ifs_ibytes:0
  ifs_imcasts:0
  ifs_opackets:0
  ifs_oerrors:0
  ifs_obytes:0
eth3-vr0 port:2
  ifs_ipackets:0
  ifs_ierrors:0
  ifs_ilasterror:0
  ifs_ibytes:0
  ifs_imcasts:0
  ifs_opackets:0
  ifs_oerrors:0
  ifs_obytes:0
==== IPv4 stats:
  IpForwDatagrams:682
  IpInReceives:682
  IpInReceivesRaw:682
  IpInReceivesExcept:0
  IpInDelivers:447
  IpInHdrErrors:0
  IpInTruncatedPkts:0
  IpInAddrErrors:0
  IpDroppedNoArp:0
  IpDroppedNoMemory:0
  IpDroppedForwarding:0
  IPDroppedOutOperative:0
  IpDroppedIPsec:0
  IpDroppedBlackhole:0
  IpDroppedInvalidInterface:0
  IpDroppedNetfilter:0
  IpDroppedRouteException:0
  IpReasmTimeout:0
  IpReasmReqds:0
  IpReasmOKs:0
  IpReasmFails:0
  IpReasmExceptions:0
  IpFragOKs:0
  IpFragFails:0
  IpFragCreates:0
  IpCsumErrors:0
  IpNeighCacheUpdate:0
  IpNhrpPacket:0
  IpNhrpErrorSend:0
==== arp stats:
  arpRequestSent:4
  arpReplyReceived:4
  arpRequestReceived:2
  arpReplySent:2
  arpPacketDelayed:4
  arpGratuitous:0
  arpUnhandled:0
  arpNotFound:0
  arpErrorNoMbuf:0
  arpErrorNoAddr:0
  arpErrorProto:0
  arpErrorInternal:0
  arpErrorQfull:0
  arpErrorQflush:0
  arpUnexpEvent:0
  arpUnexpPacket:0
==== global stats:
  fp_dropped:0
  fp_dropped_excp:0
  fp_dropped_excloop:0
  fp_dropped_ether:0
  fp_dropped_vlan:0
  fp_dropped_macvlan:0
  fp_dropped_bridge:0
  fp_dropped_ebtables:0
  fp_dropped_bonding:0
  fp_dropped_arp:0
  fp_dropped_mcast:0
  fp_dropped_mcast6:0
  fp_dropped_ip:0
  fp_dropped_ipv6:0
  fp_dropped_reasm:0
  fp_dropped_reasm6:0
  fp_dropped_netfilter:0
  fp_dropped_netfilter6:0
  fp_dropped_tunnel:0
  fp_dropped_gre:0
  fp_dropped_vxlan:0
  fp_dropped_ipsec:0
  fp_dropped_ipsec6:0
  fp_dropped_ovs:0
  fp_dropped_system:0
  fp_dropped_plugins:0
==== bridge stats:
  L2ForwFrames:0
  BridgeDroppedInvalidOutPort:0
  BridgeDroppedUnknownIface:0
  BridgeDroppedInputLookupError:0
  BridgeDroppedOutputLookupError:0
  BridgeDroppedFwdInvalid:0
  BridgeDroppedOutputUnknown:0
  BridgeDroppedMtuExceeded:0
  BridgeDroppedNoOutputPort:0
  BridgeDroppedLearning:0
  BridgeDroppedInvalidSrc:0
  BridgeDroppedPauseFrame:0
  BridgeDroppedInvalidState:0
  BridgeDroppedOutOperative:0
==== vlan stats:
  VlanDroppedInvalidTag:0
  VlanUnknownTag:0
  VlanDroppedInputUnknownIf:0
  VlanOutputUnknownIf:0
  VlanDroppedPrependFailure:0
  VlanDroppedInOperative:0
  VlanDroppedOutOperative:0
==== ebtables stats:
  L2FilterDroppedVerdict:0
  L2FilterDroppedHeaderTooShort:0
  L2FilterDroppedPrependFailure:0
  L2FilterDroppedIpInvalid:0
  L2FilterDroppedIpv6Invalid:0
  L2FilterDroppedFragFailure:0
==== exception stats:
  LocalBasicExceptions:506
  LocalFPTunExceptions:0
  ExceptionByModule:
    fp_exception_netfpc:57
    fp_exception_ether:0
    fp_exception_ifnet:0
    fp_exception_unknown_ifnet:0
    fp_exception_syslog:0
    fp_exception_reass:0
    fp_exception_tap:0
    fp_exception_tunnel:75
    fp_exception_mcast:0
    fp_exception_mcast6:0
    fp_exception_bonding:0
    fp_exception_bridge:25
    fp_exception_ebtables:0
    fp_exception_netfilter:25
    fp_exception_netfilter6:10
    fp_exception_npf:0
    fp_exception_gre:112
    fp_exception_ip:94
    fp_exception_ipv6:65
    fp_exception_ipsec:0
    fp_exception_ipsec6:0
    fp_exception_macvlan:0
    fp_exception_mpls:0
    fp_exception_packet_steer:0
    fp_exception_vlan:0
    fp_exception_vxlan:43
    fp_exception_ovs:0
  LocalExceptionClass:
    FPTUN_EXC_UNDEF:0
    FPTUN_EXC_SP_FUNC:449
    FPTUN_EXC_ETHER_DST:0
    FPTUN_EXC_IP_DST:0
    FPTUN_EXC_ICMP_NEEDED:0
    FPTUN_EXC_NDISC_NEEDED:0
    FPTUN_EXC_IKE_NEEDED:0
    FPTUN_EXC_FPC:0
    FPTUN_EXC_NF_FUNC:0
    FPTUN_EXC_TAP:0
    FPTUN_EXC_REPLAYWIN:0
    FPTUN_EXC_ECMP_NDISC_NEEDED:0
    FPTUN_EXC_SOCKET:0
    FPTUN_EXC_IP_PMTU:0
  LocalExceptionType:
     FPTUN_BASIC_EXCEPT:449
     FPTUN_IPV4_NATDONE_INPUT_EXCEPT:0
     FPTUN_IPV4_IPSECDONE_OUTPUT_EXCEPT:0
     FPTUN_IPV6_IPSECDONE_OUTPUT_EXCEPT:0
     FPTUN_IPV4_OUTPUT_EXCEPT:0
     FPTUN_IPV6_OUTPUT_EXCEPT:0
     FPTUN_IPV4_IPSECDONE_INPUT_EXCEPT:0
     FPTUN_IPV6_IPSECDONE_INPUT_EXCEPT:0
     FPTUN_ETH_INPUT_EXCEPT:0
     FPTUN_ETH_NORXOPS_INPUT_EXCEPT:0
     FPTUN_IFACE_INPUT_EXCEPT:0
     FPTUN_OUTPUT_EXCEPT:0
     FPTUN_ETH_SP_OUTPUT_REQ:0
     FPTUN_IPSEC_SP_OUTPUT_REQ:0
     FPTUN_TAP:0
     FPTUN_TRAFFIC_GEN_MSG:0
  LocalExceptionTypeFailure:
     FPTUN_BASIC_EXCEPT:0
     FPTUN_IPV4_NATDONE_INPUT_EXCEPT:0
     FPTUN_IPV4_IPSECDONE_OUTPUT_EXCEPT:0
     FPTUN_IPV6_IPSECDONE_OUTPUT_EXCEPT:0
     FPTUN_IPV4_OUTPUT_EXCEPT:0
     FPTUN_IPV6_OUTPUT_EXCEPT:0
     FPTUN_IPV4_IPSECDONE_INPUT_EXCEPT:0
     FPTUN_IPV6_IPSECDONE_INPUT_EXCEPT:0
     FPTUN_ETH_INPUT_EXCEPT:0
     FPTUN_ETH_NORXOPS_INPUT_EXCEPT:0
     FPTUN_IFACE_INPUT_EXCEPT:0
     FPTUN_OUTPUT_EXCEPT:0
     FPTUN_ETH_SP_OUTPUT_REQ:0
     FPTUN_IPSEC_SP_OUTPUT_REQ:0
     FPTUN_TAP:0
     FPTUN_TRAFFIC_GEN_MSG:0
  ExcpDroppedFpToLinuxFptunFailure:0
  ExcpDroppedFpToLinuxRestoreFailure:0
  ExcpDroppedFpToLinuxEthFptunPrependFailure:0
  ExcpDroppedFpToLinuxEcmpPrependFailure:0
  ExcpDroppedFpToLinuxEcmp6PrependFailure:0
  ExcpDroppedFpToLinuxIPsecPrependFailure:0
  ExcpDroppedFpToLinuxEthPrependFailure:0
  ExcpDroppedFpToLinuxNoIPv4RouteLocal:0
  ExcpDroppedFpToLinuxNoIPv6RouteLocal:0
  ExcpDroppedFpToLinuxAddMarkFailure:0
  ExcpDroppedInvalidMtag:0
  ExcpDroppedLinuxToFpOtherHost:0
  ExcpDroppedLinuxToFpMsgTooShort:0
  ExcpDroppedLinuxToFpInvalidVersion:0
  ExcpDroppedLinuxToFpUnknownIfUid:0
  ExcpDroppedLinuxToFpNoOutputFunction:0
  ExcpDroppedLinuxToFpIPv4PullupFailure:0
  ExcpDroppedLinuxToFpIPv6PullupFailure:0
  ExcpDroppedLinuxToFpUnknownCommand:0
  ExcpDroppedLinuxToFpInvalidPortId:0
  ExcpDroppedLinuxToFpTproxyFailure:0
  ExcpDroppedLinuxToFpGenericCommandFailure:0

When you invoke stats with the percore parameter, the value between square brackets ([]) is the cpu id to which the statistics belong.

<fp-0> stats percore
==== interface stats:
eth1-vr0 port:0
eth3-vr0 port:2
==== IPv4 stats:
    IpForwDatagrams:
      IpForwDatagrams[1]:682
      Total:682
    IpInReceives:
       IpInReceives[1]:682
       Total:682
    IpInReceivesRaw:
       IpInReceivesRaw[1]:682
       Total:682
    IpInReceivesExcept:
       IpInReceivesExcept[1]:0
       Total:0
    IpInDelivers:
       IpInDelivers[1]:447
       Total:447
==== arp stats:
==== global stats:
==== exception stats:
    LocalBasicExceptions[1]:527
    Total:527
  ExceptionByModule:
    fp_exception_netfpc[1]:78
    Total:57
    fp_exception_tunnel[1]:75
    Total:75
    fp_exception_bridge[1]:25
    Total:25
    fp_exception_netfilter[1]:25
    Total:25
    fp_exception_netfilter6[1]:10
    Total:10
    fp_exception_gre[1]:112
    Total:112
    fp_exception_ip[1]:94
    Total:94
    fp_exception_ipv6{1]:65
    Total:65
    fp_exception_vxlan[1]:43
    Total:43
  LocalExceptionClass:
    FPTUN_EXC_SP_FUNC[1]:449
    Total:449
  LocalExceptionType:
    FPTUN_BASIC_EXCEPT[1]:449
   LocalExceptionTypeFailure:
    Total:449
==== IPsec stats:

Displaying network interface statistics

stats-iface [percore|agg[regated]] [all]
percore

Display all statistics per core running the fast path.

aggregated

Display sum of Linux and fast path statistics.

all

Display all statistics (even those that are null).

Example

<fp-0> stats-iface all
lo-vr0 port:254
  ifs_ipackets:0
  ifs_ierrors:0
  ifs_ilasterror:0
  ifs_ibytes:0
  ifs_imcasts:0
  ifs_opackets:0
  ifs_oerrors:0
  ifs_obytes:0

Displaying network port statistics

stats-port [percore] [all]
percore

Display all statistics per core running the fast path.

all

Display all statistics (even those that are null).

Example

<fp-0> stats-port all
eth1-vr0 port:0
  ifs_ipackets:0
  ifs_ierrors:0
  ifs_ilasterror:0
  ifs_ibytes:0
  ifs_imcasts:0
  ifs_opackets:0
  ifs_oerrors:0
  ifs_obytes:0
eth3-vr0 port:2
  ifs_ipackets:0
  ifs_ierrors:0
  ifs_ilasterror:0
  ifs_ibytes:0
  ifs_imcasts:0
  ifs_opackets:0
  ifs_oerrors:0
  ifs_obytes:0

Displaying global fast path statistics

stats-global [percore] [all]
percore

Display all statistics per core running the fast path.

all

Display all statistics (even those that are null).

Example

<fp-0> stats-global all
  fp_dropped:0
  fp_dropped_excp:0
  fp_dropped_excloop:0
  fp_dropped_ether:0
  fp_dropped_vlan:0
  fp_dropped_macvlan:0
  fp_dropped_bridge:0
  fp_dropped_ebtables:0
  fp_dropped_bonding:0
  fp_dropped_arp:0
  fp_dropped_mcast:0
  fp_dropped_mcast6:0
  fp_dropped_ip:0
  fp_dropped_ipv6:0
  fp_dropped_reasm:0
  fp_dropped_reasm6:0
  fp_dropped_netfilter:0
  fp_dropped_netfilter6:0
  fp_dropped_tunnel:0
  fp_dropped_gre:0
  fp_dropped_vxlan:0
  fp_dropped_ipsec:0
  fp_dropped_ipsec6:0
  fp_dropped_ovs:0
  fp_dropped_system:0
  fp_dropped_plugins:0

Cryptographic statistics

Displaying list of available cryptographic libraries

crypto-lib

List the available cryptographic libraries

Example

<fp-0> crypto-lib
  Available crypto libraries:
     multibuffer
     generic

Displaying cryptographic statistics

stats-crypto [percore] [lib_name]
percore

Display all statistics per core running the fast path.

lib_name

Display only statistics of this cryptographic library.

Example

<fp-0> stats-crypto
  Cumulative statistics
  Nb crypto                :        86
  Nb asymmetric operations :         0
  Nb random operations     :         0
  Out of space in queue    :         0
  Out of mbufs             :         0
  Internal errors          :         0
  Authentication errors    :         0
  Dst output size errors   :         0
  Nb polls                 :       172
  Dummy polls              :        86
  Timeout flushs           :         0
  Bulk flushs              :        86

  Global statistics
  Nb sessions              :         2
  Out of sessions          :         0

<fp-0> stats-crypto multibuffer percore
  Core 1 statistics
  Nb crypto                :        86
  Nb asymmetric operations :         0
  Nb random operations     :         0
  Out of space in queue    :         0
  Out of mbufs             :         0
  Internal errors          :         0
  Authentication errors    :         0
  Dst output size errors   :         0
  Nb polls                 :       172
  Dummy polls              :        86
  Timeout flushs           :         0
  Bulk flushs              :        86

  Global statistics
  Nb sessions              :         2
  Out of sessions          :         0

Displaying bridge statistics

Synopsis

stats-bridge [percore] [all]
percore

Display bridge statistics per core.

all

Display all statistics (even those that are null).

Example

<fp-0> stats-bridge all
  L2ForwFrames:0
  BridgeDroppedUnknownIface:0
  BridgeDroppedInputLookupError:0
  BridgeDroppedOutputLookupError:0
  BridgeDroppedFwdInvalid:0
  BridgeDroppedOutputUnknown:0
  BridgeDroppedMtuExceeded:0
  BridgeDroppedNoOutputPort:0
  BridgeDroppedLearning:0
  BridgeDroppedInvalidSrc:0
  BridgeDroppedPauseFrame:0
  BridgeDroppedInvalidState:0
  BridgeDroppedOutOperative:0

Displaying filter-bridge statistics

Synopsis

stats-filter-bridge [percore] [all]
percore

Display filter-bridge statistics per core.

all

Display all statistics (even those that are null).

Example

<fp-0> stats-ebtables all
  L2FilterDroppedVerdict:0
  L2FilterDroppedHeaderTooShort:0
  L2FilterDroppedPrependFailure:0
  L2FilterDroppedIpInvalid:0
  L2FilterDroppedIpv6Invalid:0
  L2FilterDroppedFragFailure:0

Displaying vlan statistics

Synopsis

stats-vlan [percore] [all]
percore

Display vlan statistics per core.

all

Display all statistics (even those that are null).

Example

<fp-0> stats-vlan all
  VlanDroppedInvalidTag:0
  VlanUnknownTag:0
  VlanDroppedInputUnknownIf:0
  VlanOutputUnknownIf:0
  VlanDroppedPrependFailure:0
  VlanDroppedInOperative:0
  VlanDroppedOutOperative:0

Resetting all fast path statistics

stats-reset

Example

<fp-0> stats-reset
<fp-0> stats
==== interface stats:
eth1-vr0 port:0
eth3-vr0 port:2
==== IPv4 stats:
==== arp stats:
==== global stats:
==== exception stats:
   LocalBasicExceptions:2
   ExceptionByModule:
     fp_exception_netfpc:2
   LocalExceptionClass:
   LocalExceptionType:
   LocalExceptionTypeFailure:
==== IPsec stats:

Internal debugging

This section lists all commands that can force fast path behavior for debugging purposes.

Managing debug log

Displaying log level

log

Example

<fp-0> log
Log mode is syslog
Log level is 3

log MAIN_PROC is on
log EXC is on
log IP is on
log FRAG is on
log IPSEC_IN is on
log IPSEC_OUT is on
log IPSEC_REPL is on
[ snip ]

Setting log level

log-level-set LEVEL
LEVEL

LEVEL

LOG

0

Emergency: system is unusable

1

Alert: action must be taken immediately

2

Critical level messages

3

Error level messages

4

Warning level messages

5

Notice: normal but significant condition

6

Information level messages

7

Debug level messages

Example

<fp-0> log-level-set 2
Log level is 2

Setting log mode

log-mode-set console|syslog
console

Display logs directly on the console.

syslog

Send logs to syslog.

Example

<fp-0> log-mode-set syslog
Log mode is syslog

Setting log type

log-type-set <type>|all on|off
<type>

log type (exec ‘fp-cli log’ command to know the available type list).

all

Set all log type.

on or off

Enable or disable log of the selected type.

Example

<fp-0> log-type-set GRE on
log GRE is on

Displaying the fast path configuration flags

fp-state

Example

<fp-0> fp-state
FP is started

IPv4 Netfilter: off
IPv6 Netfilter: off
IPv4 Netfilter cache: off
IPv6 Netfilter cache: off
IPv4 IPsec output: off
IPv6 IPsec output: off
IPv4 IPsec input: off
IPv6 IPsec input: off
Do IPsec only once: off
Bridge filtering: off
Forced reassembly: off
Tap: off (local) (exceptions)
ARP reply: off
NPF packet filter: off
Fast forward: on
Transparent socket mode: off
IPv4 options processing: on
IPv6 options processing: on

The line “Fast forward: on” means the stack takes a shortcut to forward IP packets as long as other features are off (typically it skips filter and IPsec rules).

Displaying the list of fast path plugins

Displaying the list of fast path plugins for the fast path, the fast path manager, or fast path CLI modules.

module-list [fp|fpm|fpcli|all]
fp

List fast path loaded modules.

fpm

List FPM loaded modules.

fpcli

List fp-cli loaded modules.

all

List fast path, FPM and fp-cli loaded modules.

Example

<fp-0> module-list all
FP loaded modules:
     /usr/lib/fastpath/libfp-vswitch.so
FPM loaded modules:
     /usr/lib/fpm/libfpm-fp-vswitch.so
FPCLI loaded modules:
     /usr/lib/fp-cli/libfpd-vswitch.so

Displaying configuration

conf runtime|compiled
runtime

Display runtime arguments set when the fast path is launched (if no value has been set, the default values are displayed).

compiled

Display fast path configuration set at compilation time.

Example

<fp-0> conf runtime
Runtime values are:
     max-ifnet    :1025
     max-vr       :16