MLXDEVM-PORT(8)

NAME
mlxdevm-port - mlxdevm port configuration

SYNOPSIS

mlxdevm [ OPTIONS ] port { COMMAND | help }

OPTIONS := { -V[ersion] | -n[no-nice-names] }
mlxdevm port show [ DEV/PORT_INDEX ]
mlxdevm port add [ DEV | DEV/PORT_INDEX ] [ flavour FLAVOUR ] [ pcipf PFNUMBER ] { pcisf SFNUMBER } { controller CNUM }
mlxdevm port del DEV/PORT_INDEX
mlxdevm port function set DEV/PORT_INDEX { hw_addr ADDR } { state STATE }
mlxdevm port function cap set DEV/PORT_INDEX { roce TRUE/FALSE } { max_uc_macs VAL }
This command may change in the future
mlxdevm port function rate add DEV/GROUP_NAME
This command may change in the future
mlxdevm port function rate del DEV/GROUP_NAME
This command may change in the future
mlxdevm port function rate set [ DEV/GROUP_NAME | DEV/PORT_INDEX ] { tx_max TX_MAX } { tx_share TX_SHARE }
This command may change in the future
mlxdevm port function rate set DEV/PORT_INDEX { parent PARENT_GROUP_NAME }
This command may change in the future
mlxdevm port function rate set DEV/PORT_INDEX { noparent }
mlxdevm port function rate show [ DEV/GROUP_NAME | DEV/PORT_INDEX ]
This command may change in the future
mlxdevm port help

DESCRIPTION

  mlxdevm port show - display mlxdevm port attributes

DEV/PORT_INDEX - specifies the mlxdevm port to show. If this argument is omitted all ports are listed.

  mlxdevm port add - add a mlxdevm port

DEV - specifies the mlxdevm device to operate on.

DEV/PORT_INDEX - specifies the mlxdevm 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.

controller { controller }
    Specifies controller number for which the SF port is created. This field is optional. It is used only for those devices which supports external controller.

  mlxdevm port function set - Set the port function attribute(s).

DEV/PORT_INDEX - specifies the mlxdevm 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.

  mlxdevm port function cap set - Set the port function capabilities attribute(s).

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

roce { true | false }
    - new roce state of the function cap to change to.

max_uc_macs VAL
    - new maximum number of unicast mac addresses per function to change to.

  mlxdevm port del - delete a mlxdevm port

DEV/PORT_INDEX - specifies the mlxdevm port to delete.

  mlxdevm port function rate add - Add a QoS group.

DEV/GROUP_NAME - specifies group name in string format.

  mlxdevm port function rate del - Delete a QoS group.

DEV/GROUP_NAME - specifies group name in string format.

  mlxdevm port function rate set - Set tx_max and tx_share for QoS group or mlxdevm port.

DEV/GROUP_NAME - specifies the group name to operate on.

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

tx_max { TX_MAX }
    - tx_max bandwidth in Mbps.

tx_share { TX_SHARE }
    - tx_share bandwidth in Mbps.

  mlxdevm port function rate set - Assign mlxdevm port to a QoS group.

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

parent { PARENT_GROUP_NAME }
    - parent group name in string format.

  mlxdevm port function rate set - Ungroup a mlxdevm port.

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

noparent
    - ungroup the mlxdevm port.

  mlxdevm port function rate show - Display QoS information QoS group or mlxdevm port.

DEV/GROUP_NAME - specifies the group name to display.

DEV/PORT_INDEX - specifies the mlxdevm port to display.

If QoS group name or mlxdevm port is not specified, all QoS groups and mlxdevm ports are displayed.

EXAMPLES

mlxdevm port show
    Shows the state of all mlxdevm ports on the system.

mlxdevm port show pci/0000:01:00.0/1
    Shows the state of specified mlxdevm port.

mlxdevm port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88
    Add a mlxdevm 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.

mlxdevm port del pci/0000:06:00.0/1
    Delete previously created mlxdevm port. It is recommended to first deactivate the function if the function supports state management.

mlxdevm 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 mlxdevm port. If the port supports change in function state, hardware address must be configured before activating the function.

mlxdevm port function set pci/0000:01:00.0/1 state active
    Activate the function. This will initiate the function enumeration and driver loading.

mlxdevm 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.

mlxdevm 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.

mlxdevm port function cap set pci/0000:01:00.0/1 roce true
    Set the roce capability to enable.

mlxdevm port function cap set pci/0000:01:00.0/1 max_uc_macs 1
    Set the maximum number of unicast mac addresses to be 1 for this function.

mlxdevm port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 controller 1
    Add a mlxdevm port of flavour PCI SF on controller 1 which has PCI PF of 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 the 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.

mlxdevm port function rate add pci/0000:03:00.0/12_group
    Add a new QoS group named "12_group" under device "pci/0000:03:00.0".

mlxdevm port function rate del pci/0000:03:00.0/12_group
    Delete a QoS group named "12_group" under device "pci/0000:03:00.0".

mlxdevm port function rate set pci/0000:03:00.0/12_group tx_max 900
    Set tx_max 2000Mbps, tx_share 500Mbps for the "12_group" QoS group.

mlxdevm port function rate set pci/0000:03:00.0/229376 tx_max 2000 tx_share 500
    Set tx_max 2000Mbps, tx_share 500Mbps for this function.

mlxdevm port function rate set pci/0000:03:00.0/229376 parent 12_group
    Assign this function to the QoS group "12_group".

mlxdevm port function rate set pci/0000:03:00.0/229376 noparent
    Ungroup this function.

mlxdevm port function rate show
    Display the QoS info of all QoS groups and mlxdevm ports on the system. Output:
        pci/0000:03:00.0/12_group type node tx_max 1000 tx_share 200
        pci/0000:03:00.0/229376 type leaf tx_max 2000 tx_share 500 parent 12_group

mlxdevm port function rate show pci/0000:03:00.0/12_group
    Display QoS info of 12_group. Output:
        pci/0000:03:00.0/12_group type node tx_max 1000 tx_share 200

mlxdevm port function rate show pci/0000:03:00.0/229376
    Display QoS info of this mlxdevm port. Output:
        pci/0000:03:00.0/229376 type leaf tx_max 2000 tx_share 500 parent 12_group

SEE ALSO
mlxdevm(8), mlxdevm-dev(8),