Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn-controller: Add a new thread in pinctrl module to handle packet-ins.
Prior to this patch, ovn-controller was single threaded and everytime the poll_block() at the end of the main while() loop wakes up, it processes the whole SB DB and translates the logical flows to OF flows. There are few issues with this - * For every packet-in received, ovn-controller does this translation resulting in unnecessary CPU cycles. * If the translation takes a lot of time, then the packet-in handling would get delayed. The delay in responses to DHCP requests could result in resending of these requests. This patch addresses these issues by creating a new pthread in pinctrl module to handle packet-ins. This thread doesn't access the Southbound DB IDL object. Since some of the OVN actions - like dns_lookup, arp, put_arp, put_nd require access to the Southbound DB contents and gARPs, periodic IPv6 RA generation also requires the DB access, pinctrl_run() called by the main ovn-controller thread accesses the Southbound DB IDL and builds the local datastructures. pinctrl_handler thread accesses these data structures in handling such requests. An ovs_mutex is used between the pinctr_run() and the pinctrl_handler thread to protect these data structures. Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
- Loading branch information