Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

PicOS OVS supports goto_table on all platforms. When user dump-tables, tables 0 to 253 can be seen, but PicOS OVS only supports table 0. Also, flows will be merged as a flow to hardware when configuring flows with different tables.

Example 1. add flow entries with one goto action.

1) Add bridge

admin@PicOS-OVS$ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8

2) Add ports to br0  

admin@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/13 vlan_mode=trunk tag=1 -- set interface ge-1/1/13 type=pica8   
admin@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/15 vlan_mode=trunk tag=1 -- set interface ge-1/1/15 type=pica8 
admin@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/17 vlan_mode=trunk tag=1 -- set interface ge-1/1/17 type=pica8

3) Add flows with actions=goto_table:

admin@PicOS-OVS$ovs-ofctl add-flow br0 priority=200,in_port=13,actions=goto_table:1
admin@PicOS-OVS$ovs-ofctl add-flow br0 table=1,priority=101,in_port=13,ip,nw_src=10.10.10.11,actions=15

After adding flows, check software table and hardware table:

admin@PicOS-OVS$ovs-ofctl dump-flows br0
OFPST_FLOW reply (OF1.4) (xid=0x2):
 flow_id=10, cookie=0x0, duration=18.552s, table=0, n_packets=n/a, n_bytes=0, priority=200,in_port=13 actions=goto_table:1
 flow_id=11, cookie=0x0, duration=4.648s, table=1, n_packets=n/a, n_bytes=0, priority=101,ip,in_port=13,nw_src=10.10.10.11 actions=output:15
admin@PicOS-OVS$ovs-appctl pica/dump-flows
#3 normal permanent flow_id=10 priority=200,ip,in_port=13,nw_src=10.10.10.11, actions:15
#0 normal_d permanent flow_id=2 priority=0, actions:drop
Total 2 flows in HW.

From the example above, two flow entries were merged as one flow entry in the hardware table, and we only use table=0. The priority of flow entry in hardware is decided by flow in table=0.

 

Example 2. add flow entries with two goto action.

Add flows:

admin@PicOS-OVS$ovs-ofctl add-flow br0 priority=200,in_port=13,actions=goto_table:1
admin@PicOS-OVS$ovs-ofctl add-flow br0 table=1,priority=101,in_port=13,ip,nw_src=10.10.10.11,actions=15
admin@PicOS-OVS$ovs-ofctl add-flow br0 table=1,priority=102,ip,nw_src=10.10.10.12,actions=goto_table:2
admin@PicOS-OVS$ovs-ofctl add-flow br0 table=2,priority=123,dl_dst=00:11:22:33:44:55,actions=17
admin@PicOS-OVS$

After adding flows, check software table and hardware table:

admin@PicOS-OVS$ovs-ofctl dump-flows br0
OFPST_FLOW reply (OF1.4) (xid=0x2):
 flow_id=6, cookie=0x0, duration=43.530s, table=0, n_packets=n/a, n_bytes=0, priority=200,in_port=13 actions=goto_table:1
 flow_id=8, cookie=0x0, duration=15.120s, table=1, n_packets=n/a, n_bytes=0, priority=102,ip,nw_src=10.10.10.12 actions=goto_table:2
 flow_id=7, cookie=0x0, duration=25.110s, table=1, n_packets=n/a, n_bytes=0, priority=101,ip,in_port=13,nw_src=10.10.10.11 actions=output:15
 flow_id=9, cookie=0x0, duration=4.330s, table=2, n_packets=n/a, n_bytes=0, priority=123,dl_dst=00:11:22:33:44:55 actions=output:17
admin@PicOS-OVS$ovs-appctl pica/dump-flows
#0 normal_d permanent flow_id=2 priority=0, actions:drop
#1 normal permanent flow_id=6 priority=200,ip,in_port=13,nw_src=10.10.10.11, actions:15
#2 normal permanent flow_id=6 priority=201,ip,in_port=13,dl_dst=00:11:22:33:44:55,nw_src=10.10.10.12, actions:17
Total 3 flows in HW.
admin@PicOS-OVS$

This example shows that four flow entries in table0 and table1 have goto action, so these flows are merged as two flows in hardware.

 

  • No labels