Description of problem: In order to detect that the backend selected for load balanced traffic is actually the source of the traffic (i.e., hairpin) OVN currently creates 2 logical flows per VIP in table LS_IN_PRE_HAIRPIN. The flow match field looks like: Initiator traffic: (ip.src == backend-ip1 && ip.dst == backend-ip2) || .. || (ip.src == backend-ipn && ip.dst == backend-ipn) Reply traffic: ((ip.src == backend-ip1) || .. || (ip.src == backend-ipn)) && ip.dst = VIP This gets processed by ovn-controller and translated into 2 * N openflow entries. A better approach would be to create a new SB DB table, e.g., Hairpin_Endpoints with columns - datapath - dest_ip (VIP) - dest_port (VIP-port) - proto - sources (list of backend IPs & ports) ovn-northd would populate this table for all Load_Balancer VIPs (currently hairpin is supported only for logical switches but could be extended to logical routers too) and ovn-controller would generate the required openflow entries that perform hairpin detection.
Shipped in FDP 20.I