Match-mode Command
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"
  ipv4_quintuple:   "in_port,dl_vlan,nw_src,nw_dst,tp_src,tp_dst,nw_proto,dl_type=0x0800"Â
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.
Example:
Configure match-mode mac priority from 200 to 499; ip priority 500-999; arp_tpa priority 1000-2000.
root@PicOS-OVS$ovs-vsctl set-match-mode mac=10-1000,ip=2000-20000,arp_tpa=30000-40000,ipv6_full=50000-50001,ipv6_dst=50002-50003,ipv6_src=50004-60000,ipv4_quintuple=60001-65535
Remove match-mode configuration.
root@PicOS-OVS$ ovs-vsctl set-match-mode [default]
ovs-vsctl show-match-mode
Print current match-mode.
Example:
admin@PicOS-OVS$ovs-vsctl show-match-modecurrent match modes: ipv4_quintuple: priorities={60001-65535} fields={in_port,dl_vlan,nw_src,nw_dst,tp_src,tp_dst,nw_proto,dl_type=0x0800} ipv6_src: priorities={50004-60000} fields={in_port,dl_src,dl_dst,dl_vlan,ipv6_src,nw_proto,dl_type=0x86dd} ipv6_dst: priorities={50002-50003} fields={in_port,dl_src,dl_dst,dl_vlan,ipv6_dst,nw_proto,dl_type=0x86dd} ipv6_full: priorities={50000-50001} fields={in_port,dl_vlan,ipv6_src,ipv6_dst,tp_src,tp_dst,nw_proto,dl_type=0x86dd} arp_tpa(both): priorities={30000-40000} fields={in_port,arp_tpa,dl_type=0x0806} mac: priorities={10-1000} fields={in_port,dl_src,dl_dst,dl_vlan,dl_type} ip: priorities={2000-20000} fields={in_port,nw_proto,nw_src,nw_dst,tp_src,tp_dst,dl_type=0x0800}
Copyright © 2024 Pica8 Inc. All Rights Reserved.