Explore ovn-controller having the separate thread for pushing the flows to the switch. When the switch has pending packets for processing, ovn-controller will skip the engine to avoid generating the flows and instead retriggers forced computes for the next engine runs, which will regenerate all logical and physical flows. Explore if we can avoid this i.e let engine not consider pending packets in the switch and continue with the flow generation and ofctrl then should take care of pushing those flows when the switch is not processing packets.
I tried this approach https://github.com/venkataanil/ovn/tree/thread i.e splitting ovn-controller into two threads (similar to produce consumer approach) 1) main thread will continue with generating flows 2) new thread will push these flows to the switch when there are no pending packets but I don't see much performance improvement as scheduling this new thread by kernel when it gets new flows also consumes some time.
Enhanced the thread approach here https://github.com/venkataanil/ovn/tree/p10_thread Now trying the below approach Want to avoid thread and instead define the msgs as static so that they will be avialable across engine runs. engine will keep on generating messages according to flow changes without checking if the switch has pending packets. ofctrl put will avoid pushing the packets to switch when it has pending packets and will send them during next engine run. https://github.com/venkataanil/ovn/tree/ofctrl_put_delay