Bug 2013 - Vlan flows needs merging from traditional rules to a single L2Fwding Service

Patch set 2: Remove loogger in handleInterfaceUpdate.

Patch set 1:
Main problem is the vlan flows required two l2 tables, one for ingress and the other for egress. The existing flows made assumptions that those two tables existed. The pipeline changes reduced the l2 forwarding to a single table.

The classifier table has:
- unicast rules to take traffic from the local ports and tag them withthe tenant id
- ingress vlan rules to forward vlan tagged packets from the network
- drop everything else coming from the local ports

The l2 forwarding tables has:
- drop everything not matching the other rules
- unicast rules to forward traffic to the local port after stripping the tag
- broadcast rules to forward tagged packets to the network with the tag and to strip the tag and forward to the local ports
- catch all, forward vlan tagged packets to the network

The old rules looked like this:
Old rules:
1. table=0, in_port=2,dl_vlan=101 actions=goto_table:20
2. table=0, in_port=1,dl_src=fa:16:3e:9d:2e:27 actions=push_vlan:0x8100,set_field:101->vlan_vid,goto_table:10
3. table=0, priority=8192,in_port=1 actions=drop
4. table=0, dl_type=0x88cc actions=CONTROLLER:65535

5. table=10, priority=8192,dl_vlan=101 actions=output:2
6. table=10, priority=16384,dl_vlan=101,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=output:2,goto_table:20
7. table=10, dl_vlan=101,dl_dst=fa:16:3e:9d:2e:27 actions=goto_table:20

8. table=20, priority=8192,dl_vlan=101 actions=drop
9. table=20, priority=16384,dl_vlan=101,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=strip_vlan,output:1
10. table=20, dl_vlan=101,dl_dst=fa:16:3e:9d:2e:27 actions=strip_vlan,output:1

The new rules look like this.
1. table=0,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:85:80:97 actions=push_vlan:0x8100,set_field:6097->vlan_vid,goto_table:20
2. table=0,in_port=2,dl_vlan=2001 actions=goto_table:20
3. table=0,priority=8192,in_port=1 actions=drop
4. table=0,dl_type=0x88cc actions=CONTROLLER:65535

5. table=110,priority=0 actions=drop
6. table=110,dl_vlan=2001,dl_dst=fa:16:3e:85:80:97 actions=pop_vlan,output:1
7. table=110,priority=16384,dl_vlan=2001,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=output:2,pop_vlan,output:1,output:3,output:4
8. table=110,priority=8192,dl_vlan=2001 actions=output:2

In this example there is a router port and two vms on an openstack control node and a second compute node with two vms.

Compute + network node with two vlans and a vm in each vlan:
[odl@fedora41 devstack]$ sudo ovs-ofctl --protocol=OpenFlow13  dump-flows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=1594.264s, table=0, n_packets=29, n_bytes=2490, send_flow_rem in_port=4,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:7a:12:25 actions=push_vlan:0x8100,set_field:6097->vlan_vid,goto_table:20
cookie=0x0, duration=1678.603s, table=0, n_packets=20, n_bytes=1376, send_flow_rem in_port=1,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:85:80:97 actions=push_vlan:0x8100,set_field:6097->vlan_vid,goto_table:20
cookie=0x0, duration=1597.280s, table=0, n_packets=26, n_bytes=3220, send_flow_rem in_port=3,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:6e:d8:df actions=push_vlan:0x8100,set_field:6097->vlan_vid,goto_table:20
cookie=0x0, duration=95.810s, table=0, n_packets=21, n_bytes=2042, send_flow_rem in_port=7,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:13:e8:9b actions=push_vlan:0x8100,set_field:6098->vlan_vid,goto_table:20
cookie=0x0, duration=104.865s, table=0, n_packets=17, n_bytes=1138, send_flow_rem in_port=5,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:6e:fd:9b actions=push_vlan:0x8100,set_field:6098->vlan_vid,goto_table:20
cookie=0x0, duration=101.849s, table=0, n_packets=26, n_bytes=3220, send_flow_rem in_port=6,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:25:4a:26 actions=push_vlan:0x8100,set_field:6098->vlan_vid,goto_table:20
cookie=0x0, duration=102.857s, table=0, n_packets=19, n_bytes=1926, send_flow_rem in_port=2,dl_vlan=2002 actions=goto_table:20
cookie=0x0, duration=1676.601s, table=0, n_packets=26, n_bytes=2332, send_flow_rem in_port=2,dl_vlan=2001 actions=goto_table:20
cookie=0x0, duration=95.310s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=7 actions=drop
cookie=0x0, duration=1596.706s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=3 actions=drop
cookie=0x0, duration=101.339s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=6 actions=drop
cookie=0x0, duration=104.364s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=5 actions=drop
cookie=0x0, duration=1678.113s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=1 actions=drop
cookie=0x0, duration=1593.762s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=4 actions=drop
cookie=0x0, duration=1763.032s, table=0, n_packets=881, n_bytes=45681, send_flow_rem priority=0 actions=goto_table:20
cookie=0x0, duration=1763.868s, table=0, n_packets=0, n_bytes=0, send_flow_rem dl_type=0x88cc actions=CONTROLLER:65535
cookie=0x0, duration=1762.531s, table=20, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:30
cookie=0x0, duration=1762.026s, table=30, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:40
cookie=0x0, duration=1761.523s, table=40, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:50
cookie=0x0, duration=1761.019s, table=50, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:60
cookie=0x0, duration=1760.515s, table=60, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:70
cookie=0x0, duration=1760.011s, table=70, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:80
cookie=0x0, duration=1759.507s, table=80, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:90
cookie=0x0, duration=1759.003s, table=90, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:100
cookie=0x0, duration=1758.496s, table=100, n_packets=1065, n_bytes=63425, send_flow_rem priority=0 actions=goto_table:110
cookie=0x0, duration=1757.988s, table=110, n_packets=889, n_bytes=46261, send_flow_rem priority=0 actions=drop
cookie=0x0, duration=1593.258s, table=110, n_packets=22, n_bytes=2084, send_flow_rem dl_vlan=2001,dl_dst=fa:16:3e:7a:12:25 actions=pop_vlan,output:4
cookie=0x0, duration=1677.600s, table=110, n_packets=7, n_bytes=526, send_flow_rem dl_vlan=2001,dl_dst=fa:16:3e:85:80:97 actions=pop_vlan,output:1
cookie=0x0, duration=100.836s, table=110, n_packets=12, n_bytes=1024, send_flow_rem dl_vlan=2002,dl_dst=fa:16:3e:25:4a:26 actions=pop_vlan,output:6
cookie=0x0, duration=103.861s, table=110, n_packets=4, n_bytes=288, send_flow_rem dl_vlan=2002,dl_dst=fa:16:3e:6e:fd:9b actions=pop_vlan,output:5
cookie=0x0, duration=94.808s, table=110, n_packets=14, n_bytes=1616, send_flow_rem dl_vlan=2002,dl_dst=fa:16:3e:13:e8:9b actions=pop_vlan,output:7
cookie=0x0, duration=1596.275s, table=110, n_packets=12, n_bytes=1024, send_flow_rem dl_vlan=2001,dl_dst=fa:16:3e:6e:d8:df actions=pop_vlan,output:3
cookie=0x0, duration=102.354s, table=110, n_packets=30, n_bytes=3156, send_flow_rem priority=16384,dl_vlan=2002,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=output:2,pop_vlan,output:5,output:6,output:7
cookie=0x0, duration=1676.095s, table=110, n_packets=32, n_bytes=3332, send_flow_rem priority=16384,dl_vlan=2001,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=output:2,pop_vlan,output:1,output:3,output:4
cookie=0x0, duration=1677.102s, table=110, n_packets=24, n_bytes=2172, send_flow_rem priority=8192,dl_vlan=2001 actions=output:2
cookie=0x0, duration=103.359s, table=110, n_packets=19, n_bytes=1942, send_flow_rem priority=8192,dl_vlan=2002 actions=output:2

Compute node with two vlans and a vm in each vlan:
[odl@fedora42 devstack]$ sudo ovs-ofctl --protocol=OpenFlow13 dump-flows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=1406.878s, table=0, n_packets=21, n_bytes=2042, send_flow_rem in_port=1,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:6e:46:15 actions=push_vlan:0x8100,set_field:6097->vlan_vid,goto_table:20
cookie=0x0, duration=151.628s, table=0, n_packets=22, n_bytes=2365, send_flow_rem in_port=3,vlan_tci=0x0000/0x1fff,dl_src=fa:16:3e:d6:cc:a8 actions=push_vlan:0x8100,set_field:6098->vlan_vid,goto_table:20
cookie=0x0, duration=149.620s, table=0, n_packets=18, n_bytes=1924, send_flow_rem in_port=2,dl_vlan=2002 actions=goto_table:20
cookie=0x0, duration=1404.872s, table=0, n_packets=15, n_bytes=1682, send_flow_rem in_port=2,dl_vlan=2001 actions=goto_table:20
cookie=0x0, duration=151.128s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=3 actions=drop
cookie=0x0, duration=1406.379s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=8192,in_port=1 actions=drop
cookie=0x0, duration=1473.298s, table=0, n_packets=733, n_bytes=39306, send_flow_rem priority=0 actions=goto_table:20
cookie=0x0, duration=1474.295s, table=0, n_packets=0, n_bytes=0, send_flow_rem dl_type=0x88cc actions=CONTROLLER:65535
cookie=0x0, duration=1472.797s, table=20, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:30
cookie=0x0, duration=1472.286s, table=30, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:40
cookie=0x0, duration=1471.792s, table=40, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:50
cookie=0x0, duration=1471.291s, table=50, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:60
cookie=0x0, duration=1470.788s, table=60, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:70
cookie=0x0, duration=1470.286s, table=70, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:80
cookie=0x0, duration=1469.784s, table=80, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:90
cookie=0x0, duration=1469.282s, table=90, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:100
cookie=0x0, duration=1468.780s, table=100, n_packets=809, n_bytes=47319, send_flow_rem priority=0 actions=goto_table:110
cookie=0x0, duration=1468.278s, table=110, n_packets=736, n_bytes=39797, send_flow_rem priority=0 actions=drop
cookie=0x0, duration=1405.876s, table=110, n_packets=15, n_bytes=1682, send_flow_rem dl_vlan=2001,dl_dst=fa:16:3e:6e:46:15 actions=pop_vlan,output:1
cookie=0x0, duration=150.626s, table=110, n_packets=15, n_bytes=1682, send_flow_rem dl_vlan=2002,dl_dst=fa:16:3e:d6:cc:a8 actions=pop_vlan,output:3
cookie=0x0, duration=149.115s, table=110, n_packets=11, n_bytes=1256, send_flow_rem priority=16384,dl_vlan=2002,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=output:2,pop_vlan,output:3
cookie=0x0, duration=1404.370s, table=110, n_packets=11, n_bytes=1252, send_flow_rem priority=16384,dl_vlan=2001,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=output:2,pop_vlan,output:1
cookie=0x0, duration=1405.374s, table=110, n_packets=10, n_bytes=790, send_flow_rem priority=8192,dl_vlan=2001 actions=output:2
cookie=0x0, duration=150.122s, table=110, n_packets=11, n_bytes=860, send_flow_rem priority=8192,dl_vlan=2002 actions=output:2

Change-Id: I68d051d2b56a7dfc054ceb39996b013c8ae4fd74
Signed-off-by: Sam Hague <shague@redhat.com>
Merge "Bug 2013 - Vlan flows needs merging from traditional rules to a single L2Fwding Service"