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|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-shmem-dpvi. 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.

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

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
  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
  IpNhrpPacket:0
  IpNhrpErrorSend:0
==== arp stats:
  arp_errors:0
  arp_unhandled:0
  arp_not_found:0
  arp_replied: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_vnb: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_vnb: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_VNB_TO_VNB: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_RFPS_UPDATE:0
     FPTUN_VNB2VNB_FP_TO_LINUX_EXCEPT:0
     FPTUN_VNB2VNB_LINUX_TO_FP_EXCEPT: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
    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
    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_vnb: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:
==== 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

Manage Flow Director configuration

Flow Director functionality is available on some network adapters (at the moment, ixgbe and i40e are the most popular adapters implementing it, but others do as well).

Displaying Flow Director configuration

Display the Flow Director configuration for a specific port.

dpdk-fdir-config <Pi>
<Pi>

Port number of the interface.

Example

<fp-0> dpdk-fdir-config 0
mode: none
memory: 64k
fdirhash: noreport
dropq: 0

Configuring Flow Director

Enable / disable Flow Director and change its parameters for a specific port.

Important

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

dpdk-fdir-config-set <Pi>
         [mode { perfect | signature | none }]
         [memory { 64k | 128k | 256k }]
         [fdirhash { noreport | report | always }]
         [dropq <u8>]
<Pi>

Port number of the interface.

mode

‘perfect’ is the only mode supported at the moment. ‘none’ disables Flow Director.

memory

Possible values are ‘64k’, ‘128k’, ‘256k’. This value has a direct impact on the number of Flow Director filters available.

fdirhash

Possible values are ‘noreport’, ‘report’, ‘always’. Instruct hardware to report the hash value that it computed.

dropqueue

If using Flow Director filters with drop flag set, set the queue where packets will be received (and if queue is not enabled, then packets will finally be dropped).

Example

<fp-0> dpdk-fdir-config-set 0 mode perfect memory 64k fdirhash noreport dropq 127

Manage a flow director mask

The mask is used to determine the part on which the flow director filter will be applied (i.e. for a specific field, bits set to 1 define the relevant bits to compare with the filter).

Displaying a flow director mask

Display the configured mask for a specific port.

dpdk-fdir-mask <Pi>
<Pi>

Port number of the interface.

Example

<fp-0> dpdk-fdir-mask 0
mask: vlan_tci: 0x002a
      ipv4 src_ip: 0xffffffff
      ipv4 dst_ip: 0x00000000
      ipv6 src_ip: 0x00000000 0x00000000 0x00000000 0x00000000
      ipv6 dst_ip: 0x00000000 0x00000000 0x00000000 0x00000000
      sport: 0x0000
      dport: 0xffff

Setting a flow director mask

Set the configured mask for a specific port.

Important

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

dpdk-fdir-mask-set <Pi>
         [vlan_tci           <u16>]
         [src_port           <u16>]
         [dst_port           <u16>]
         [src_ip   <@ipv4>|<@ipv6>]
         [dst_ip   <@ipv4>|<@ipv6>]
<Pi>

Port number of the interface.

vlan_tci

Bits set to 1 define which bits will be matched in the vlan_tci field.

dst_ip

Bits set to 1 define the relevant bits to use in the destination address of an IP packet. You can provide either a v4, or a v6 address; the relevant field will be set.

src_ip

Bits set to 1 define the relevant bits to use in the source address of an IP packet. You can provide either a v4, or a v6 address; the relevant field will be set.

dst_port

Bits set to 1 define the relevant bits to use in the destination port of selected Layer 4 protocol (TCP or UDP).

src_port

Bits set to 1 define the relevant bits to use in the source port of selected Layer 4 protocol (TCP or UDP).

Example

<fp-0> dpdk-fdir-mask-set 0 src_ip 255.255.255.255 src_ip ffff::cff dst_port 65535

Manage a port’s filters

A filter is composed of two main parts: an input flow, and a programmable action. The input flow serves to characterize which flow should be matched, while the action defines what should be done when a flow is matched.

Only the perfect filter type has been tested and is currently supported. The signature filter type will have a different behavior, and is not covered in this documentation.

Adding a flow director filter

The filter provided will be added to the filter pool of the specified interface. How the interface responds to various situations is up to the PMD. On IXGBE, if two input flows collide, the new programmable action is discarded. Otherwise, if there is enough space, the new filter is added. If a filter is successfully defined (but before it is added by the driver), it is displayed. Make sure that the provided filter is compatible with your interface, however.

<fp-0> dpdk-fdir-filter-add <Pi> FILTER
               FILTER := (in any order)
                       FLOW_TYPE [flex_off <u8>] [flexbytes <u8>[ ...]]
                       [src_port <u16>] [dst_port <u16>] [rx_queue <u16>]
                       [vlan_tci <u16>] [verify_tag <u32>] [soft_id <u32>]
                       [REPORT_TYPE] [src_ip <@ipv4>|<@ipv6>]
                       [dst_ip <@ipv4>|<@ipv6>] [ACTION]
<Pi>

Port number of the interface.

FLOW_TYPE

The flow type that will be targeted by the filter. Available flow types are defined by the PMD of your interface. You can either use the full name or its shorthand alias to specify it. If no flow_type is provided, it is assumed to be none. If several flow types are provided, the last one will overwrite all previous values. The flow_type is part of the input flow.

full name

alias

none

N/A

raw

N/A

ipv4

i4

ipv4_frag

f4

ipv4_tcp

t4

ipv4_udp

u4

ipv4_sctp

s4

ipv4_other

o4

ipv6

i6

ipv6_frag

f6

ipv6_udp

u6

ipv6_tcp

t6

ipv6_sctp

s6

ipv6_other

o6

l2_payload

l2pl

ipv6_ex

i6x

ipv6_tcp_ex

t6x

ipv6_udp_ex

u6x

<flex_off>

An offset from which the flexbytes will be read for reporting purposes. It is part of the programmable action.

<flexbytes>

When using a flex configuration, bytes to be matched within a flow. Although they should be provided as unsigned 8 bits values, a flexbyte matching will only be performed on 16 bits wide words. If 0x is prepended to a value, it will be read as hexadecimal.

<src_port>, <dst_port>

Which source or destination port to match in a flow. It is part of the input flow. It will conflict with any verify_tag parameter.

<rx_queue>

Define which queue the packet should be sent to. It is part of the programmable action.

<vlan_tci>

A VLAN identifier that can be matched.

<verify_tag>

A verify_tag that can be matched in a SCTP stream. It is part of the input flow. It will conflict with both source and destination port.

<soft_id>

A value that can be used to identify a filter and possibly differentiate how a match is reported.

REPORT_TYPE

Which kind of information to report when a packet is matched.

no_report

Do not fill the matching packet with any extra information (any counters would still be incremented).

report_id

The matching packet will contain the given soft_id of the matching filter.

report_flex

Set the relevant fields in the packet with the matched flex bytes.

report_id_flex

Try to fit both the id and the flex. However, only part of each will be written due to size constraints. It is part of the programmable action.

<src_ip>, <dst_ip>

IPv4 or IPv6 source and destination addresses. The relevant field will be set. It is part of the input flow.

Important

Do not provide mix IPv4 and IPv6 addresses.

ACTION
accept | reject

Whether to forward (accept) or drop (reject) the matched packet. It is part of the programmable action.

Examples

<fp-0> dpdk-fdir-filter-add 5 o4 rx_queue 3 dst_ip 11.0.1.1
ADD operation on filter:

filter: soft_id: 00000000
        input: flow_type: 0007 (ipv4_other)
               flow: ip4_flow: src_ip: 0.0.0.0
                               dst_ip: 11.0.1.1
               flow_ext: vlan_tci: 0000
                         flexbytes: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
        action: rx_queue: 0003
                flex_off: 00
                behavior: ACCEPT
                report_status: no_report

Setting a flow director filter

Allow to update a filter, which can be targeted by specifying its input flow. On IXGBE, if such a filter already exists, its programmable action is overwritten with the new one. If there is no filter matching the input flow, this command behaves like dpdk-fdir-filter-add.

<fp-0> dpdk-fdir-filter-set <Pi> FILTER
               FILTER := (in any order)
                       FLOW_TYPE [flex_off <u8>] [flexbytes <u8>[ ...]]
                       [src_port <u16>] [dst_port <u16>] [rx_queue <u16>]
                       [vlan_tci <u16>] [verify_tag <u32>] [soft_id <u32>]
                       [REPORT_TYPE] [src_ip <@ipv4>|<@ipv6>]
                       [dst_ip <@ipv4>|<@ipv6>] [ACTION]
<Pi>

Port number of the interface.

FLOW_TYPE

The flow type that will be targeted by the filter. Available flow types are defined by the PMD of your interface. You can either use the full name or its shorthand alias to specify it. If no flow_type is provided, it is assumed to be none. If several flow types are provided, the last one will overwrite all previous values. The flow_type is part of the input flow.

full name

alias

none

N/A

raw

N/A

ipv4

i4

ipv4_frag

f4

ipv4_tcp

t4

ipv4_udp

u4

ipv4_sctp

s4

ipv4_other

o4

ipv6

i6

ipv6_frag

f6

ipv6_udp

u6

ipv6_tcp

t6

ipv6_sctp

s6

ipv6_other

o6

l2_payload

l2pl

ipv6_ex

i6x

ipv6_tcp_ex

t6x

ipv6_udp_ex

u6x

<flex_off>

An offset from which the flexbytes will be read for reporting purposes. It is part of the programmable action.

<flexbytes>

When using a flex configuration, bytes to be matched within a flow. Although they should be provided as unsigned 8 bits values, a flexbyte matching will only be performed on 16 bits wide words. If 0x is prepended to a value, it will be read as hexadecimal.

<src_port>, <dst_port>

Which source or destination port to match in a flow. It is part of the input flow. It will conflict with any verify_tag parameter.

<rx_queue>

Define which queue the packet should be sent to. It is part of the programmable action.

<vlan_tci>

A VLAN identifier that can be matched.

<verify_tag>

A verify_tag that can be matched in a SCTP stream. It is part of the input flow. It will conflict with both source and destination port.

<soft_id>

A value that can be used to identify a filter and possibly differentiate how a match is reported.

REPORT_TYPE

Which kind of information to report when a packet is matched.

no_report

Do not fill the matching packet with any extra information (any counters would still be incremented).

report_id

The matching packet will contain the given soft_id of the matching filter.

report_flex

Set the relevant fields in the packet with the matched flex bytes.

report_id_flex

Try to fit both the id and the flex. However, only part of each will be written due to size constraints. It is part of the programmable action.

<src_ip>, <dst_ip>

IPv4 or IPv6 source and destination addresses. The relevant field will be set. It is part of the input flow.

Important

Do not provide mix IPv4 and IPv6 addresses.

ACTION
accept | reject

Whether to forward (accept) or drop (reject) the matched packet. It is part of the programmable action.

Examples

<fp-0> dpdk-fdir-filter-set 5 s4 report_id reject
UPDATE operation on filter:

filter: soft_id: 00000000
        input: flow_type: 0006 (ipv4_sctp)
               flow: ip4_flow: src_ip: 0.0.0.0
                               dst_ip: 0.0.0.0
                     sctp4_flow: verify_tag: 00000000
               flow_ext: vlan_tci: 0000
                         flexbytes: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
        action: rx_queue: 0000
                flex_off: 00
                behavior: REJECT
                report_status: report_id

Deleting a flow director filter

Provided the specified input flow is used by a filter, such a filter is deleted from the filter pool. If no filter exists, nothing happens.

<fp-0> dpdk-fdir-filter-del <Pi> FILTER
               FILTER := (in any order)
                       FLOW_TYPE [flex_off <u8>] [flexbytes <u8>[ ...]]
                       [src_port <u16>] [dst_port <u16>] [rx_queue <u16>]
                       [vlan_tci <u16>] [verify_tag <u32>] [soft_id <u32>]
                       [REPORT_TYPE] [src_ip <@ipv4>|<@ipv6>]
                       [dst_ip <@ipv4>|<@ipv6>] [ACTION]
<Pi>

Port number of the interface.

FLOW_TYPE

The flow type that will be targeted by the filter. Available flow types are defined by the PMD of your interface. You can either use the full name or its shorthand alias to specify it. If no flow_type is provided, it is assumed to be none. If several flow types are provided, the last one will overwrite all previous values. The flow_type is part of the input flow.

full name

alias

none

N/A

raw

N/A

ipv4

i4

ipv4_frag

f4

ipv4_tcp

t4

ipv4_udp

u4

ipv4_sctp

s4

ipv4_other

o4

ipv6

i6

ipv6_frag

f6

ipv6_udp

u6

ipv6_tcp

t6

ipv6_sctp

s6

ipv6_other

o6

l2_payload

l2pl

ipv6_ex

i6x

ipv6_tcp_ex

t6x

ipv6_udp_ex

u6x

<flex_off>

An offset from which the flexbytes will be read for reporting purposes. It is part of the programmable action.

<flexbytes>

When using a flex configuration, bytes to be matched within a flow. Although they should be provided as unsigned 8 bits values, a flexbyte matching will only be performed on 16 bits wide words. If 0x is prepended to a value, it will be read as hexadecimal.

<src_port>, <dst_port>

Which source or destination port to match in a flow. It is part of the input flow. It will conflict with any verify_tag parameter.

<rx_queue>

Define which queue the packet should be sent to. It is part of the programmable action.

<vlan_tci>

A VLAN identifier that can be matched.

<verify_tag>

A verify_tag that can be matched in a SCTP stream. It is part of the input flow. It will conflict with both source and destination port.

<soft_id>

A value that can be used to identify a filter and possibly differentiate how a match is reported.

REPORT_TYPE

Which kind of information to report when a packet is matched.

no_report

Do not fill the matching packet with any extra information (any counters would still be incremented).

report_id

The matching packet will contain the given soft_id of the matching filter.

report_flex

Set the relevant fields in the packet with the matched flex bytes.

report_id_flex

Try to fit both the id and the flex. However, only part of each will be written due to size constraints. It is part of the programmable action.

<src_ip>, <dst_ip>

IPv4 or IPv6 source and destination addresses. The relevant field will be set. It is part of the input flow.

Important

Do not provide mix IPv4 and IPv6 addresses.

ACTION
accept | reject

Whether to forward (accept) or drop (reject) the matched packet. It is part of the programmable action.

Examples

<fp-0> dpdk-fdir-filter-del 5 o4 rx_queue 3 dst_ip 11.0.1.1
DELETE operation on filter:

filter: soft_id: 00000000
        input: flow_type: 0007 (ipv4_other)
               flow: ip4_flow: src_ip: 0.0.0.0
                               dst_ip: 11.0.1.1
               flow_ext: vlan_tci: 0000
                         flexbytes: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
        action: rx_queue: 0003
                flex_off: 00
                behavior: ACCEPT
                report_status: no_report

Flushing a flow director filter

Erase every filter from the specified interface filter pool.

<fp-0> dpdk-fdir-filter-flush <Pi>
<Pi>

Port number of the interface.

Examples

<fp-0> dpdk-fdir-filter-flush 5
Flushing filters

Manage a flex configuration

You must disable, then re-enable the interface to take your changes into account.

Displaying flex configuration

Display the flex configuration of a given interface. If no other parameter is provided, only display the non-zero sets in decimal notation for the payload offsets, and in hexadecimal notation for the masks.

<fp-0> dpdk-fdir-flex <Pi> [<base=10>] [full]
<Pi>

Port number of the interface.

<base>

Base in which the values are displayed.

full

Display every field.

Examples

<fp-0> dpdk-fdir-flex 1
      payload   0 raw [58 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      flexmask  0 none [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Setting flex payload

Command to write a flex-set. A payload set is a set of 16 offsets that will be matched against a flexbyte series provided in a filter.

<fp-0> dpdk-fdir-flex-set <Pi> <pid>|all PAYLOAD <u16>[ <u16>[ ...]]
<Pi>

Port number of the interface.

<pid> | all

Payload ID. Defines which flex-set to write to (from 0 to 7 included). Use all to set every payload at the same time.

PAYLOAD

The payload type.

l2

The flexible payload is started from the beginning of the data link layer (unsupported by ixgbe driver).

l3

The flexible payload is started from the beginning of the network layer (unsupported by ixgbe driver).

l4

The flexible payload is started from the beginning of the transport layer (unsupported by ixgbe driver).

raw

The flexible payload is started from the beginning of the packet.

<u16>[ <u16>[ …]]

The payload offset (zero if not set).

Examples

<fp-0> dpdk-fdir-flex-set 1 all raw 0xff 0xff
<fp-0> dpdk-fdir-flex 1 16
      payload   0 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      payload   1 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      payload   2 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      payload   3 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      payload   4 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      payload   5 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      payload   6 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      payload   7 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Setting flex mask

Define a flex-mask. The first bit marks the bits to be matched from the offsets defined by the flex-sets.

<fp-0> dpdk-fdir-flex-mask-set <Pi> <fid>|all FLOW_TYPE <u8>[ <u8>[ ...]]
<Pi>

Port number of the interface.

<fid> | all

Flow ID. Which flow to match (from 0 to 17 included). Some PMDs will infer the flow type from the fid, while others will allow to use a specific flow type on a specific fid. Use all to set every mask at the same time.

FLOW_TYPE

The flow type that will be targeted by the filter. Available flow types are defined by the PMD of your interface. You can either use the full name or its shorthand alias to specify it. If no flow_type is provided, it is assumed to be none. If several flow types are provided, the last one will overwrite all previous values. The flow_type is part of the input flow.

full name

alias

none

N/A

raw

N/A

ipv4

i4

ipv4_frag

f4

ipv4_tcp

t4

ipv4_udp

u4

ipv4_sctp

s4

ipv4_other

o4

ipv6

i6

ipv6_frag

f6

ipv6_udp

u6

ipv6_tcp

t6

ipv6_sctp

s6

ipv6_other

o6

l2_payload

l2pl

ipv6_ex

i6x

ipv6_tcp_ex

t6x

ipv6_udp_ex

u6x

<u8>[ <u8>[ …]]

The mask offset (zero if not set).

Examples

<fp-0> dpdk-fdir-flex-mask-set 1 0 raw 0xff 0xff
<fp-0> dpdk-fdir-flex 1
      flexmask  0 raw [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Copying a flex configuration

Copy a flex configuration from another interface. The flex configuration of the <Pi> interface will be a copy of the src Pi flex configuration.

<fp-0> dpdk-fdir-flex-copy <Pi> <src Pi>
<Pi>

Port number of the destination interface.

<src Pi>

Port number of the source interface.

Examples

<fp-0> dpdk-fdir-flex-set 1 0 raw 58 59
<fp-0> dpdk-fdir-flex-mask-set 1 0 none 0xff 0xff
<fp-0> dpdk-fdir-flex-copy 2 1
<fp-0> dpdk-fdir-flex 1
      payload   0 raw [58 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      flexmask  0 none [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
<fp-0> dpdk-fdir-flex 2
      payload   0 raw [58 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      flexmask  0 none [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Flushing flex payload

Flush a flex configuration. If no specific ID is provided, every payload field will be flushed. If a specific ID is provided, only this entry will be flushed.

<fp-0> dpdk-fdir-flex-flush <Pi> [<pid>]
<Pi>

Port number of the interface.

<pid>

Payload ID. Defines which flex-set to flush to (from 0 to 7 included).

Examples

<fp-0> dpdk-fdir-flex-set 1 0 raw 58 59
<fp-0> dpdk-fdir-flex-mask-set 1 0 none 0xff 0xff
<fp-0> dpdk-fdir-flex 1
      payload   0 raw [58 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      flexmask  0 none [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
<fp-0> dpdk-fdir-flex-flush 1
<fp-0> dpdk-fdir-flex 1
      flexmask  0 none [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Flushing flex mask

Flush a flex configuration. If no specific ID is provided, every mask field will be flushed. If a specific ID is provided, only this mask will be flushed.

<fp-0> dpdk-fdir-flex-mask-flush <Pi> [<fid>]
<Pi>

Port number of the interface.

<fid>

Flow ID. Which flow to flush (from 0 to 17 included).

Examples

<fp-0> dpdk-fdir-flex-set 1 0 raw 58 59
<fp-0> dpdk-fdir-flex-mask-set 1 0 none 0xff 0xff
<fp-0> dpdk-fdir-flex 1
      payload   0 raw [58 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
      flexmask  0 none [ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
<fp-0> dpdk-fdir-flex-mask-flush 1
<fp-0> dpdk-fdir-flex 1
      payload   0 raw [58 59 0 0 0 0 0 0 0 0 0 0 0 0 0 0]