On 15 May 2015 at 07:13, luc <mluc.2...@gmail.com> wrote:
> 2015-05-12 23:20 GMT+02:00 Joe Stringer <joestrin...@nicira.com>:
>>
>> 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.
>
>
>
> Hi,
>
> Very appreciate your hints..
>
> I searched around both in the code and also in Internet, and found one slide
> as attachment.. one thing I am still confused is that:
>
> from the slide, it says "decision about how to process packet is made in
> userspace", does it mean that whenever there is an incoming packet (no
> matter it is the first one in a flow or not), it always first goes to the
> user space ???
>
> ps, the ovs version I am using is 2.3.1.
>
> Thanks a lot for some info.

The slide also says in two different places that only the first packet
is required to make the decision, and that subsequent/following
packets are handled in the datapath.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to