Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
northd: Split switch ports and router ports.
The hmap 'ports' includes both logical switch ports and logical router ports. Although most of the code handles these two different types of port differently, we always have to iterate through the whole hmap, and skip one type of ports in the loop. More importantly, this hides dependency from the interfaces - it is not clear from the function prototypes what are the real input, switch ports or router ports, or both. With this patch, it splits the two types of ports in different hmap tables, and all the related functions are refactored, most of them only accept one of the types. This helps for future incremental processing implementation. As a byproduct, it improves the performance slightly. Note: This patch didn't change the ovn_port data structure, which is used by both switch ports and router ports. It may be a followup improvement in the future if necessary, e.g. to reduce memory footprint. Signed-off-by: Han Zhou <hzhou@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
- Loading branch information