Rate This Document
Findability
Accuracy
Completeness
Readability

OVS Command Description

Table 1 lists the OVS commands used for maintaining the status and functions of software offloading.

Table 1 OVS command description

Command

Function

ovs-appctl hwoff-flow-agent/add-protolist

Adds a protocol blacklist. Packets transmitted using the listed protocols are not offloaded.

ovs-appctl hwoff-flow-agent/add-rapid-protolist

Adds a protocol whitelist. Packets transmitted using the listed protocols are offloaded.

ovs-appctl hwoff-flow-agent/clear-error-stats

Clears the error statistics collected by hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/disable

Disables the flow table offloading function (software offloading).

ovs-appctl hwoff-flow-agent/dump-ct

Queries the connection tracking (CT) information recorded by hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/dump-policy

Queries parameters in the offloading policy of hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/dump-protolist

Queries the protocol blacklist that has been added to hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/dump-rapid-protolist

Queries the protocol whitelist that has been added to hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/enable

Enables the flow table offloading function (software offloading). This function is enabled by default.

ovs-appctl hwoff-flow-agent/error-stats

Queries the error statistics collected by hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/flush-flow

Clears information about hardware flow tables.

ovs-appctl hwoff-flow-agent/flush-protolist

Clears the protocol blacklist.

ovs-appctl hwoff-flow-agent/flush-rapid-protolist

Clears the protocol whitelist.

ovs-appctl hwoff-flow-agent/get-offloadrx-threshold

Obtains the threshold for automatically deleting cached flow tables.

ovs-appctl hwoff-flow-agent/live-time

Sets the aging time of flow tables offloaded to hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/policy

Configures policy parameters for flow table offloading.

ovs-appctl hwoff-flow-agent/print-flow

Prints flow table details in OVS logs during flow table offloading.

ovs-appctl hwoff-flow-agent/set-protolist-mode

Specifies the protocol list type (blacklist or whitelist) recorded by hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/stats

Lists non-error statistics collected by hwoff-flow-agent.

ovs-appctl hwoff-flow-agent/use-offloadrx-threshold

Sets the threshold for automatically deleting cached flow tables.

ovs-appctl hwoff/dump-hwoff-flows

Queries information about hardware flow tables.

ovs-appctl hwoff/shmap-dump-hw

Queries the unique flow IDs (UFIDs) of all hardware flow tables in the software-hardware flow table mapping maintained by the host; queries the UFID of the software flow table associated with the UFID of a specified hardware flow table.

ovs-appctl hwoff/shmap-dump-sw

Queries the UFIDs of all software flow tables associated with hardware flow tables in the software-hardware flow table mapping maintained by the host; queries the UFID of the hardware flow table associated with the UFID and type of a specified software flow table.

ovs-appctl hwoff/shmap-error-stats

Queries the error statistics of the software-hardware flow table mapping.

ovs-appctl hwoff/shmap-flush

Clears the software-hardware flow table mapping.

The following describes the commands in detail.

ovs-appctl hwoff-flow-agent/add-protolist

Syntax

ovs-appctl hwoff-flow-agent/add-protolist [PROTOLIST]

Function

Adds a protocol blacklist. Packets transmitted using the listed protocols are not offloaded.

Parameter Description

Parameter

Mandatory

Description

PROTOLIST

Yes

Protocol number list. The protocol number ranges from 0 to 255 or from 1536 to 65535, for example, 23, 25, or 1560.

Example

1
ovs-appctl hwoff-flow-agent/add-protolist 23,25,1560

ovs-appctl hwoff-flow-agent/add-rapid-protolist

Syntax

hwoff-flow-agent/add-rapid-protolist [PROTOLIST]

Function

Adds a protocol whitelist. Packets transmitted using the listed protocols are offloaded.

Parameter Description

Parameter

Mandatory

Description

PROTOLIST

Yes

Protocol number table. The protocol number can be 0, 1, 2, or 3 (0 indicates UDP, 1 indicates TCP, 2 indicates ICMP, and 3 indicates ICMPv6).

Example

1
ovs-appctl hwoff-flow-agent/add-rapid-protolist 0,1,2,3

ovs-appctl hwoff-flow-agent/clear-error-stats

Syntax

ovs-appctl hwoff-flow-agent/clear-error-stats

Function

Clears the error statistics collected by hwoff-flow-agent.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/clear-error-stats

ovs-appctl hwoff-flow-agent/disable

Syntax

ovs-appctl hwoff-flow-agent/disable

Function

Disables the flow table offloading function (software offloading).

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/disable

ovs-appctl hwoff-flow-agent/dump-ct

Syntax

ovs-appctl hwoff-flow-agent/dump-ct [-m] [1-1000]

Function

Queries the connection tracking information recorded by hwoff-flow-agent.

Parameter Description

Parameter

Mandatory

Description

-m

No

Views details of the connection tracking table.

[1-1000]

No

Specifies the displayed number of records in the connection tracking table.

Example

1
ovs-appctl hwoff-flow-agent/dump-ct -m 1

ovs-appctl hwoff-flow-agent/dump-policy

Syntax

ovs-appctl hwoff-flow-agent/dump-policy

Function

Queries parameters in the offloading policy of hwoff-flow-agent.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/dump-policy

ovs-appctl hwoff-flow-agent/dump-protolist

Syntax

ovs-appctl hwoff-flow-agent/dump-protolist

Function

Queries the protocol blacklist that has been added to hwoff-flow-agent.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/dump-protolist

ovs-appctl hwoff-flow-agent/dump-rapid-protolist

Syntax

ovs-appctl hwoff-flow-agent/dump-rapid-protolist

Function

Queries the protocol whitelist that has been added to hwoff-flow-agent.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/dump-rapid-protolist

ovs-appctl hwoff-flow-agent/enable

Syntax

ovs-appctl hwoff-flow-agent/enable

Function

Enables the flow table offloading function (software offloading). This function is enabled by default.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/enable

ovs-appctl hwoff-flow-agent/error-stats

Syntax

ovs-appctl hwoff-flow-agent/error-stats

Function

Queries the error statistics collected by hwoff-flow-agent.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/error-stats

ovs-appctl hwoff-flow-agent/flush-flow

Syntax

ovs-appctl hwoff-flow-agent/flush-flow

Function

Clears information about hardware flow tables.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/flush-flow

ovs-appctl hwoff-flow-agent/flush-protolist

Syntax

ovs-appctl hwoff-flow-agent/flush-protolist

Function

Clears the protocol blacklist.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/flush-protolist

ovs-appctl hwoff-flow-agent/flush-rapid-protolist

Syntax

ovs-appctl hwoff-flow-agent/flush-rapid-protolist

Function

Clears the protocol whitelist.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/flush-rapid-protolist

ovs-appctl hwoff-flow-agent/get-offloadrx-threshold

Syntax

ovs-appctl hwoff-flow-agent/get-offloadrx-threshold

Function

Obtains the threshold for automatically deleting cached flow tables.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/get-offloadrx-threshold

ovs-appctl hwoff-flow-agent/live-time

Syntax

ovs-appctl hwoff-flow-agent/live-time TIME

Function

Sets the aging time of flow tables offloaded to hwoff-flow-agent.

Parameter Description

Parameter

Mandatory

Description

TIME

Yes

Aging time, in ms. The value ranges from 1 to 86400000.

Example

1
ovs-appctl hwoff-flow-agent/live-time 200000

ovs-appctl hwoff-flow-agent/policy

Syntax

ovs-appctl hwoff-flow-agent/policy enable_permission <0|1> | user_default_permissions <0-10000000> | permission_update_interval <100-10000000 ms> | permission_credit <0-10000> offload_packet_num <0-10000000> | offload_delay_mode <0|1> | duration_before_offload <0-10000000 ms> | offload_pps <0-10000000> | garbage_clean_interval <100-10000000 ms> | garbage_max_life <10-10000000 ms> | enable_clean_window <0|1> | clean_pps <0-10000000> | clean_window_update_interval <100-10000000 ms> | limit_flow_nums <2000000-8000000> | user_idle_time <1-10000000>

Function

Configures policy parameters for flow table offloading.

Parameter Description

Parameter

Mandatory

Description

enable_permission

No

Indicates whether to enable offloading. The values are as follows:

0: disable

1: enable

user_default_permissions

No

Maximum number of offloaded table flows. The value ranges from 0 to 10000000.

permission_update_interval

No

Interval (in ms) for updating offloaded table flows. The value ranges from 100 to 10000000.

permission_credit

No

Maximum number of established connections. The value ranges from 0 to 10000. The value 0 indicates no limit.

offload_packet_num

No

Maximum number of packets before offloading. The value ranges from 0 to 10000000.

offload_delay_mode

No

Indicates whether to enable offloading delay. The values are as follows:

0: disable

1: enable

duration_before_offload

No

Offloading delay time, in ms. The value ranges from 0 to 10000000.

offload_pps

No

Offloading delay PPS (PPS is short for packet per second). Offloading occurs when the traffic reaches this value. The value ranges from 0 to 10000000.

garbage_clean_interval

No

Interval (in ms) for deleting garbage table flows. The value ranges from 100 to 10000000.

garbage_max_life

No

Maximum matching time (in ms) of table flows. If matching fails after this time, the table flows are deleted as garbage table flows. The value ranges from 10 to 10000000.

enable_clean_window

No

Threshold for deleting connection tracking status from the cache. The value ranges from 0 to 10000000. The value 0 indicates that the function is disabled.

clean_pps

No

Flow table replacement PPS. The old flow tables are replaced by new flow tables when the traffic reaches this value. The value ranges from 0 to 10000000.

clean_window_update_interval

No

Interval (in ms) for deleting connection tracking status from the cache. The value ranges from 100 to 10000000.

limit_flow_nums

No

Maximum number of flow tables generated after offloading. The value ranges from 2000000 to 8000000.

user_idle_time

No

Sets the connection tracking aging time (in second) for the hwoff-flow-agent offloading policy. The value ranges from 1 to 10000000.

Example

1
ovs-appctl hwoff-flow-agent/policy enable_permission 1

ovs-appctl hwoff-flow-agent/print-flow

Syntax

ovs-appctl hwoff-flow-agent/print-flow num

Function

Prints flow table details in OVS logs during flow table offloading.

Parameter Description

Parameter

Mandatory

Description

num

Yes

Prints the details of the Nth offloading. The value ranges from 0 to 15. The default value is 0, indicating that the details are not printed.

Example

1
ovs-appctl hwoff-flow-agent/print-flow 1

ovs-appctl hwoff-flow-agent/set-protolist-mode

Syntax

ovs-appctl hwoff-flow-agent/set-protolist-mode [black] | [white]

Function

Specifies the protocol list type (blacklist or whitelist) recorded by hwoff-flow-agent.

This parameter must be used together with ovs-appctl hwoff-flow-agent/add-protolist.

Parameter Description

Parameter

Mandatory

Description

black

No

Prohibits offloading of the packets transmitted using the listed protocols.

white

No

Allows offloading of the packets transmitted using the listed protocols.

Example

  • Configuring the protocol list
    1
    ovs-appctl  hwoff-flow-agent/add-protolist 23,25,1560
    
  • Prohibiting offloading of the packets transmitted using the listed protocols
    1
    ovs-appctl hwoff-flow-agent/set-protolist-mode black
    

ovs-appctl hwoff-flow-agent/stats

Syntax

ovs-appctl hwoff-flow-agent/stats

Function

Lists non-error statistics collected by hwoff-flow-agent.

Parameter Description

N/A

Example

1
ovs-appctl hwoff-flow-agent/stats

ovs-appctl hwoff-flow-agent/use-offloadrx-threshold

Syntax

ovs-appctl hwoff-flow-agent/use-offloadrx-threshold NUM

Function

Sets the threshold for automatically deleting cached flow tables.

Parameter Description

Parameter

Mandatory

Description

NUM

Yes

Threshold for automatically deleting cached flow tables. The value ranges from 1 to 512.

Example

1
ovs-appctl hwoff-flow-agent/use-offloadrx-threshold 256

ovs-appctl hwoff/dump-hwoff-flows

Syntax

hwoff/dump-hwoff-flows [-m]|[ufid ufid]|[check]|[stop]|[-f file]|[-n]|[-h]

Function

Queries information about hardware flow tables.

Parameter Description

Parameter

Mandatory

Description

ufid hw_ufid

No

Queries information about hardware flow tables based on UFIDs. (The UFID is in the hexadecimal format.)

-n

No

Displays the total number of hardware flow tables that have been offloaded.

-f file

No

(Recommended) Dumps flow tables to a specified file (the file path is an absolute path) when the number of flow tables exceeds 1000.

Before using this parameter, use the -n parameter to determine the total number of current hardware flow tables.

check

No

Queries the progress of dumping hardware flow tables to a file.

stop

No

Forcibly stops the operation of dumping flow tables to a file.

-h

No

Displays help information.

Example

  • Displaying the total number of hardware flow tables that have been offloaded
    1
    ovs-appctl hwoff/dump-hwoff-flows -n
    
  • Dumping information about hardware flow tables in command line mode (It is recommended that the number of flow tables be less than 1000.)
    1
    ovs-appctl hwoff/dump-hwoff-flows
    
    • Before running this command, run the ovs-appctl hwoff/dump-hwoff-flows -n command to check the total number of flow tables.
    • When the total number of flow tables exceeds 1000, run the ovs-appctl hwoff/dump-hwoff-flows -f Absolute path of a file command to dump the flow table information to a file. Otherwise, the command execution will be suspended for a long time. If this command is executed repeatedly, flow table information is repeatedly added to the file, and the file size keeps increasing. In this case, you need to manually clear the file.
    • The dumped hardware flow table information (the same as the information displayed by running the open-source dpctl/dump-flows command) contains the source IP address, destination IP address, source MAC address, destination MAC address, and quintuple information of the outbound interface.
  • Saving information about hardware flow tables to a specified file
    1
    ovs-appctl hwoff/dump-hwoff-flows -f /root/test.log
    
  • Querying information about hardware flow tables based on UFIDs
    1
    ovs-appctl hwoff/dump-hwoff-flows ufid 12345678-12345678
    
  • Querying the progress of dumping hardware flow tables to a file
    1
    ovs-appctl hwoff/dump-hwoff-flows check
    
  • Forcibly stopping the operation of dumping flow tables to a file
    1
    ovs-appctl hwoff/dump-hwoff-flows stop
    

ovs-appctl hwoff/shmap-dump-hw

Syntax

ovs-appctl hwoff/shmap-dump-hw [all | hw_ufid]

Function

Queries the UFIDs of all hardware flow tables in the software-hardware flow table mapping maintained by the host; queries the UFID of the software flow table associated with the UFID of a specified hardware flow table.

Parameter Description

Parameter

Mandatory

Description

all

No

Queries the UFIDs of all hardware flow tables in the software-hardware flow table mapping maintained by the host.

hw_ufid

No

Queries the UFID of the software flow table associated with the UFID of a specified hardware flow table.

The UFID of a hardware flow table is in the hexadecimal format.

Example

  • Querying the UFIDs of all hardware flow tables in the software-hardware flow table mapping maintained by the host
    1
    ovs-appctl hwoff/shmap-dump-hw all
    
  • Querying the UFID of the software flow table associated with the UFID of a specified hardware flow table
    1
    ovs-appctl hwoff/shmap-dump-hw 69e285a3-78f2-4029-9350-82d03e02564f
    

ovs-appctl hwoff/shmap-dump-sw

Syntax

ovs-appctl hwoff/shmap-dump-sw [all |sw_ufid type ]

Function

Queries the UFIDs of all software flow tables associated with hardware flow tables in the software-hardware flow table mapping maintained by the host; queries the UFID of the hardware flow table associated with the UFID and type of a specified software flow table.

Parameter Description

Parameter

Mandatory

Description

all

No

Queries the UFIDs of all software flow tables associated with hardware flow tables in the software-hardware flow table mapping maintained by the host.

sw_ufid, type

No

Queries the UFID of the hardware flow table associated with the UFID and type of a specified software flow table.

The UFID of a software flow table is in the hexadecimal format.

The options of type are as follows:

0: OpenFlow data plane

1: source IP address-based transparent transmission

Example

  • Querying the UFIDs of all software flow tables associated with hardware flow tables in the software-hardware flow table mapping maintained by the host
    1
    ovs-appctl hwoff/shmap-dump-sw all
    
  • Querying the UFID of the hardware flow table associated with the UFID and type of a specified software flow table
    1
    ovs-appctl hwoff/shmap-dump-sw e8288d3b-5daa-4815-8b23-2be16662977a 0
    

ovs-appctl hwoff/shmap-error-stats

Syntax

ovs-appctl hwoff/shmap-error-stats

Function

Queries the error statistics of the software-hardware flow table mapping.

Parameter Description

N/A

Example

1
ovs-appctl hwoff/shmap-error-stats

ovs-appctl hwoff/shmap-flush

Syntax

ovs-appctl hwoff/shmap-flush

Function

Clears the software-hardware flow table mapping.

Parameter Description

N/A

Example

1
ovs-appctl hwoff/shmap-flush