forked from ovn-org/ovn
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace chassis mac with router port mac on destination chassis
During E-W routing for vlan backed networks, we replace router port mac with chassis mac, when packet leaves the source hypervisor. As a result, the destination VM (on remote hypervisor) will see chassis mac as source mac in received packet. Although, functionality wise this does not cause any issue, however chassis mac being see as source on VM, will lead to following: a. INCONSISTENT SOURCE MAC: If the destination VM moves to same hypervisor as sender, then it will see router port mac as source mac. Whereas, on a remote hypervisor, source mac will be the sender chassis mac. This will cause inconsistency in packet headers for the same flow and could be confusing for someone looking at packet captures inside the vm. b. SYSTEM MAC BEING EXPOSED TO VM: Chassis mac is a CMS provided mac, i.e it is an infrastructure mac. It is not a good practice to expose such values to VM, which should not be seeing them in first place. In order to replace chassis mac with router port mac, we will do following. a. Create conjunction for each chassis mac and router port vlan id combination. For example, for a 2 node chassis setup, where we have a logical router, connected to 4 logical switches with vlan ids: 2000, 1000, 0 and 24, the conjunction flow will look like following: cookie=0x0, duration=9094.608s, table=0, n_packets=0, n_bytes=0, idle_age=9094, priority=180,dl_src=aa:bb:cc:dd:ee:22 actions=conjunction(100,1/2) cookie=0x0, duration=9094.608s, table=0, n_packets=0, n_bytes=0, idle_age=9094, priority=180,dl_src=aa:bb:cc:dd:ff:ee actions=conjunction(100,1/2) cookie=0x0, duration=9094.552s, table=0, n_packets=0, n_bytes=0, idle_age=9094, priority=180,dl_vlan=2000 actions=conjunction(100,2/2) cookie=0x0, duration=9094.552s, table=0, n_packets=0, n_bytes=0, idle_age=9094, priority=180,dl_vlan=1000 actions=conjunction(100,2/2) cookie=0x0, duration=9094.552s, table=0, n_packets=0, n_bytes=0, idle_age=9094, priority=180,vlan_tci=0x0000/0x1fff actions=conjunction(100,2/2) cookie=0x0, duration=9094.552s, table=0, n_packets=0, n_bytes=0, idle_age=9094, priority=180,dl_vlan=24 actions=conjunction(100,2/2) b. Using this conjunction as match, we can identify if packet entering destination hypervisor was routed at the source or not. This will be done in table=0 (Physical to logical) at priority=180. For example: cookie=0x0, duration=9795.957s, table=0, n_packets=1391, n_bytes=141882, idle_age=8396, priority=180,conj_id=100,in_port=146,dl_vlan=1000 actions=.........,mod_dl_src:00:00:01:01:02:03,... c. We use conjunction, as it will ensure that we do not end up having lot of flows as we scale up. If we do not use conjunction, then we will have N (number of chassis macs) X M (number of router vlans) number of ovs flows. Conjunction converts it to N + M. Consider a setup, with 500 Chassis and 500 routed vlans. Without conjunction we will need 25000 (500 * 500) flows, whereas with conjunction that number comes down to 1000 (500 + 500). Signed-off-by: Ankur Sharma <ankur.sharma@nutanix.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
- Loading branch information
1 parent
0cb57d3
commit 35d93ef
Showing
7 changed files
with
243 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters