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...

Here are the reference code:
void ovs_dp_process_packet_with_key(...)
{
        ...(omit the original code)...
        /* Look up flow. */
        flow = ovs_flow_tbl_lookup_stats(&dp->table, pkt_key,
skb_get_hash(skb),
                                         &n_mask_hit);
        if (unlikely(!flow)) {
                ...(omit the original code)...

                *printk('flow entry is NOT found');*
                goto out;
        }

        ...(omit the original code)...
        *printk('flow entry is found');*

out:
        /* Update datapath statistics. */
       ...(omit the original code)...
}



Thanks a lot
Luc
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to