On 12 May 2015 at 11:59, luc <mluc.2...@gmail.com> wrote: > Hello team > > I am trying to work deeper into the code level of OVS. and what I would > like to do is the following: > > For the receiving packet, if there is no matching rule in the flow table > (i.e. packet is sent to user space and further sent to the sdn controller), > I would like to print out a message; otherwise, if there is matching rule, > print something else. > > So, in the code, I think datapath.c, ovs_dp_process_packet_with_key() does > the trick, the refered code is as following. Then, what I did is to send > periodically the same kind of packet to the OVS machine (all the tested > machines are built in VMs). > > However, I see that whenever I send my packet in a bit slow-speed (e.g. one > packet per 1 or 2 second), it always print out "flow entry is *NOT *found", > but indeed, I can really confirm by command line that the respective flow > entry (also by wireshark at sdn controller, there is no PktIn any more for > these packets); But, when I send my packet a bit faster, e.g. one packet > per 0.5 second, then, I'm able to get the expected output message "flow > entry is found". > > Can anyone help me to explain why does that happen? and I pretty much > appreciate if you can point me into the right direction...
ovs-vswitchd manages the kernel datapath flows based on a variety of factors including packet rate, so it's possible that at low packet rates the flow is evicted for some reason. Depending on the version of OVS, the logic of this differs, but you should be able to find it in ofproto/ofproto-dpif-upcall.c. You can also turn the 'dpif' logging up to debug level and observe flow adds/deletes in the ovs-vswitchd.log. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev