Hi all,

I want to add a new function in openvswitch so that some packets can always
be processed by userspace (ofproto) instead of the kernel (datapath).

To implement this, first we want to confirm our understanding of how the
openwswitch processes packets.

Currently we believe, there are three types of "rules": 1) classifier (lives
in userspace), which is the OpenFlow flow table (can contain wildcard
rules); 2)facet (also lives in userspace), which only has exact match
rules; 3) subfacet (lives in kernel), which only has exact match rules.

>From our understanding, when a switch receives a packet, the kernel space
will first look up the subfacets currently installed in the kernel. If no
match, the kernel will trigger an upcall sending the packet to userspace.
Then the userspace will first lookup the facet in handle_flow_miss() via
facet_lookup_valid(). If no match, userspace will lookup the classifier via
rule_dpif_lookup() and create a facet for the rule from the classifier.
After that, handle_flow_miss_with_facet() is called so that the packet is
handle by this facet. After the packet is handed to
handle_flow_miss_with_facet(), a subfacet will be created from the facet.

If there is any error in the above statement, please point that out, or any
explanation of the different types of rules would be greatly appreciated.

My question about the packet processing in openvswitch is:
How is the subfacet installed back to datapath? via which function call in
userspace?
How this packet is forwarded (processed) by userspace? and via which
function call?
This two questions confused me since I did not find the related function
calls in handle_flow_miss_with_facet().
In handle_flow_miss_with_facet(), struct dpif_execute is created, However,
it is never used in the function. I am wondering if this struct is related
to the packet processing, and if yes, how does ovs use this struct.

Thanks,
Xiaoye


-- 
Xiaoye (Steven) Sun, Ph.D. Student
Department of Electrical and Computer Engineering (ECE) & Department of
Computer Science (CS)
George R. Brown School of Engineering
Rice University, Houston, Texas, USA
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to