ovs-vsctl [--OPTION] set-match-mode <mode:options=priority> [mode:options=priority]
By default, 2 TCAM entries are used to support all matching tuples for all flows, even if the flow does not use all matching tuples. To optimize the TCAM usage, PicOS-2.1 allows user to configure the switch in short flow TCAM match mode, in which, each flow will only consume 1 TCAM entry. To use this feature, the flow must use the exact fields described below and cannot mix fields from various modes:
When this mode is enabled (with the set-match-mode command), only specific fields can be used in the priority range defined by the command.
From PicOS2.9.0,add a new group( ipv4_quintuple group) for tomahawk platform besides the normal match mode groups supported by other platforms.
The flows must use the exact fields described below:
mac mode: "in_port,dl_src,dl_dst,dl_vlan,dl_type"
ip mode: "in_port,nw_proto,nw_src,nw_dst,tp_src,tp_dst,dl_type=0x0800"
arp_tpa mode: "in_port, arp_tpa, dl_type=0x0806"
ipv6_full mode: "in_port,dl_vlan,ipv6_src,ipv6_dst,tp_src,tp_dst,nw_proto,dl_type=0x86dd"
ipv6_src mode: "in_port,dl_src,dl_dst,dl_vlan,ipv6_src,nw_proto,dl_type=0x86dd"
ipv6_dst mode: "in_port,dl_src,dl_dst,dl_vlan,ipv6_dst,nw_proto,dl_type=0x86dd"
For example, if mac mode is enabled, all the flows must only use one or more fields defined in the mac mode. If mac and ip modes are enabled, then you can configure either mac flows or ip flows based on the fields described above. However, you cannot mix the fields from mac and ip (that is, dl_src and nw_src)
Each mode is configured with a priority range that determines the flow priority. The flow priority must be specified when user configures the flow through ovs commands or controller.
If user does not want match-mode, configure match-mode as default. The default value is default.
Configure match-mode mac priority from 200 to 499; ip priority 500-999; arp_tpa priority 1000-2000.
Remove match-mode configuration.
Print current match-mode.