arpd

title: arpd(8)

summary: userspace arp daemon.

text:
# arpd(8)

## NAME
arpd - userspace arp daemon.

## SYNOPSIS
Usage: arpd [ -lkh? ] [ -a N ] [ -b dbase ] [ -B number ] [ -f file ] [-p interval ] [ -n time ] [ -R rate ] [ <INTERFACES> ]

## DESCRIPTION
The arpd daemon collects gratuitous ARP information, saving it on local disk and feeding it to the kernel on demand to avoid redundant broadcasting due to limited size of the kernel ARP cache.

## OPTIONS
-h -?

Print help

-l

Dump the arpd database to stdout and exit. The output consists of three columns: the interface index, the IP address of the interface, and the MAC address of the interface. Negative entries for dead hosts are also shown, in this case the MAC address is replaced by the word FAILED followed by a colon and the most recent time when the fact that the host is dead was proven.

-f <FILE>

Read and load an arpd database from FILE in a text format similar to that dumped by option -l. Exit after load, possibly listing resulting database, if option -l is also given. If FILE is -, stdin is read to get the ARP table.

-b <DATABASE>

the location of the database file. The default location is /var/lib/arpd/arpd.db

-a <NUMBER>

With this option, arpd not only passively listens for ARP packets on the interface, but also sends broadcast queries itself. NUMBER is the number of such queries to make before a destination is considered dead. When arpd is started as kernel helper (i.e. with app_solicit enabled in sysctl or even with option -k) without this option and still did not learn enough information, you can observe 1 second gaps in service. Not fatal, but not good.

-k

Suppress sending broadcast queries by the kernel. This option only makes sense together with option -a.

-n <TIME>

Specifies the timeout of the negative cache. When resolution fails, arpd suppresses further attempts to resolve for this period. This option only makes sense together with option '-k'. This timeout should not be too much longer than the boot time of a typical host not supporting gratuitous ARP. Default value is 60 seconds.

-p <TIME>

The time to wait in seconds between polling attempts to the kernel ARP table. TIME may be a floating point number. The default value is 30.

-R <RATE>

Maximal steady rate of broadcasts sent by arpd in packets per second. Default value is 1.

-B <NUMBER>

The number of broadcasts sent by arpd back to back. Default value is 3. Together with the -R option, this option ensures that the number of ARP queries that are broadcast does not exceed B+R*T over any interval of time T.

<INTERFACES> is a list of names of networking interfaces to watch. If no interfaces are given, arpd monitors all the interfaces. In this case arpd does not adjust sysctl parameters, it is assumed that the user does this himself after arpd is started.

## SIGNALS
When arpd receives a SIGINT or SIGTERM signal, it exits gracefully, syncing the database and restoring adjusted sysctl parameters. On a SIGHUP it syncs the database to disk. With SIGUSR1 it sends some statistics to syslog. The effect of any other signals is undefined. In particular, they may corrupt the database and leave the sysctl parameters in an unpredictable state.

## NOTE
In order for arpd to be able to serve as ARP resolver, the kernel must be compiled with the option CONFIG_ARPD and, in the case when interface list in not given on command line, variable app_solicit on interfaces of interest should be in /proc/sys/net/ipv4/neigh/*. If this is not made arpd still collects gratuitous ARP information in its database.

## EXAMPLES
arpd -b /var/tmp/arpd.db

Start arpd to collect gratuitous ARP, but not messing with kernel functionality.

killall arpd ; arpd -l -b /var/tmp/arpd.db

Look at result after some time.

arpd -b /var/tmp/arpd.db -a 1 eth0 eth1

Enable kernel helper, leaving leading role to kernel.

arpd -b /var/tmp/arpd.db -a 3 -k eth0 eth1

Completely replace kernel resolution on interfaces eth0 and eth1. In this case the kernel still does unicast probing to validate entries, but all the broadcast activity is suppressed and made under authority of arpd.

This is the mode in which arpd normally is supposed to work. It is not the default to prevent occasional enabling of too aggressive a mode.


bridge

title: bridge(8)

text:
# bridge(8)

## NAME
bridge - show / manipulate bridge addresses and devices

## SYNOPSIS

bridge [ OPTIONS ] OBJECT { COMMAND | help }

OBJECT := { link | fdb | mdb | vlan | monitor }

OPTIONS := { -V[ersion] | -s[tatistics] | -n[etns] name | -b[atch] filename | -c[lor] | -p[retty] | -j[son] | -o[neline] }

bridge link set dev DEV [ cost COST ] [ priority PRIO ] [ state STATE ] [ guard { on | off } ] [ hairpin { on | off } ] [ fastleave { on | off } ] [ root_block { on | off } ] [ learning { on | off } ] [ learning_sync { on | off } ] [ flood { on | off } ] [ hwmode { vepa | veb } ] [ mcast_flood { on | off } ] [ mcast_to_unicast { on | off } ] [ neigh_suppress { on | off } ] [ vlan_tunnel { on | off } ] [ isolated { on | off } ] [ backup_port DEVICE ] [ nobackup_port ] [ self ] [ master ]

bridge link [ show ] [ dev DEV ]

bridge fdb { add | append | del | replace } LLADDR dev DEV { local | static | dynamic } [ self ] [ master ] [ router ] [ use ] [ extern_learn ] [ sticky ] [ src_vni VNI ] { [ dst IPADDR ] [ vni VNI ] [ port PORT ] [ via DEVICE ] | nhid NHID }

bridge fdb [ [ show ] [ br BRDEV ] [ brport DEV ] [ vlan VID ] [ state STATE ] [ dynamic ] ]

bridge fdb get [ to ] LLADDR [ br BRDEV ] { brport | dev } DEV [ vlan VID ] [ vni VNI ] [ self ] [ master ] [ dynamic ]

bridge mdb { add | del } dev DEV port PORT grp GROUP [ src SOURCE ] [ permanent | temp ] [ vid VID ]

bridge mdb show [ dev DEV ]

bridge vlan { add | del } dev DEV vid VID [ tunnel_info TUNNEL_ID ] [ pvid ] [ untagged ] [ self ] [ master ]

bridge vlan set dev DEV vid VID [ state STP_STATE ]

bridge vlan [ show | tunnelshow ] [ dev DEV ]

bridge monitor [ all | neigh | link | mdb | vlan ]

## OPTIONS
-V, -Version

print the version of the bridge utility and exit.

-s, -stats, -statistics

output more information. If this option is given multiple times, the amount of information increases. As a rule, the information is statistics or some time values.

-d, -details

print detailed information about bridge vlan filter entries or MDB router ports.

-n, -net, -netns <NETNS>

switches bridge to the specified network namespace NETNS. Actually it just simplifies executing of: ip netns exec NETNS bridge [ OPTIONS ] OBJECT { COMMAND | help }

to

bridge -n[etns] NETNS [ OPTIONS ] OBJECT { COMMAND | help }

-b, -batch <FILENAME>

Read commands from provided file or standard input and invoke them. First failure will cause termination of bridge command.

-force

Don't terminate bridge command on errors in batch mode. If there were any errors during execution of the commands, the application return code will be non zero.

-c[color][={always|auto|never}

Configure color output. If parameter is omitted or always, color output is enabled regardless of stdout state. If parameter is auto, stdout is checked to be a terminal before enabling color output. If parameter is never, color output is disabled. If specified multiple times, the last one takes precedence. This flag is ignored if -json is also given.

-j, -json

Output results in JavaScript Object Notation (JSON).

-p, -pretty

When combined with -j generate a pretty JSON output.

-o, -oneline

output each record on a single line, replacing line feeds with the '\' character. This is convenient when you want to count records with wc(1) or to grep(1) the output.

## BRIDGE - COMMAND SYNTAX

### OBJECT
link

- Bridge port.

fdb

- Forwarding Database entry.

mdb

- Multicast group database entry.

vlan

- VLAN filter list.

### COMMAND
Specifies the action to perform on the object. The set of possible actions depends on the object type. As a rule, it is possible to add, delete and show (or list ) objects, but some objects do not allow all of these operations or have some additional commands. The help command is available for all objects. It prints out a list of available commands and argument syntax conventions.

If no command is given, some default command is assumed. Usually it is list or, if the objects of this class cannot be listed, help.

## bridge link - bridge port
link objects correspond to the port devices of the bridge.

The corresponding commands set and display port status and bridge specific attributes.

### bridge link set - set bridge specific attributes on a port
dev NAME

interface name of the bridge port

cost COST

the STP path cost of the specified port.

priority PRIO

the STP port priority. The priority value is an unsigned 8-bit quantity (number between 0 and 255). This metric is used in the designated port an droot port selection algorithms.

state STATE

the operation state of the port. Except state 0 (disable STP or BPDU filter feature), this is primarily used by user space STP/RSTP implementation. One may enter port state name (case insensitive), or one of the numbers below. Negative inputs are ignored, and unrecognized names return an error. 0 - port is in STP DISABLED state. Make this port completely inactive for STP. This is also called BPDU filter and could be used to disable STP on an untrusted port, like a leaf virtual devices.

1 - port is in STP LISTENING state. Only valid if STP is enabled on the bridge. In this state the port listens for STP BPDUs and drops all other traffic frames.

2 - port is in STP LEARNING state. Only valid if STP is enabled on the bridge. In this state the port will accept traffic only for the purpose of updating MAC address tables.

3 - port is in STP FORWARDING state. Port is fully active.

4 - port is in STP BLOCKING state. Only valid if STP is enabled on the bridge. This state is used during the STP election process. In this state, port will only process STP BPDUs.

guard on or guard off

Controls whether STP BPDUs will be processed by the bridge port. By default, the flag is turned off allowed BPDU processing. Turning this flag on will disables the bridge port if a STP BPDU packet is received. If running Spanning Tree on bridge, hostile devices on the network may send BPDU on a port and cause network failure. Setting guard on will detect and stop this by disabling the port. The port will be restarted if link is brought down, or removed and reattached. For example if guard is enable on eth0:

ip link set dev eth0 down; ip link set dev eth0 up

hairpin on or hairpin off

Controls whether traffic may be send back out of the port on which it was received. This option is also called reflective relay mode, and is used to support basic VEPA (Virtual Ethernet Port Aggregator) capabilities. By default, this flag is turned off and the bridge will not forward traffic back out of the receiving port.

fastleave on or fastleave off

This flag allows the bridge to immediately stop multicast traffic on a port that receives IGMP Leave message. It is only used with IGMP snooping is enabled on the bridge. By default the flag is off.

root_block on or root_block off

Controls whether a given port is allowed to become root port or not. Only used when STP is enabled on the bridge. By default the flag is off. This feature is also called root port guard. If BPDU is received from a leaf (edge) port, it should not be elected as root port. This could be used if using STP on a bridge and the downstream bridges are not fully trusted; this prevents a hostile guest from rerouting traffic.

learning on or learning off

Controls whether a given port will learn MAC addresses from received traffic or not. If learning if off, the bridge will end up flooding any traffic for which it has no FDB entry. By default this flag is on.

learning_sync on or learning_sync off

Controls whether a given port will sync MAC addresses learned on device port to bridge FDB.

flood on or flood off

Controls whether unicast traffic for which there is no FDB entry will be flooded towards this given port. By default this flag is on.

hwmode

Some network interface cards support HW bridge functionality and they may be configured in different modes. Currently support modes are: vepa - Data sent between HW ports is sent on the wire to the external switch.

veb - bridging happens in hardware.

mcast_flood on or mcast_flood off

Controls whether multicast traffic for which there is no MDB entry will be flooded towards this given port. By default this flag is on.

mcast_to_unicast on or mcast_to_unicast off

Controls whether a given port will replicate packets using unicast instead of multicast. By default this flag is off. This is done by copying the packet per host and changing the multicast destination MAC to a unicast one accordingly.

mcast_to_unicast works on top of the multicast snooping feature of the bridge. Which means unicast copies are only delivered to hosts which are interested in it and signalized this via IGMP/MLD reports previously.

This feature is intended for interface types which have a more reliable and/or efficient way to deliver unicast packets than broadcast ones (e.g. WiFi).

However, it should only be enabled on interfaces where no IGMPv2/MLDv1 report suppression takes place. IGMP/MLD report suppression issue is usually overcome by the network daemon (supplicant) enabling AP isolation and by that separating all STAs.

Delivery of STA-to-STA IP multicast is made possible again by enabling and utilizing the bridge hairpin mode, which considers the incoming port as a potential outgoing port, too (see hairpin option). Hairpin mode is performed after multicast snooping, therefore leading to only deliver reports to STAs running a multicast router.

neigh_suppress on or neigh_suppress off

Controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.

vlan_tunnel on or vlan_tunnel off

Controls whether vlan to tunnel mapping is enabled on the port. By default this flag is off.

isolated on or isolated off

Controls whether a given port will be isolated, which means it will be able to communicate with non-isolated ports only. By default this flag is off.

backup_port DEVICE

If the port loses carrier all traffic will be redirected to the configured backup port

nobackup_port

Removes the currently configured backup port

self

link setting is configured on specified physical device

master

link setting is configured on the software bridge (default)

-t, -timestamp

display current time when using monitor option.

### bridge link show - list ports configuration for all bridges.
This command displays port configuration and flags for all bridges.

To display port configuration and flags for a specific bridge, use the "ip link show master <bridge_device>" command.

## bridge fdb - forwarding database management
fdb objects contain known Ethernet addresses on a link.

The corresponding commands display fdb entries, add new entries, append entries, and delete old ones.

### bridge fdb add - add a new fdb entry
This command creates a new fdb entry.

LLADDR

the Ethernet MAC address.

dev DEV

the interface to which this address is associated. local - is a local permanent fdb entry, which means that the bridge will not forward frames with this destination MAC address and VLAN ID, but terminate them locally. This flag is default unless "static" or "dynamic" are explicitly specified.

permanent - this is a synonym for "local"

static - is a static (no arp) fdb entry

dynamic - is a dynamic reachable age-able fdb entry

self - the operation is fulfilled directly by the driver for the specified network device. If the network device belongs to a master like a bridge, then the bridge is bypassed and not notified of this operation (and if the device does notify the bridge, it is driver-specific behavior and not mandated by this flag, check the driver for more details). The "bridge fdb add" command can also be used on the bridge device itself, and in this case, the added fdb entries will be locally terminated (not forwarded). In the latter case, the "self" flag is mandatory. The flag is set by default if "master" is not specified.

master - if the specified network device is a port that belongs to a master device such as a bridge, the operation is fulfilled by the master device's driver, which may in turn notify the port driver too of the address. If the specified device is a master itself, such as a bridge, this flag is invalid.

router - the destination address is associated with a router. Valid if the referenced device is a VXLAN type device and has route short circuit enabled.

use - the address is in use. User space can use this option to indicate to the kernel that the fdb entry is in use.

extern_learn - this entry was learned externally. This option can be used to indicate to the kernel that an entry was hardware or user-space controller learnt dynamic entry. Kernel will not age such an entry.

sticky - this entry will not change its port due to learning.

The next command line parameters apply only when the specified device DEV is of type VXLAN.

dst IPADDR

the IP address of the destination VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.

src_vni VNI

the src VNI Network Identifier (or VXLAN Segment ID) this entry belongs to. Used only when the vxlan device is in external or collect metadata mode. If omitted the value specified at vxlan device creation will be used.

vni VNI

the VXLAN VNI Network Identifier (or VXLAN Segment ID) to use to connect to the remote VXLAN tunnel endpoint. If omitted the value specified at vxlan device creation will be used.

port PORT

the UDP destination PORT number to use to connect to the remote VXLAN tunnel endpoint. If omitted the default value is used.

via DEVICE

device name of the outgoing interface for the VXLAN device driver to reach the remote VXLAN tunnel endpoint.

nhid NHID

ecmp nexthop group for the VXLAN device driver to reach remote VXLAN tunnel endpoints.

### bridge fdb append - append a forwarding database entry
This command adds a new fdb entry with an already known LLADDR. Valid only for multicast link layer addresses. The command adds support for broadcast and multicast Ethernet MAC addresses. The Ethernet MAC address is added multiple times into the forwarding database and the vxlan device driver sends a copy of the data packet to each entry found.

The arguments are the same as with bridge fdb add.

### bridge fdb delete - delete a forwarding database entry
This command removes an existing fdb entry.

The arguments are the same as with bridge fdb add.

### bridge fdb replace - replace a forwarding database entry
If no matching entry is found, a new one will be created instead.

The arguments are the same as with bridge fdb add.

### bridge fdb show - list forwarding entries.
This command displays the current forwarding table.

With the -statistics option, the command becomes verbose. It prints out the last updated and last used time for each entry.

### bridge fdb get - get bridge forwarding entry.
lookup a bridge forwarding table entry.

LLADDR

the Ethernet MAC address.

dev DEV

the interface to which this address is associated.

brport DEV

the bridge port to which this address is associated. same as dev above.

br DEV

the bridge to which this address is associated.

self

- the address is associated with the port drivers fdb. Usually hardware.

master

- the address is associated with master devices fdb. Usually software (default).

## bridge mdb - multicast group database management
mdb objects contain known IP or L2 multicast group addresses on a link.

The corresponding commands display mdb entries, add new entries, and delete old ones.

### bridge mdb add - add a new multicast group database entry
This command creates a new mdb entry.

dev DEV

the interface where this group address is associated.

port PORT

the port whose link is known to have members of this multicast group.

grp GROUP

the multicast group address (IPv4, IPv6 or L2 multicast) whose members reside on the link connected to the port. permanent - the mdb entry is permanent. Optional for IPv4 and IPv6, mandatory for L2.

temp - the mdb entry is temporary (default)

src SOURCE

optional source IP address of a sender for this multicast group. If IGMPv3 for IPv4, or MLDv2 for IPv6 respectively, are enabled it will be included in the lookup when forwarding multicast traffic.

vid VID

the VLAN ID which is known to have members of this multicast group.

### bridge mdb delete - delete a multicast group database entry
This command removes an existing mdb entry.

The arguments are the same as with bridge mdb add.

### bridge mdb show - list multicast group database entries
This command displays the current multicast group membership table. The table is populated by IGMP and MLD snooping in the bridge driver automatically. It can be altered by bridge mdb add and bridge mdb del commands manually too.

dev DEV

the interface only whose entries should be listed. Default is to list all bridge interfaces.

With the -details option, the command becomes verbose. It prints out the ports known to have a connected router.

With the -statistics option, the command displays timer values for mdb and router port entries.

## bridge vlan - VLAN filter list
vlan objects contain known VLAN IDs for a link.

The corresponding commands display vlan filter entries, add new entries, and delete old ones.

### bridge vlan add - add a new vlan filter entry
This command creates a new vlan filter entry.

dev NAME

the interface with which this vlan is associated.

vid VID

the VLAN ID that identifies the vlan.

tunnel_info TUNNEL_ID

the TUNNEL ID that maps to this vlan. The tunnel id is set in dst_metadata for every packet that belongs to this vlan (applicable to bridge ports with vlan_tunnel flag set).

pvid

the vlan specified is to be considered a PVID at ingress. Any untagged frames will be assigned to this VLAN.

untagged

the vlan specified is to be treated as untagged on egress.

self

the vlan is configured on the specified physical device. Required if the device is the bridge device.

master

the vlan is configured on the software bridge (default).

### bridge vlan delete - delete a vlan filter entry
This command removes an existing vlan filter entry.

The arguments are the same as with bridge vlan add. The pvid and untagged flags are ignored.

### bridge vlan set - change vlan filter entry's options
This command changes vlan filter entry's options.

dev NAME

the interface with which this vlan is associated.

vid VID

the VLAN ID that identifies the vlan.

state STP_STATE

the operation state of the vlan. One may enter STP state name (case insensitive), or one of the numbers below. Negative inputs are ignored, and unrecognized names return an error. Note that the state is set only for the vlan of the specified device, e.g. if it is a bridge port then the state will be set only for the vlan of the port. 0 - vlan is in STP DISABLED state. Make this vlan completely inactive for STP. This is also called BPDU filter and could be used to disable STP on an untrusted vlan.

1 - vlan is in STP LISTENING state. Only valid if STP is enabled on the bridge. In this state the vlan listens for STP BPDUs and drops all other traffic frames.

2 - vlan is in STP LEARNING state. Only valid if STP is enabled on the bridge. In this state the vlan will accept traffic only for the purpose of updating MAC address tables.

3 - vlan is in STP FORWARDING state. This is the default vlan state.

4 - vlan is in STP BLOCKING state. Only valid if STP is enabled on the bridge. This state is used during the STP election process. In this state, the vlan will only process STP BPDUs.

### bridge vlan show - list vlan configuration.
This command displays the current VLAN filter table.

With the -details option, the command becomes verbose. It displays the per-vlan options.

With the -statistics option, the command displays per-vlan traffic statistics.

### bridge vlan tunnelshow - list vlan tunnel mapping.
This command displays the current vlan tunnel info mapping.

## bridge monitor - state monitoring
The bridge utility can monitor the state of devices and addresses continuously. This option has a slightly different format. Namely, the monitor command is the first in the command line and then the object list follows:

bridge monitor [ all | OBJECT-LIST ]

OBJECT-LIST is the list of object types that we want to monitor. It may contain link, fdb, vlan and mdb. If no file argument is given, bridge opens RTNETLINK, listens on it and dumps state changes in the format described in previous sections.

If a file name is given, it does not listen on RTNETLINK, but opens the file containing RTNETLINK messages saved in binary format and dumps them.

## NOTES
This command uses facilities added in Linux 3.0.

Although the forwarding table is maintained on a per-bridge device basis the bridge device is not part of the syntax. This is a limitation of the underlying netlink neighbour message protocol. When displaying the forwarding table, entries for all bridges are displayed. Add/delete/modify commands determine the underlying bridge device based on the bridge to which the corresponding ethernet device is attached.

## SEE ALSO
ip(8)

## BUGS
Please direct bugreports and patches to: <netdev@vger.kernel.org>

## AUTHOR
Original Manpage by Stephen Hemminger


dcb

title: dcb(8)

text:
# dcb(8)

## NAME
dcb - show / manipulate DCB (Data Center Bridging) settings

## SYNOPSIS

dcb [ OPTIONS ] { app | buffer | ets | maxrate | pfc } { COMMAND | help }

dcb [ -force ] -batch filename

dcb [ OPTIONS ] help

## OPTIONS
-n, --netns <NETNS>

switches dcb to the specified network namespace NETNS.

-V, --Version

Print the version of the dcb utility and exit.

-b, --batch <FILENAME>

Read commands from provided file or standard input and invoke them. First failure will cause termination of dcb.

-f, --force

Don't terminate dcb on errors in batch mode. If there were any errors during execution of the commands, the application return code will be non zero.

-i, --iec

When showing rates, use ISO/IEC 1024-based prefixes (Ki, Mi, Bi) instead of the 1000-based ones (K, M, B).

-j, --json

Generate JSON output.

-N, --Numeric

If the subtool in question translates numbers to symbolic names in some way, suppress this translation.

-p, --pretty

When combined with -j generate a pretty JSON output.

-s, --statistics

If the object in question contains any statistical counters, shown them as part of the "show" output.

## OBJECTS
app

- Configuration of application priority table

buffer

- Configuration of port buffers

ets

- Configuration of ETS (Enhanced Transmission Selection)

maxrate

- Configuration of per-TC maximum transmit rate

pfc

- Configuration of PFC (Priority-based Flow Control)

## COMMANDS
A COMMAND specifies the action to perform on the object. The set of possible actions depends on the object type. As a rule, it is possible to show objects and to invoke topical help, which prints a list of available commands and argument syntax conventions.

## ARRAY PARAMETERS
Like commands, specification of parameters is in the domain of individual objects (and their commands) as well. However, much of the DCB interface revolves around arrays of fixed size that specify one value per some key, such as per traffic class or per priority. There is therefore a single syntax for adjusting elements of these arrays. It consists of a series of KEY:VALUE pairs, where the meaning of the individual keys and values depends on the parameter.

The elements are evaluated in order from left to right, and the latter ones override the earlier ones. The elements that are not specified on the command line are queried from the kernel and their current value is retained.

As an example, take a made-up parameter tc-juju, which can be set to charm traffic in a given TC with either good luck or bad luck. KEY can therefore be 0..7 (as is usual for TC numbers in DCB), and VALUE either of none, good, and bad. An example of changing a juju value of TCs 0 and 7, while leaving all other intact, would then be:

\# dcb foo set dev eth0 tc-juju 0:good 7:bad

A special key, all, is recognized which sets the same value to all array elements. This can be combined with the usual single-element syntax. E.g. in the following, the juju of all keys is set to none, except 0 and 7, which have other values:

\# dcb foo set dev eth0 tc-juju all:none 0:good 7:bad

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
dcb-app(8), dcb-buffer(8), dcb-ets(8), dcb-maxrate(8), dcb-pfc(8)

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Petr Machata <me@pmachata.org>


dcb-app

title: dcb-app(8)

text:
# dcb-app(8)

## NAME
dcb-app - show / manipulate application priority table of the DCB (Data Center Bridging) subsystem

## SYNOPSIS

dcb [ OPTIONS ] app { COMMAND | help }

dcb app { show | flush } dev DEV [ default-prio ] [ ethtype-prio ] [ stream-port-prio ] [ dgram-port-prio ] [ port-prio ] [ dscp-prio ]

dcb ets { add | del | replace } dev DEV [ default-prio PRIO-LIST ] [ ethtype-prio ET-MAP ] [ stream-port-prio PORT-MAP ] [ dgram-port-prio PORT-MAP ] [ port-prio PORT-MAP ] [ dscp-prio DSCP-MAP ]

PRIO-LIST := [ PRIO-LIST ] PRIO

ET-MAP := [ ET-MAP ] ET-MAPPING

ET-MAPPING := ET:PRIO

PORT-MAP := [ PORT-MAP ] PORT-MAPPING

PORT-MAPPING := PORT:PRIO

DSCP-MAP := [ DSCP-MAP ] DSCP-MAPPING

DSCP-MAPPING := { DSCP | all }:PRIO

ET := { 0x600 .. 0xffff }

PORT := { 1 .. 65535 }

DSCP := { 0 .. 63 }

PRIO := { 0 .. 7 }

## DESCRIPTION
dcb app is used to configure APP table, or application priority table in the DCB (Data Center Bridging) subsystem. The APP table is used to assign priority to traffic based on value in one of several headers: EtherType, L4 destination port, or DSCP. It also allows configuration of port-default priority that is chosen if no other prioritization rule applies.

DCB APP entries are 3-tuples of selector, protocol ID, and priority. Selector is an enumeration that picks one of the prioritization namespaces. Currently it mostly corresponds to configurable parameters described below. Protocol ID is a value in the selector namespace. E.g. for EtherType selector, protocol IDs are the individual EtherTypes, for DSCP they are individual code points. The priority is the priority that should be assigned to traffic that matches the selector and protocol ID.

The APP table is a set of DCB APP entries. The only requirement is that duplicate entries are not added. Notably, it is valid to have conflicting priority assignment for the same selector and protocol ID. For example, the set of two APP entries (DSCP, 10, 1) and (DSCP, 10, 2), where packets with DSCP of 10 should get priority of both 1 and 2, form a well-defined APP table. The dcb app tool allows low-level management of the app table by adding and deleting individual APP 3-tuples through add and del commands. On the other other hand, the command replace does what one would typically want in this situation--first adds the new configuration, and then removes the obsolete one, so that only one prioritization is in effect for a given selector and protocol ID.

## COMMANDS
show

Display all entries with a given selector. When no selector is given, shows all APP table entries categorized per selector.

flush

Remove all entries with a given selector. When no selector is given, removes all APP table entries.

add

del

Add and, respectively, remove individual APP 3-tuples to and from the DCB APP table.

replace

Take the list of entries mentioned as parameter, and add those that are not present in the APP table yet. Then remove those entries, whose selector and protocol ID have been mentioned as parameter, but not with the exact same priority. This has the effect of, for the given selector and protocol ID, causing that the table only contains the priority (or priorities) given as parameter.

## PARAMETERS
The following table shows parameters in a way that they would be used with add, del and replace commands. For show and flush, the parameter name is to be used as a simple keyword without further arguments.

default-prio PRIO-LIST

The priority to be used for traffic the priority of which is otherwise unspecified. The argument is a list of individual priorities. Note that default-prio rules are configured as triplets (EtherType, 0, PRIO). dcb app translates these rules to the symbolic name default-prio and back.

ethtype-prio ET-MAP

ET-MAP uses the array parameter syntax, see dcb(8) for details. Keys are EtherType values. Values are priorities to be assigned to traffic with the matching EtherType.

stream-port-prio PORT-MAP

dgram-port-prio PORT-MAP

port-prio PORT-MAP

PORT-MAP uses the array parameter syntax, see dcb(8) for details. Keys are L4 destination port numbers that match on, respectively, TCP and SCTP traffic, UDP and DCCP traffic, and either of those. Values are priorities that should be assigned to matching traffic.

dscp-prio DSCP-MAP

DSCP-MAP uses the array parameter syntax, see dcb(8) for details. Keys are DSCP points, values are priorities assigned to traffic with matching DSCP. DSCP points can be written either direcly as numeric values, or using symbolic names specified in /etc/iproute2/rt_dsfield (however note that that file specifies full 8-bit dsfield values, whereas dcb app will only use the higher six bits). dcb app show will similarly format DSCP values as symbolic names if possible. The command line option -N turns the show translation off.

## EXAMPLE & USAGE
Prioritize traffic with DSCP 0 to priority 0, 24 to 3 and 48 to 6:

\# dcb app add dev eth0 dscp-prio 0:0 24:3 48:6

Add another rule to configure DSCP 24 to priority 2 and show the result:

\# dcb app add dev eth0 dscp-prio 24:2

\# dcb app show dev eth0 dscp-prio

dscp-prio 0:0 CS3:2 CS3:3 CS6:6

\# dcb -N app show dev eth0 dscp-prio

dscp-prio 0:0 24:2 24:3 48:6

Reconfigure the table so that the only rule for DSCP 24 is for assignment of priority 4:

\# dcb app replace dev eth0 dscp-prio 24:4

\# dcb app show dev eth0 dscp-prio

dscp-prio 0:0 24:4 48:6

Flush all DSCP rules:

\# dcb app flush dev eth0 dscp-prio

\# dcb app show dev eth0 dscp-prio

(nothing)

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
dcb(8)

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Petr Machata <me@pmachata.org>


dcb-buffer

title: dcb-buffer(8)

text:
# dcb-buffer(8)

## NAME
dcb-buffer - show / manipulate port buffer settings of the DCB (Data Center Bridging) subsystem

## SYNOPSIS

dcb [ OPTIONS ] buffer { COMMAND | help }

dcb buffer show dev DEV [ prio-buffer ] [ buffer-size ] [ total-size ]

dcb buffer set dev DEV [ prio-buffer PRIO-MAP ] [ buffer-size SIZE-MAP ]

PRIO-MAP := [ PRIO-MAP ] PRIO-MAPPING

PRIO-MAPPING := { PRIO | all }:BUFFER

SIZE-MAP := [ SIZE-MAP ] SIZE-MAPPING

SIZE-MAPPING := { BUFFER | all }:SIZE

PRIO := { 0 .. 7 }

BUFFER := { 0 .. 7 }

SIZE := { INTEGER | INTEGERK | INTEGERM | ... }

## DESCRIPTION
dcb buffer is used to configure assignment of traffic to port buffers based on traffic priority, and sizes of those buffers. It can be also used to inspect the current configuration, as well as total device memory that the port buffers take.

## PARAMETERS
For read-write parameters, the following describes only the write direction, i.e. as used with the set command. For the show command, the parameter name is to be used as a simple keyword without further arguments. This instructs the tool to show the value of a given parameter. When no parameters are given, the tool shows the complete buffer configuration.

total-size

A read-only property that shows the total device memory taken up by port buffers. This might be more than a simple sum of individual buffer sizes if there are any hidden or internal buffers.

prio-buffer PRIO-MAP

PRIO-MAP uses the array parameter syntax, see dcb(8) for details. Keys are priorities, values are buffer indices. For each priority sets a buffer where traffic with that priority is directed to.

buffer-size SIZE-MAP

SIZE-MAP uses the array parameter syntax, see dcb(8) for details. Keys are buffer indices, values are sizes of that buffer in bytes. The sizes can use the notation documented in section PARAMETERS at tc(8). Note that the size requested by the tool can be rounded or capped by the driver to satisfy the requirements of the device.

## EXAMPLE & USAGE
Configure the priomap in a one-to-one fashion:

\# dcb buffer set dev eth0 prio-buffer 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7

Set sizes of all buffers to 10KB, except for buffer 6, which will have the size 1MB:

\# dcb buffer set dev eth0 buffer-size all:10K 6:1M

Show what was set:

\# dcb buffer show dev eth0

prio-buffer 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7

buffer-size 0:10Kb 1:10Kb 2:10Kb 3:10Kb 4:10Kb 5:10Kb 6:1Mb 7:10Kb

total-size 1222Kb

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
dcb(8)

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Petr Machata <me@pmachata.org>


dcb-dcbx

title: dcb-dcbx(8)

text:
# dcb-dcbx(8)

## NAME
dcb-dcbx - show / manipulate port DCBX (Data Center Bridging eXchange)

## SYNOPSIS

dcb [ OPTIONS ] dcbx { COMMAND | help }

dcb dcbx show dev DEV

dcb dcbx set dev DEV [ host ] [ lld-managed ] [ cee ] [ ieee ] [ static ]

## DESCRIPTION
Data Center Bridging eXchange (DCBX) is a protocol used by DCB devices to exchange configuration information with directly connected peers. The Linux DCBX object is a 1-byte bitfield of flags that configure whether DCBX is implemented in the device or in the host, and which version of the protocol should be used. dcb dcbx is used to access the per-port Linux DCBX object.

There are two principal modes of operation: in host mode, DCBX protocol is implemented by the host LLDP agent, and the DCB interfaces are used to propagate the negotiate parameters to capable devices. In lld-managed mode, the configuration is handled by the device, and DCB interfaces are used for inspection of negotiated parameters, and can also be used to set initial parameters.

## PARAMETERS
When used with dcb dcbx set, the following keywords enable the corresponding configuration. The keywords that are not mentioned on the command line are considered disabled. When used with show, each enabled feature is shown by its corresponding keyword.

host

lld-managed

The device is in the host mode of operation and, respectively, the lld-managed mode of operation, as described above. In principle these two keywords are mutually exclusive, but dcb dcbx allows setting both and lets the driver handle it as appropriate.

cee

ieee

The device supports CEE (Converged Enhanced Ethernet) and, respecively, IEEE version of the DCB specification. Typically only one of these will be set, but dcb dcbx does not mandate this.

static

indicates the engine supports static configuration. No actual negotiation is performed, negotiated parameters are always the initial configuration.

## EXAMPLE & USAGE
Put the DCB engine into the "host" mode of operation, and use IEEE-standardized DCB interfaces:

\# dcb dcbx set dev eth0 host ieee

Show what was set:

\# dcb dcbx show dev eth0

host ieee

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
dcb(8)

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Petr Machata <me@pmachata.org>


dcb-ets

title: dcb-ets(8)

text:
# dcb-ets(8)

## NAME
dcb-ets - show / manipulate ETS (Enhanced Transmission Selection) settings of the DCB (Data Center Bridging) subsystem

## SYNOPSIS

dcb [ OPTIONS ] ets { COMMAND | help }

dcb ets show dev DEV [ willing ] [ ets-cap ] [ cbs ] [ tc-tsa ] [ reco-tc-tsa ] [ pg-bw ] [ tc-bw ] [ reco-tc-bw ] [ prio-tc ] [ reco-prio-tc ]

dcb ets set dev DEV [ willing { on | off } ] [ { tc-tsa | reco-tc-tsa } TSA-MAP ] [ { pg-bw | tc-bw | reco-tc-bw } BW-MAP ] [ { prio-tc | reco-prio-tc } PRIO-MAP ]

TSA-MAP := [ TSA-MAP ] TSA-MAPPING

TSA-MAPPING := { TC | all }:{ strict | cbs | ets | vendor }

BW-MAP := [ BW-MAP ] BW-MAPPING

BW-MAPPING := { TC | all }:INTEGER

PRIO-MAP := [ PRIO-MAP ] PRIO-MAPPING

PRIO-MAPPING := { PRIO | all }:TC

TC := { 0 .. 7 }

PRIO := { 0 .. 7 }

## DESCRIPTION
dcb ets is used to configure Enhanced Transmission Selection attributes through Linux DCB (Data Center Bridging) interface. ETS permits configuration of mapping of priorities to traffic classes, traffic selection algorithm to use per traffic class, bandwidth allocation, etc.

Two DCB TLVs are related to the ETS feature: a configuration and recommendation values. Recommendation values are named with a prefix reco-, while the configuration ones have plain names.

## PARAMETERS
For read-write parameters, the following describes only the write direction, i.e. as used with the set command. For the show command, the parameter name is to be used as a simple keyword without further arguments. This instructs the tool to show the value of a given parameter. When no parameters are given, the tool shows the complete ETS configuration.

ets-cap

A read-only property that shows the number of supported ETS traffic classes.

cbs

A read-only property that is enabled if the driver and the hardware support the CBS Transmission Selection Algorithm.

willing { on | off }

Whether local host should accept configuration from peer TLVs.

prio-tc PRIO-MAP

reco-prio-tc PRIO-MAP

PRIO-MAP uses the array parameter syntax, see dcb(8) for details. Keys are priorities, values are traffic classes. For each priority sets a TC where traffic with that priority is directed to.

tc-tsa TSA-MAP

reco-tc-tsa TSA-MAP

TSA-MAP uses the array parameter syntax, see dcb(8) for details. Keys are TCs, values are Transmission Selection Algorithm (TSA) keywords described below. For each TC sets an algorithm used for deciding how traffic queued up at this TC is scheduled for transmission. Supported TSAs are: strict - for strict priority, where traffic in higher-numbered TCs always takes precedence over traffic in lower-numbered TCs.

ets - for Enhanced Traffic Selection, where available bandwidth is distributed among the ETS-enabled TCs according to the weights set by tc-bw and reco-tc-bw, respectively.

cbs - for Credit Based Shaper, where traffic is scheduled in a strict manner up to the limit set by a shaper.

vendor - for vendor-specific traffic selection algorithm.

tc-bw BW-MAP

reco-tc-bw BW-MAP

BW-MAP uses the array parameter syntax, see dcb(8) for details. Keys are TCs, values are integers representing percent of available bandwidth given to the traffic class in question. The value should be 0 for TCs whose TSA is not ets, and the sum of all values shall be 100. As an exception to the standard wording, a configuration with no ets TCs is permitted to sum up to 0 instead.

pg-bw BW-MAP

The precise meaning of pg-bw is not standardized, but the assumption seems to be that the same scheduling process as on the transmit side is applicable on receive side as well, and configures receive bandwidth allocation for ets ingress traffic classes (priority groups).

## EXAMPLE & USAGE
Configure ETS priomap in a one-to-one fashion:

\# dcb ets set dev eth0 prio-tc 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7

Set TSA and transmit bandwidth configuration:

\# dcb ets set dev eth0 tc-tsa all:strict 0:ets 1:ets 2:ets \

tc-bw all:0 0:33 1:33 2:34

Show what was set:

\# dcb ets show dev eth0 prio-tc tc-tsa tc-bw

prio-tc 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7

tc-tsa 0:ets 1:ets 2:ets 3:strict 4:strict 5:strict 6:strict 7:strict

tc-bw 0:33 1:33 2:34 3:0 4:0 5:0 6:0 7:0

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
dcb(8)

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Petr Machata <me@pmachata.org>


dcb-maxrate

title: dcb-maxrate(8)

text:
# dcb-maxrate(8)

## NAME
dcb-maxrate - show / manipulate port maxrate settings of the DCB (Data Center Bridging) subsystem

## SYNOPSIS

dcb [ OPTIONS ] maxrate { COMMAND | help }

dcb maxrate show dev DEV [ tc-maxrate ]

dcb maxrate set dev DEV [ tc-maxrate RATE-MAP ]

RATE-MAP := [ RATE-MAP ] RATE-MAPPING

RATE-MAPPING := { TC | all }:RATE

TC := { 0 .. 7 }

RATE := { INTEGER[bit] | INTEGERKbit | INTEGERMib | ... }

## DESCRIPTION
dcb maxrate is used to configure and inspect maximum rate at which traffic is allowed to egress from a given traffic class.

## PARAMETERS
The following describes only the write direction, i.e. as used with the set command. For the show command, the parameter name is to be used as a simple keyword without further arguments. This instructs the tool to show the value of a given parameter. When no parameters are given, the tool shows the complete maxrate configuration.

tc-maxrate RATE-MAP

RATE-MAP uses the array parameter syntax, see dcb(8) for details. Keys are TC indices, values are traffic rates in bits per second. The rates can use the notation documented in section PARAMETERS at tc(8). Note that under that notation, "bit" stands for bits per second whereas "b" stands for bytes per second. When showing, the command line option -i toggles between using decadic and ISO/IEC prefixes.

## EXAMPLE & USAGE
Set rates of all traffic classes to 25Gbps, except for TC 6, which will have the rate of 100Gbps:

\# dcb maxrate set dev eth0 tc-maxrate all:25Gbit 6:100Gbit

Show what was set:

\# dcb maxrate show dev eth0

tc-maxrate 0:25Gbit 1:25Gbit 2:25Gbit 3:25Gbit 4:25Gbit 5:25Gbit 6:100Gbit 7:25Gbit

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
dcb(8)

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Petr Machata <me@pmachata.org>


dcb-pfc

title: dcb-pfc(8)

text:
# dcb-pfc(8)

## NAME
dcb-pfc - show / manipulate PFC (Priority-based Flow Control) settings of the DCB (Data Center Bridging) subsystem

## SYNOPSIS

dcb [ OPTIONS ] pfc { COMMAND | help }

dcb pfc show dev DEV [ pfc-cap ] [ prio-pfc ] [ macsec-bypass ] [ delay ] [ requests ] [ indications ]

dcb pfc set dev DEV [ prio-pfc PFC-MAP ] [ macsec-bypass { on | off } ] [ delay INTEGER ]

PFC-MAP := [ PFC-MAP ] PFC-MAPPING

PFC-MAPPING := { PRIO | all }:{ on | off }

PRIO := { 0 .. 7 }

## DESCRIPTION
dcb pfc is used to configure Priority-based Flow Control attributes through Linux DCB (Data Center Bridging) interface. PFC permits marking flows with a certain priority as lossless, and holds related configuration, as well as PFC counters.

## PARAMETERS
For read-write parameters, the following describes only the write direction, i.e. as used with the set command. For the show command, the parameter name is to be used as a simple keyword without further arguments. This instructs the tool to show the value of a given parameter. When no parameters are given, the tool shows the complete PFC configuration.

pfc-cap

A read-only property that shows the number of traffic classes that may simultaneously support PFC.

requests

A read-only count of the sent PFC frames per traffic class. Only shown when -s is given, or when requested explicitly.

indications

A read-only count of the received PFC frames per traffic class. Only shown when -s is given, or when requested explicitly.

macsec-bypass { on | off }

Whether the sending station is capable of bypassing MACsec processing when MACsec is disabled.

prio-pfc PFC-MAP

PFC-MAP uses the array parameter syntax, see dcb(8) for details. Keys are priorities, values are on / off indicators of whether PFC is enabled for a given priority.

delay INTEGER

The allowance made for round-trip propagation delay of the link in bits. The value shall be 0..65535.

## EXAMPLE & USAGE
Enable PFC on priorities 6 and 7, leaving the rest intact:

\# dcb pfc set dev eth0 prio-pfc 6:on 7:on

Disable PFC of all priorities except 6 and 7, and configure delay to 4096 bits:

\# dcb pfc set dev eth0 prio-pfc all:off 6:on 7:on delay 0x1000

Show what was set:

\# dcb pfc show dev eth0

pfc-cap 8 macsec-bypass off delay 4096

prio-pfc 0:off 1:off 2:off 3:off 4:off 5:off 6:on 7:on

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
dcb(8)

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Petr Machata <me@pmachata.org>


devlink

title: devlink(8)

summary: Devlink tool

text:
# devlink(8)

## NAME
devlink - Devlink tool

## SYNOPSIS

devlink [ OPTIONS ] { dev|port|monitor|sb|resource|region|health|trap } { COMMAND | help }

devlink [ -force ] -batch filename

## OPTIONS
-V, --Version

Print the version of the devlink utility and exit.

-b, -batch <FILENAME>

Read commands from provided file or standard input and invoke them. First failure will cause termination of devlink.

-force

Don't terminate devlink on errors in batch mode. If there were any errors during execution of the commands, the application return code will be non zero.

-n, --no-nice-names

Turn off printing out nice names, for example netdevice ifnames instead of devlink port identification.

-j, --json

Generate JSON output.

-p, --pretty

When combined with -j generate a pretty JSON output.

-v, --verbose

Turn on verbose output.

-s, --statistics

Output statistics.

-N, -Netns <NETNSNAME>

Switches to the specified network namespace.

### OBJECT
dev

- devlink device.

port

- devlink port.

monitor

- watch for netlink messages.

sb

- devlink shared buffer configuration.

resource

- devlink device resource configuration.

region

- devlink address region access

health

- devlink reporting and recovery

trap

- devlink trap configuration

### COMMAND
Specifies the action to perform on the object. The set of possible actions depends on the object type. As a rule, it is possible to show (or list ) objects, but some objects do not allow all of these operations or have some additional commands. The help command is available for all objects. It prints out a list of available commands and argument syntax conventions.

If no command is given, some default command is assumed. Usually it is list or, if the objects of this class cannot be listed, help.

## EXIT STATUS
Exit status is 0 if command was successful or a positive integer upon failure.

## SEE ALSO
devlink-dev(8), devlink-port(8), devlink-monitor(8), devlink-sb(8), devlink-resource(8), devlink-region(8), devlink-health(8), devlink-trap(8),

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Jiri Pirko <jiri@mellanox.com>


devlink-dev

title: devlink-dev(8)

summary: devlink device configuration

text:
# devlink-dev(8)

## NAME
devlink-dev - devlink device configuration

## SYNOPSIS

devlink [ OPTIONS ] dev { COMMAND | help }

OPTIONS := { -V[ersion] | -n[no-nice-names] }

devlink dev show [ DEV ]

devlink dev help

devlink dev eswitch set DEV [ mode { legacy | switchdev } ] [ inline-mode { none | link | network | transport } ] [ encap-mode { none | basic } ]

devlink dev eswitch show DEV

devlink dev param set DEV name PARAMETER value VALUE cmode { runtime | driverinit | permanent }

devlink dev param show [ DEV name PARAMETER ]

devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ]

devlink dev info [ DEV ]

devlink dev flash DEV file PATH [ target ID ]

## DESCRIPTION

### devlink dev show - display devlink device attributes
DEV - specifies the devlink device to show. If this argument is omitted all devices are listed.

Format is:

BUS_NAME/BUS_ADDRESS

### devlink dev eswitch set - sets devlink device eswitch attributes
mode { legacy | switchdev }

Set eswitch mode legacy - Legacy SRIOV

switchdev - SRIOV switchdev offloads

inline-mode { none | link | network | transport }

Some HWs need the VF driver to put part of the packet headers on the TX descriptor so the e-switch can do proper matching and steering. none - None

link - L2 mode

network - L3 mode

transport - L4 mode

encap-mode { none | basic }

Set eswitch encapsulation support none - Disable encapsulation support

basic - Enable encapsulation support

### devlink dev param set - set new value to devlink device configuration parameter
name PARAMETER

Specify parameter name to set.

value VALUE

New value to set.

cmode { runtime | driverinit | permanent }

Configuration mode in which the new value is set. runtime - Set new value while driver is running. This configuration mode doesn't require any reset to apply the new value.

driverinit - Set new value which will be applied during driver initialization. This configuration mode requires restart driver by devlink reload command to apply the new value.

permanent - New value is written to device's non-volatile memory. This configuration mode requires hard reset to apply the new value.

### devlink dev param show - display devlink device supported configuration parameters attributes
name PARAMETER Specify parameter name to show. If this argument is omitted all parameters supported by devlink devices are listed.

### devlink dev reload - perform hot reload of the driver.
DEV - Specifies the devlink device to reload.

netns { PID | NAME | ID } - Specifies the network namespace to reload into, either by pid, name or id.

action { driver_reinit | fw_activate } - Specifies the reload action required. If this argument is omitted driver_reinit action will be used. Note that even though user asks for a specific action, the driver implementation might require to perform another action alongside with it. For example, some driver do not support driver reinitialization being performed without fw activation. Therefore, the devlink reload command returns the list of actions which were actrually performed.

driver_reinit - Driver entities re-initialization, applying devlink-param and devlink-resource values.

fw_activate - Activates new firmware if such image is stored and pending activation. If no limitation specified this action may involve firmware reset. If no new image pending this action will reload current firmware image.

limit no_reset - Specifies limitation on reload action. If this argument is omitted limit is unspecificed and the reload action is not limited. In such case driver implementation may include reset or downtime as needed to perform the actions.

no_reset - No reset allowed, no down time allowed, no link flap and no configuration is lost.

### devlink dev info - display device information.
Display device information provided by the driver. This command can be used to query versions of the hardware components or device components which can't be updated ( fixed ) as well as device firmware which can be updated. For firmware components running displays the versions of firmware currently loaded into the device, while stored reports the versions in device's flash. Running and stored versions may differ after flash has been updated, but before reboot.

DEV - specifies the devlink device to show. If this argument is omitted all devices are listed.

### devlink dev flash - write device's non-volatile memory.
DEV - specifies the devlink device to write to.

file PATH - Path to the file which will be written into device's flash. The path needs to be relative to one of the directories searched by the kernel firmware loaded, such as /lib/firmware.

component NAME - If device stores multiple firmware images in non-volatile memory, this parameter may be used to indicate which firmware image should be written. The value of NAME should match the component names from devlink dev info and may be driver-dependent.

## EXAMPLES
devlink dev show

Shows the state of all devlink devices on the system.

devlink dev show pci/0000:01:00.0

Shows the state of specified devlink device.

devlink dev eswitch show pci/0000:01:00.0

Shows the eswitch mode of specified devlink device.

devlink dev eswitch set pci/0000:01:00.0 mode switchdev

Sets the eswitch mode of specified devlink device to switchdev.

devlink dev param show pci/0000:01:00.0 name max_macs

Shows the parameter max_macs attributes.

devlink dev param set pci/0000:01:00.0 name internal_error_reset value true cmode runtime

Sets the parameter internal_error_reset of specified devlink device to true.

devlink dev reload pci/0000:01:00.0

Performs hot reload of specified devlink device.

devlink dev flash pci/0000:01:00.0 file firmware.bin

Flashes the specified devlink device with provided firmware file name. If the driver supports it, user gets updates about the flash status. For example:

Preparing to flash

Flashing 100%

Flashing done

## SEE ALSO
devlink(8), devlink-port(8), devlink-sb(8), devlink-monitor(8),

## AUTHOR
Jiri Pirko <jiri@mellanox.com>


devlink-dpipe

title: devlink-dpipe(8)

text:
# devlink-dpipe(8)

## NAME
devlink-dpipe - devlink dataplane pipeline visualization

## SYNOPSIS

devlink [ OPTIONS ] dpipe { table | header } { COMMAND | help }

OPTIONS := { -V[ersion] }

devlink dpipe table show DEV [ name TABLE_NAME ]

devlink dpipe table set DEV name TABLE_NAME

devlink dpipe table dump DEV name TABLE_NAME

devlink dpipe header show DEV

devlink dpipe help

## DESCRIPTION

### devlink dpipe table show - display devlink dpipe table attributes
name TABLE_NAME

Specifies the table to operate on.

### devlink dpipe table set - set devlink dpipe table attributes
name TABLE_NAME

Specifies the table to operate on.

### devlink dpipe table dump - dump devlink dpipe table entries
name TABLE_NAME

Specifies the table to operate on.

### devlink dpipe header show - display devlink dpipe header attributes
name TABLE_NAME

Specifies the table to operate on.

## EXAMPLES
devlink dpipe table show pci/0000:01:00.0

Shows all dpipe tables on specified devlink device.

devlink dpipe table show pci/0000:01:00.0 name mlxsw_erif

Shows mlxsw_erif dpipe table on specified devlink device.

devlink dpipe table set pci/0000:01:00.0 name mlxsw_erif counters_enabled true

Turns on the counters on mlxsw_erif table.

devlink dpipe table dump pci/0000:01:00.0 name mlxsw_erif

Dumps content of mlxsw_erif table.

devlink dpipe header show pci/0000:01:00.0

Shows all dpipe headers on specified devlink device.

## SEE ALSO
devlink(8), devlink-dev(8), devlink-monitor(8),

## AUTHOR
Jiri Pirko <jiri@mellanox.com>


devlink-health

title: devlink-health(8)

summary: devlink health reporting and recovery

text:
# devlink-health(8)

## NAME
devlink-health - devlink health reporting and recovery

## SYNOPSIS

devlink [ OPTIONS ] health { COMMAND | help }

OPTIONS := { -V[ersion] }

devlink health show [ { DEV | DEV/PORT_INDEX } reporter REPORTER ]

devlink health recover { DEV | DEV/PORT_INDEX } reporter REPORTER

devlink health diagnose { DEV | DEV/PORT_INDEX } reporter REPORTER

devlink health dump show { DEV | DEV/PORT_INDEX } reporter REPORTER

devlink health test { DEV | DEV/PORT_INDEX } reporter REPORTER

devlink health dump clear { DEV | DEV/PORT_INDEX } reporter REPORTER

devlink health set { DEV | DEV/PORT_INDEX } reporter REPORTER [ grace_period MSEC ] [ auto_recover { true | false } ] [ auto_dump { true | false } ]

devlink health help

## DESCRIPTION

### devlink health show - Show status and configuration on all supported reporters.
Displays info about reporters registered on devlink devices and ports.

DEV - specifies the devlink device.

DEV/PORT_INDEX - specifies the devlink port.

REPORTER - specifies the reporter's name registered on specified devlink device or port.

### devlink health recover - Initiate a recovery operation on a reporter.
This action performs a recovery and increases the recoveries counter on success.

DEV - specifies the devlink device.

DEV/PORT_INDEX - specifies the devlink port.

REPORTER - specifies the reporter's name registered on specified devlink device or port.

### devlink health diagnose - Retrieve diagnostics data on a reporter.
DEV - specifies the devlink device.

DEV/PORT_INDEX - specifies the devlink port.

REPORTER - specifies the reporter's name registered on specified devlink device or port.

### devlink health test - Trigger a test event on a reporter.
DEV - specifies the devlink device.

REPORTER - specifies the reporter's name registered on the devlink device.

### devlink health dump show - Display the last saved dump.
devlink health saves a single dump per reporter. If an dump is

not already stored by the Devlink, this command will generate a new

dump. The dump can be generated either automatically when a

reporter reports on an error or manually at the user's request.

DEV - specifies the devlink device.

DEV/PORT_INDEX - specifies the devlink port.

REPORTER - specifies the reporter's name registered on specified devlink device or port.

### devlink health dump clear - Delete the saved dump.
Deleting the saved dump enables a generation of a new dump on

the next "devlink health dump show" command.

DEV - specifies the devlink device.

DEV/PORT_INDEX - specifies the devlink port.

REPORTER - specifies the reporter's name registered on specified devlink device or port.

### devlink health set - Configure health reporter.
Please note that some params are not supported on a reporter which doesn't support a recovery or dump method.

DEV - specifies the devlink device.

DEV/PORT_INDEX - specifies the devlink port.

REPORTER - specifies the reporter's name registered on specified devlink device or port.

grace_period MSEC

Time interval between consecutive auto recoveries.

auto_recover { true | false }

Indicates whether the devlink should execute automatic recover on error.

auto_dump { true | false }

Indicates whether the devlink should execute automatic dump on error.

## EXAMPLES
devlink health show

List status and configuration of available reporters on devices and ports.

devlink health show pci/0000:00:09.0/1 reporter tx

List status and configuration of tx reporter registered on port on pci/0000:00:09.0/1

devlink health recover pci/0000:00:09.0 reporter fw_fatal

Initiate recovery on fw_fatal reporter registered on device on pci/0000:00:09.0.

devlink health recover pci/0000:00:09.0/1 reporter tx

Initiate recovery on tx reporter registered on port on pci/0000:00:09.0/1.

devlink health diagnose pci/0000:00:09.0 reporter fw

List diagnostics data on the specified device and reporter.

devlink health dump show pci/0000:00:09.0/1 reporter tx

Display the last saved dump on the specified port and reporter.

devlink health dump clear pci/0000:00:09.0/1 reporter tx

Delete saved dump on the specified port and reporter.

devlink health set pci/0000:00:09.0 reporter fw_fatal grace_period 3500

Set time interval between auto recoveries to minimum of 3500 msec on the specified device and reporter.

devlink health set pci/0000:00:09.0/1 reporter tx grace_period 3500

Set time interval between auto recoveries to minimum of 3500 msec on the specified port and reporter.

devlink health set pci/0000:00:09.0 reporter fw_fatal auto_recover false

Turn off auto recovery on the specified device and reporter.

## SEE ALSO
devlink(8), devlink-dev(8), devlink-port(8), devlink-param(8), devlink-region(8),

## AUTHOR
Aya Levin <ayal@mellanox.com>


devlink-monitor

title: devlink-monitor(8)

summary: state monitoring

text:
# devlink-monitor(8)

## NAME
devlink-monitor - state monitoring

## SYNOPSIS

devlink monitor [ all | OBJECT-LIST ]

## DESCRIPTION
The devlink utility can monitor the state of devlink devices and ports continuously. This option has a slightly different format. Namely, the monitor command is the first in the command line and then the object list.

OBJECT-LIST is the list of object types that we want to monitor. It may contain dev, port, health, trap, trap-group, trap-policer.

devlink opens Devlink Netlink socket, listens on it and dumps state changes.

## SEE ALSO
devlink(8), devlink-dev(8), devlink-sb(8), devlink-port(8), devlink-health(8), devlink-trap(8),

## AUTHOR
Jiri Pirko <jiri@mellanox.com>


devlink-port

title: devlink-port(8)

summary: devlink port configuration

text:
# devlink-port(8)

## NAME
devlink-port - devlink port configuration

## SYNOPSIS

devlink [ OPTIONS ] port { COMMAND | help }

OPTIONS := { -V[ersion] | -n[no-nice-names] }

devlink port set DEV/PORT_INDEX [ type { eth | ib | auto } ]

devlink port split DEV/PORT_INDEX count COUNT

devlink port unsplit DEV/PORT_INDEX

devlink port show [ DEV/PORT_INDEX ]

devlink port health { show | recover | diagnose | dump | set }

devlink port add [ DEV | DEV/PORT_INDEX ] [ flavour FLAVOUR ] [ pcipf PFNUMBER ] { pcisf SFNUMBER }

devlink port del DEV/PORT_INDEX

devlink port function set DEV/PORT_INDEX { hw_addr ADDR } { state STATE }

devlink dev param set DEV/PORT_INDEX name PARAMETER value VALUE cmode { runtime | driverinit | permanent }

devlink dev param show [ DEV/PORT_INDEX name PARAMETER ]

devlink port help

## DESCRIPTION

### devlink port set - change devlink port attributes
DEV/PORT_INDEX - specifies the devlink port to operate on.

Format is:

BUS_NAME/BUS_ADDRESS/PORT_INDEX

type { eth | ib | auto }

set port type eth - Ethernet

ib - Infiniband

auto - autoselect

### devlink port split - split devlink port into more
DEV/PORT_INDEX - specifies the devlink port to operate on.

count COUNT

number of ports to split to.

### devlink port unsplit - unsplit previously split devlink port
Could be performed on any split port of the same split group.

DEV/PORT_INDEX - specifies the devlink port to operate on.

### devlink port show - display devlink port attributes
DEV/PORT_INDEX - specifies the devlink port to show. If this argument is omitted all ports are listed.

### devlink port health - devlink health reporting and recovery
Is an alias for devlink-health(8).

### devlink port add - add a devlink port
DEV - specifies the devlink device to operate on. or

DEV/PORT_INDEX - specifies the devlink port index to use for the requested new port. This is optional. When ommited, driver allocates unique port index.

flavour { pcipf | pcisf }

set port flavour pcipf - PCI PF port

pcisf - PCI SF port

pfnum { pfnumber }

Specifies PCI pfnumber to use on which a SF device to create

sfnum { sfnumber }

Specifies sfnumber to assign to the device of the SF. This field is optional for those devices which supports auto assignment of the SF number.

### devlink port function set - Set the port function attribute(s).
DEV/PORT_INDEX - specifies the devlink port to operate on.

hw_addr ADDR

- hardware address of the function to set. This is a Ethernet MAC address when port type is Ethernet.

state { active | inactive }

- new state of the function to change to. active - Once configuration of the function is done, activate the function.

inactive - To inactivate the function and its device(s), set to inactive.

### devlink port del - delete a devlink port
DEV/PORT_INDEX - specifies the devlink port to delete.

### devlink port param set - set new value to devlink port configuration parameter
DEV/PORT_INDEX - specifies the devlink port to operate on.

name PARAMETER

Specify parameter name to set.

value VALUE

New value to set.

cmode { runtime | driverinit | permanent }

Configuration mode in which the new value is set. runtime - Set new value while driver is running. This configuration mode doesn't require any reset to apply the new value.

driverinit - Set new value which will be applied during driver initialization. This configuration mode requires restart driver by devlink reload command to apply the new value.

permanent - New value is written to device's non-volatile memory. This configuration mode requires hard reset to apply the new value.

### devlink port param show - display devlink port supported configuration parameters attributes
DEV/PORT_INDEX - specifies the devlink port to operate on.

name PARAMETER Specify parameter name to show. If this argument, as well as port index, are omitted - all parameters supported by devlink device ports are listed.

## EXAMPLES
devlink port show

Shows the state of all devlink ports on the system.

devlink port show pci/0000:01:00.0/1

Shows the state of specified devlink port.

devlink port set pci/0000:01:00.0/1 type eth

Set type of specified devlink port to Ethernet.

devlink port split pci/0000:01:00.0/1 count 4

Split the specified devlink port into four ports.

devlink port unsplit pci/0000:01:00.0/1

Unplit the specified previously split devlink port.

devlink port health show

Shows status and configuration of all supported reporters registered on all devlink ports.

devlink port health show pci/0000:01:00.0/1 reporter tx

Shows status and configuration of tx reporter registered on pci/0000:01:00.0/1 devlink port.

devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88

Add a devlink port of flavour PCI SF on PCI PF having number 0 with SF number 88. To make use of the function an example sequence is to add a port, configure the function attribute and activate the function. Once function usage is completed, inactivate the function and finally delete the port. When there is desire to reuse the port without deletion, it can be reconfigured and activated again when function is in inactive state and function's operational state is detached.

devlink port del pci/0000:06:00.0/1

Delete previously created devlink port. It is recommended to first deactivate the function if the function supports state management.

devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33

Configure hardware address of the PCI function represented by devlink port. If the port supports change in function state, hardware address must be configured before activating the function.

devlink port function set pci/0000:01:00.0/1 state active

Activate the function. This will initiate the function enumeration and driver loading.

devlink port function set pci/0000:01:00.0/1 state inactive

Deactivate the function. This will initiate the function teardown which results in driver unload and device removal.

devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33 state active

Configure hardware address and also active the function. When a function is activated together with other configuration in a single command, all the configuration is applied first before changing the state to active.

devlink dev param show

Shows (dumps) all the port parameters across all the devices registered in the devlink.

devlink dev param set pci/0000:01:00.0/1 name internal_error_reset value true cmode runtime

Sets the parameter internal_error_reset of specified devlink port (#1) to true.

## SEE ALSO
devlink(8), devlink-dev(8), devlink-sb(8), devlink-monitor(8), devlink-health(8),

## AUTHOR
Jiri Pirko <jiri@mellanox.com>


devlink-region

title: devlink-region(8)

summary: devlink address region access

text:
# devlink-region(8)

## NAME
devlink-region - devlink address region access

## SYNOPSIS

devlink [ OPTIONS ] region { COMMAND | help }

OPTIONS := { -V[ersion] | -n[no-nice-names] }

devlink region show [ DEV/REGION ]

devlink region del DEV/REGION snapshot SNAPSHOT_ID

devlink region dump DEV/REGION snapshot SNAPSHOT_ID

devlink region read DEV/REGION [ snapshot SNAPSHOT_ID ] address ADDRESS length LENGTH

devlink region help

## DESCRIPTION

### devlink region show - Show all supported address regions names, snapshots and sizes
DEV/REGION - specifies the devlink device and address-region to query.

### devlink region del - Delete a snapshot specified by address-region name and snapshot ID
DEV/REGION - specifies the devlink device and address-region to delete the snapshot from

snapshot SNAPSHOT_ID - specifies the snapshot ID to delete

### devlink region dump - Dump all the available data from a region or from snapshot of a region
DEV/REGION - specifies the device and address-region to dump from.

snapshot SNAPSHOT_ID - specifies the snapshot-id of the region to dump.

### devlink region read - Read from a specific region address for a given length
DEV/REGION - specifies the device and address-region to read from.

snapshot SNAPSHOT_ID - specifies the snapshot-id of the region to read.

address ADDRESS - specifies the address to read from.

length LENGTH - specifies the length of data to read.

## EXAMPLES
devlink region show

List available address regions and snapshot.

devlink region del pci/0000:00:05.0/cr-space snapshot 1

Delete snapshot id 1 from cr-space address region from device pci/0000:00:05.0.

devlink region dump pci/0000:00:05.0/cr-space snapshot 1

Dump the snapshot taken from cr-space address region with ID 1

devlink region read pci/0000:00:05.0/cr-space snapshot 1 address 0x10 legth 16

Read from address 0x10, 16 Bytes of snapshot ID 1 taken from cr-space address region

## SEE ALSO
devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8),

## AUTHOR
Alex Vesker <valex@mellanox.com>


devlink-resource

title: devlink-resource(8)

summary: devlink device resource configuration

text:
# devlink-resource(8)

## NAME
devlink-resource - devlink device resource configuration

## SYNOPSIS

devlink [ OPTIONS ] resource { COMMAND | help }

OPTIONS := { -v[erbose] }

devlink resource show DEV

devlink resource help

devlink resource set DEV path RESOURCE_PATH size RESOURCE_SIZE

## DESCRIPTION

### devlink resource show - display devlink device's resosources
DEV - specifies the devlink device to show.

Format is:

BUS_NAME/BUS_ADDRESS

### devlink resource set - sets resource size of specific resource
DEV - specifies the devlink device.

path RESOURCE_PATH

Resource's path.

size RESOURCE_SIZE

The new resource's size.

## EXAMPLES
devlink resource show pci/0000:01:00.0

Shows the resources of the specified devlink device.

devlink resource set pci/0000:01:00.0 /kvd/linear 98304

Sets the size of the specified resource for the specified devlink device.

## SEE ALSO
devlink(8), devlink-port(8), devlink-sb(8), devlink-monitor(8),

## AUTHOR
Arkadi Sharshevsky <arkadis@mellanox.com>


devlink-sb

title: devlink-sb(8)

summary: devlink shared buffer configuration

text:
# devlink-sb(8)

## NAME
devlink-sb - devlink shared buffer configuration

## SYNOPSIS

devlink [ OPTIONS ] sb { COMMAND | help }

OPTIONS := { -V[ersion] | -n[no-nice-names] }

devlink sb show [ DEV [ sb SB_INDEX ] ]

devlink sb pool show [ DEV [ sb SB_INDEX ]

pool POOL_INDEX ]

devlink sb pool set DEV [ sb SB_INDEX ]

pool POOL_INDEX

size POOL_SIZE

thtype { static | dynamic }

devlink sb port pool show [ DEV/PORT_INDEX [ sb SB_INDEX ]

pool POOL_INDEX ]

devlink sb port pool set DEV/PORT_INDEX [ sb SB_INDEX ]

pool POOL_INDEX

th THRESHOLD

devlink sb tc bind show [ DEV/PORT_INDEX [ sb SB_INDEX ]

tc TC_INDEX

type { ingress | egress } ]

devlink sb tc bind set DEV/PORT_INDEX [ sb SB_INDEX ]

tc TC_INDEX

type { ingress | egress }

pool POOL_INDEX

th THRESHOLD

devlink sb occupancy show { DEV | DEV/PORT_INDEX } [ sb SB_INDEX ]

devlink sb occupancy snapshot DEV [ sb SB_INDEX ]

devlink sb occupancy clearmax DEV [ sb SB_INDEX ]

devlink sb help

## DESCRIPTION

### devlink sb show - display available shared buffers and their attributes
DEV - specifies the devlink device to show shared buffers. If this argument is omitted all shared buffers of all devices are listed.

SB_INDEX - specifies the shared buffer. If this argument is omitted shared buffer with index 0 is selected. Behaviour of this argument it the same for every command.

### devlink sb pool show - display available pools and their attributes
DEV - specifies the devlink device to show pools. If this argument is omitted all pools of all devices are listed.

Display available pools listing their type, size, thtype and cell_size. cell_size is the allocation granularity of memory within the shared buffer. Drivers may round up, round down or reject size passed to the set command if it is not multiple of cell_size.

### devlink sb pool set - set attributes of pool
DEV - specifies the devlink device to set pool.

size POOL_SIZE

size of the pool in Bytes.

thtype { static | dynamic }

pool threshold type. static - Threshold values for the pool will be passed in Bytes.

dynamic - Threshold values ("to_alpha") for the pool will be used to compute alpha parameter according to formula:

alpha = 2 ^ (to_alpha - 10)

The range of the passed value is between 0 to 20. The computed alpha is used to determine the maximum usage of the flow:

max_usage = alpha / (1 + alpha) * Free_Buffer

### devlink sb port pool show - display port-pool combinations and threshold for each
DEV/PORT_INDEX - specifies the devlink port.

pool POOL_INDEX

pool index.

### devlink sb port pool set - set port-pool threshold
DEV/PORT_INDEX - specifies the devlink port.

pool POOL_INDEX

pool index.

th THRESHOLD

threshold value. Type of the value is either Bytes or "to_alpha", depends on thtype set for the pool.

### devlink sb tc bind show - display port-TC to pool bindings and threshold for each
DEV/PORT_INDEX - specifies the devlink port.

tc TC_INDEX

index of either ingress or egress TC, usually in range 0 to 8 (depends on device).

type { ingress | egress }

TC type.

### devlink sb tc bind set - set port-TC to pool binding with specified threshold
DEV/PORT_INDEX - specifies the devlink port.

tc TC_INDEX

index of either ingress or egress TC, usually in range 0 to 8 (depends on device).

type { ingress | egress }

TC type.

pool POOL_INDEX

index of pool to bind this to.

th THRESHOLD

threshold value. Type of the value is either Bytes or "to_alpha", depends on thtype set for the pool.

### devlink sb occupancy show - display shared buffer occupancy values for device or port
This command is used to browse shared buffer occupancy values. Values are showed for every port-pool combination as well as for all port-TC combinations (with pool this port-TC is bound to). Format of value is:

current_value/max_value

Note that before showing values, one has to issue occupancy snapshot command first.

DEV - specifies the devlink device to show occupancy values for.

DEV/PORT_INDEX - specifies the devlink port to show occupancy values for.

### devlink sb occupancy snapshot - take occupancy snapshot of shared buffer for device
This command is used to take a snapshot of shared buffer occupancy values. After that, the values can be showed using occupancy show command.

DEV - specifies the devlink device to take occupancy snapshot on.

### devlink sb occupancy clearmax - clear occupancy watermarks of shared buffer for device
This command is used to reset maximal occupancy values reached for whole device. Note that before browsing reset values, one has to issue occupancy snapshot command.

DEV - specifies the devlink device to clear occupancy watermarks on.

## EXAMPLES
devlink sb show

List available share buffers.

devlink sb pool show

List available pools and their config.

devlink sb port pool show pci/0000:03:00.0/1 pool 0

Show port-pool setup for specified port and pool.

sudo devlink sb port pool set pci/0000:03:00.0/1 pool 0 th 15

Change threshold for port specified port and pool.

devlink sb tc bind show pci/0000:03:00.0/1 tc 0 type ingress

Show pool binding and threshold for specified port and TC.

sudo devlink sb tc bind set pci/0000:03:00.0/1 tc 0 type ingress pool 0 th 9

Set pool binding and threshold for specified port and TC.

sudo devlink sb occupancy snapshot pci/0000:03:00.0

Make a snapshot of occupancy of shared buffer for specified devlink device.

devlink sb occupancy show pci/0000:03:00.0/1

Show occupancy for specified port from the snapshot.

sudo devlink sb occupancy clearmax pci/0000:03:00.0

Clear watermarks for shared buffer of specified devlink device.

## SEE ALSO
devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8),

## AUTHOR
Jiri Pirko <jiri@mellanox.com>


devlink-trap

title: devlink-trap(8)

summary: devlink trap configuration

text:
# devlink-trap(8)

## NAME
devlink-trap - devlink trap configuration

## SYNOPSIS

devlink [ OPTIONS ] trap { COMMAND | help }

OPTIONS := { -v[erbose] | -s[tatistics] }

devlink trap show [ DEV trap TRAP ]

devlink trap set DEV trap TRAP [ action { trap | drop | mirror } ]

devlink trap group show [ DEV group GROUP ]

devlink trap group set DEV group GROUP [ action { trap | drop | mirror } ]

[ policer POLICER ] [ nopolicer ]

devlink trap policer set DEV policer POLICER [ rate RATE ] [ burst BURST ]

devlink trap help

## DESCRIPTION

### devlink trap show - display available packet traps and their attributes
DEV - specifies the devlink device from which to show packet traps. If this argument is omitted all packet traps of all devices are listed.

trap TRAP - specifies the packet trap. Only applicable if a devlink device is also specified.

### devlink trap set - set attributes of a packet trap
DEV - specifies the devlink device the packet trap belongs to.

trap TRAP - specifies the packet trap.

action { trap | drop | mirror }

packet trap action. trap - the sole copy of the packet is sent to the CPU.

drop - the packet is dropped by the underlying device and a copy is not sent to the CPU.

mirror - the packet is forwarded by the underlying device and a copy is sent to the CPU.

### devlink trap group show - display available packet trap groups and their attributes
DEV - specifies the devlink device from which to show packet trap groups. If this argument is omitted all packet trap groups of all devices are listed.

group GROUP - specifies the packet trap group. Only applicable if a devlink device is also specified.

### devlink trap group set - set attributes of a packet trap group
DEV - specifies the devlink device the packet trap group belongs to.

group GROUP - specifies the packet trap group.

action { trap | drop | mirror }

packet trap action. The action is set for all the packet traps member in the trap group. The actions of non-drop traps cannot be changed and are thus skipped.

policer POLICER

packet trap policer. The policer to bind to the packet trap group. A value of "0" will unbind the currently bound policer.

nopolicer

Unbind packet trap policer from the packet trap group.

### devlink trap policer set - set attributes of packet trap policer
DEV - specifies the devlink device the packet trap policer belongs to.

policer POLICER - specifies the packet trap policer.

rate RATE - packet trap policer rate in packets per second.

burst BURST - packet trap policer burst size in packets.

## EXAMPLES
devlink trap show

List available packet traps.

devlink trap group show

List available packet trap groups.

devlink -vs trap show pci/0000:01:00.0 trap source_mac_is_multicast

Show attributes and statistics of a specific packet trap.

devlink -s trap group show pci/0000:01:00.0 group l2_drops

Show attributes and statistics of a specific packet trap group.

devlink trap set pci/0000:01:00.0 trap source_mac_is_multicast action trap

Set the action of a specific packet trap to 'trap'.

devlink trap policer show

List available packet trap policers.

devlink -s trap policer show pci/0000:01:00.0 policer 1

Show attributes and statistics of a specific packet trap policer.

devlink trap policer set pci/0000:01:00.0 policer 1 rate 1000 burst 128

Set the rate and burst size of a specific packet trap policer.

## SEE ALSO
devlink(8), devlink-dev(8), devlink-monitor(8),

## AUTHOR
Ido Schimmel <idosch@mellanox.com>


genl

title: genl(8)

summary: generic netlink utility frontend

text:
# genl(8)

## NAME
genl - generic netlink utility frontend

## SYNOPSIS

genl [ -s[tatistics] ] [ -d[etails] ] [ -r[aw] ] OBJECT

genl { -V[ersion] | -h[elp] }

OBJECT := { ctrl CTRL_OPTS }

CTRL_OPTS := { help | list | monitor | get PARMS }

PARMS := { name NAME | id ID }

## DESCRIPTION
The genl utility provides a simple frontend to the generic netlink library. Although it's designed to support multiple OBJECTs, for now only the ctrl object is available, which is used to query the generic netlink controller.

### ctrl
The generic netlink controller can be queried in various ways:

help

This command just prints a help text for the ctrl object.

list

Show the registered netlink users.

monitor

Listen for generic netlink notifications.

get

Query the controller for a given user, identified either by name or id.

## OPTIONS
genl supports the following options.

-h, -help

Show summary of options.

-V, -Version

Show version of program.

-s, -stats, -statistics

Show object statistics.

-d, -details

Show object details.

-r, -raw

Dump raw output only.

## SEE ALSO
ip(8)

## AUTHOR
genl was written by Jamal Hadi Salim <hadi@cyberus.ca>.

This manual page was written by Petr Sabata <contyk@redhat.com>.


ifcfg

title: ifcfg(8)

text:
# ifcfg(8)

## NAME
ifcfg - simplistic script which replaces ifconfig IP management

## SYNOPSIS

ifcfg [ DEVICE [ :ALIAS: ] ] [ command ] ADDRESS [ LENGTH ] [ PEER ]

## DESCRIPTION
This manual page documents briefly the ifcfg command.

This is a simplistic script replacing one option of ifconfig , namely, IP address management. It not only adds addresses, but also carries out Duplicate Address Detection RFC-DHCP, sends unsolicited ARP to update the caches of other hosts sharing the interface, adds some control routes and restarts Router Discovery when it is necessary.

I strongly recommend using it instead of ifconfig both on hosts and on routers.

## IFCONFIG - COMMAND SYNTAX
DEVICE

- it may have alias, suffix, separated by colon.

command

- add, delete or stop.

address

- optionally followed by prefix length.

peer

- optional peer address for pointpoint interfaces.

## EXAMPLE

```

```

This function determines, whether this is router or host. It returns 0, if the host is apparently not router.

## SEE ALSO
ip(8)


ifstat

title: ifstat(8)

text:
# ifstat(8)

## NAME
ifstat - handy utility to read network interface statistics

## SYNOPSIS

ifstat [ OPTIONS ] [ INTERFACE_LIST ]

INTERFACE_LIST := INTERFACE_LIST | interface

## DESCRIPTION
ifstat neatly prints out network interface statistics. The utility keeps records of the previous data displayed in history files and by default only shows difference between the last and the current call. Location of the history files defaults to /tmp/.ifstat.u$UID but may be overridden with the IFSTAT_HISTORY environment variable. Similarly, the default location for xstat (extended stats) is /tmp/.<xstat name>_ifstat.u$UID.

## OPTIONS
-h, --help

Show summary of options.

-V, --version

Show version of program.

-a, --ignore

Ignore the history file.

-d, --scan=SECS

Sample statistics every SECS second.

-e, --errors

Show errors.

-n, --nooutput

Don't display any output. Update the history file only.

-r, --reset

Reset history.

-s, --noupdate

Don't update the history file.

-t, --interval=SECS

Report average over the last SECS seconds.

-z, --zeros

Show entries with zero activity.

-j, --json

Display results in JSON format

-p, --pretty

If combined with --json, pretty print the output.

-x, --extended=TYPE

Show extended stats of TYPE. Supported types are:

cpu_hits - Counts only packets that went via the CPU.

## ENVIRONMENT
IFSTAT_HISTORY

If set, it's value is interpreted as alternate history file path.

## SEE ALSO
ip(8)

## AUTHOR
ifstat was written by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.

This manual page was written by Petr Sabata <contyk@redhat.com>.


ip

title: ip(8)

text:
# ip(8)

## NAME
ip - show / manipulate routing, network devices, interfaces and tunnels

## SYNOPSIS

ip [ OPTIONS ] OBJECT { COMMAND | help }

ip [ -force ] -batch filename

OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm | netns | l2tp | tcp_metrics | token | macsec | vrf | mptcp }

OPTIONS := { -V[ersion] | -h[uman-readable] | -s[tatistics] | -d[etails] | -r[esolve] | -iec | -f[amily] { inet | inet6 | link } | -4 | -6 | -I | -D | -B | -0 | -l[oops] { maximum-addr-flush-attempts } | -o[neline] | -rc[vbuf] [size] | -t[imestamp] | -ts[hort] | -n[etns] name | -N[umeric] | -a[ll] | -c[olor] | -br[ief] | -j[son] | -p[retty] }

## OPTIONS
-V, -Version

Print the version of the ip utility and exit.

-h, -human, -human-readable

output statistics with human readable values followed by suffix.

-b, -batch <FILENAME>

Read commands from provided file or standard input and invoke them. First failure will cause termination of ip.

-force

Don't terminate ip on errors in batch mode. If there were any errors during execution of the commands, the application return code will be non zero.

-s, -stats, -statistics

Output more information. If the option appears twice or more, the amount of information increases. As a rule, the information is statistics or some time values.

-d, -details

Output more detailed information.

-l, -loops <COUNT>

Specify maximum number of loops the 'ip address flush' logic will attempt before giving up. The default is 10. Zero (0) means loop until all addresses are removed.

-f, -family <FAMILY>

Specifies the protocol family to use. The protocol family identifier can be one of inet, inet6, bridge, mpls or link. If this option is not present, the protocol family is guessed from other arguments. If the rest of the command line does not give enough information to guess the family, ip falls back to the default one, usually inet or any. link is a special family identifier meaning that no networking protocol is involved.

-4

shortcut for -family inet.

-6

shortcut for -family inet6.

-B

shortcut for -family bridge.

-M

shortcut for -family mpls.

-0

shortcut for -family link.

-o, -oneline

output each record on a single line, replacing line feeds with the '\' character. This is convenient when you want to count records with wc(1) or to grep(1) the output.

-r, -resolve

use the system's name resolver to print DNS names instead of host addresses.

-n, -netns <NETNS>

switches ip to the specified network namespace NETNS. Actually it just simplifies executing of: ip netns exec NETNS ip [ OPTIONS ] OBJECT { COMMAND | help }

to

ip -n[etns] NETNS [ OPTIONS ] OBJECT { COMMAND | help }

-N, -Numeric

Print the number of protocol, scope, dsfield, etc directly instead of converting it to human readable name.

-a, -all

executes specified command over all objects, it depends if command supports this option.

-c[color][={always|auto|never}

Configure color output. If parameter is omitted or always, color output is enabled regardless of stdout state. If parameter is auto, stdout is checked to be a terminal before enabling color output. If parameter is never, color output is disabled. If specified multiple times, the last one takes precedence. This flag is ignored if -json is also given. Used color palette can be influenced by COLORFGBG environment variable (see ENVIRONMENT).

-t, -timestamp

display current time when using monitor option.

-ts, -tshort

Like -timestamp, but use shorter format.

-rc, -rcvbuf<SIZE>

Set the netlink socket receive buffer size, defaults to 1MB.

-iec

print human readable rates in IEC units (e.g. 1Ki = 1024).

-br, -brief

Print only basic information in a tabular format for better readability. This option is currently only supported by ip addr show and ip link show commands.

-j, -json

Output results in JavaScript Object Notation (JSON).

-p, -pretty

The default JSON format is compact and more efficient to parse but hard for most users to read. This flag adds indentation for readability.

## IP - COMMAND SYNTAX

### OBJECT
address

- protocol (IP or IPv6) address on a device.

addrlabel

- label configuration for protocol address selection.

l2tp

- tunnel ethernet over IP (L2TPv3).

link

- network device.

maddress

- multicast address.

monitor

- watch for netlink messages.

mptcp

- manage MPTCP path manager.

mroute

- multicast routing cache entry.

mrule

- rule in multicast routing policy database.

neighbour

- manage ARP or NDISC cache entries.

netns

- manage network namespaces.

ntable

- manage the neighbor cache's operation.

route

- routing table entry.

rule

- rule in routing policy database.

tcp_metrics/tcpmetrics

- manage TCP Metrics

token

- manage tokenized interface identifiers.

tunnel

- tunnel over IP.

tuntap

- manage TUN/TAP devices.

vrf

- manage virtual routing and forwarding devices.

xfrm

- manage IPSec policies.

The names of all objects may be written in full or abbreviated form, for example address can be abbreviated as addr or just a.

### COMMAND
Specifies the action to perform on the object. The set of possible actions depends on the object type. As a rule, it is possible to add, delete and show (or list ) objects, but some objects do not allow all of these operations or have some additional commands. The help command is available for all objects. It prints out a list of available commands and argument syntax conventions.

If no command is given, some default command is assumed. Usually it is list or, if the objects of this class cannot be listed, help.

## ENVIRONMENT
COLORFGBG

If set, it's value is used for detection whether background is dark or light and use contrast colors for it. COLORFGBG environment variable usually contains either two or three values separated by semicolons; we want the last value in either case. If this value is 0-6 or 8, chose colors suitable for dark background:

COLORFGBG=";0" ip -c a

## EXIT STATUS
Exit status is 0 if command was successful, and 1 if there is a syntax error. If an error was reported by the kernel exit status is 2.

## EXAMPLES
ip addr

Shows addresses assigned to all network interfaces.

ip neigh

Shows the current neighbour table in kernel.

ip link set x up

Bring up interface x.

ip link set x down

Bring down interface x.

ip route

Show table routes.

## HISTORY
ip was written by Alexey N. Kuznetsov and added in Linux 2.2.

## SEE ALSO
ip-address(8), ip-addrlabel(8), ip-l2tp(8), ip-link(8), ip-maddress(8), ip-monitor(8), ip-mptcp(8), ip-mroute(8), ip-neighbour(8), ip-netns(8), ip-ntable(8), ip-route(8), ip-rule(8), ip-tcp_metrics(8), ip-token(8), ip-tunnel(8), ip-vrf(8), ip-xfrm(8)

IP Command reference ip-cref.ps

## REPORTING BUGS
Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. You do not have to be subscribed to the list to send a message there.

## AUTHOR
Original Manpage by Michail Litvak <mci@owl.openwall.com>