I'm new to OVS and I'm working on an OVS project, and i read a lot of documents about it but i didn't find anything that can make things clear to me about matching a packet and in userspace and datapath and if there is a match then what the ovs do ? Thank you.
Things happens in kernel module(datapath) are very fast compared to
First packet hits the kernel module, at very first time there will be no cache. It will send the packet to userspace, then the packet is routed. In this process, the kernel module make
hash cache of the header of packet.
So, the subsequent packet hits the kernel module, then OVS calculate the
hash for the header of the subsequent packet and checks whether that hash already present or not. If it is there, it will route or send it to userspace. Check this video and PPT
Packets received into OVS hit the datapath module first. If there is an entry in the flow cache, corresponding action is applied on the packet. If there is no entry, an "upcall" happens and the packet is sent to the user space over netlink protocol via the dpif interface. Actually there are queues present to buffer upcalls to the userspace where the handling is done.