My idea is, in the beginning,' datapath' does not have any flow table. If it found a flow that it does not know, then it would pass the flow key and packet through netlink to 'dpif'. 'dpif' processes the packet, and also tells the datapath through netlink to expand its flow table about this flow. After that, packets would process by kernel.
Thus, I think datapath need to learn the flow information(flow key associate with actions) from dpif. But, right now, as my understanding about what you say, there should be some flowtable in the kernel(not datapath kernel module). I asked this kind of questions is because I want to develop a new tunnel protocol for openvswitch. Therefore, i want to know how user space maintains the flow table, I lost in this part. Maybe some of my understands above are wrong. Can you describe a big picture about flow table? I am deeply grateful. On 2012-4-7, at 上午6:28, Ben Pfaff wrote: > dpif-linux composes a request to query the kernel flow table, in the > form of a Netlink message, sends the message to the kernel, receives the > response also in the form of a Netlink message, translates that into the > format expected by the caller, and returns it. > > On Fri, Apr 06, 2012 at 10:58:10PM +0200, LIU Binghan wrote: >> Yes, I really try to read it , but there is not any code about hash table >> which likes in datapath. I think this function is used to process the >> request from datapath, and send back new flow information to expand the flow >> table in the datapath, right? so where is the information about flow tables >> in this function, i really confused. >> On 2012-4-5, at 下午4:46, Ben Pfaff wrote: >> >>> [add original poster] >>> >>> On Thu, Apr 05, 2012 at 07:45:15AM -0700, Ben Pfaff wrote: >>>> On Thu, Apr 05, 2012 at 02:32:55PM +0200, LIU Binghan wrote: >>>>> After datapath provided flow key to dpif-linux through netlink, how >>>>> dpif-linux queries the flow table? >>>>> More specificlly, how does the flow_get function get the 'reply' which >>>>> contains the action. I am getting stuck here. >>>> >>>> Why are you stuck? Why don't you keep reading into >>>> dpif_linux_flow_get__() and the functions it calls, and so on? What's >>>> the hard part? >>
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev