No subject


Sat Oct 12 03:57:18 UTC 2013


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

--047d7bf0e7c88e2d3904ea610fc2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div style=3D"font-family:arial,sans-serif;font-size:13px"=
><font face=3D"arial, sans-serif">Hi all,</font><div><br></div><div><font f=
ace=3D"arial, sans-serif">I want to add a new function in openvswitch so th=
at some packets can always be processed by userspace (</font><font face=3D"=
courier new, monospace">ofproto</font><font face=3D"arial, sans-serif">)=A0=
</font>i<font face=3D"arial, sans-serif">nstead of the kernel (</font><font=
 face=3D"courier new, monospace">datapath</font><font face=3D"arial, sans-s=
erif">)</font>.</div>
<div><font face=3D"courier new, monospace"><br></font></div><div>To impleme=
nt this, first we want to confirm our understanding of how the openwswitch =
processes packets.<br></div><div><br></div></div><div style=3D"font-family:=
arial,sans-serif;font-size:13px">
Currently we believe, there are three types of &quot;rules&quot;: 1)=A0<fon=
t face=3D"courier new, monospace">classifier</font><font face=3D"arial, san=
s-serif">=A0(lives in userspace), which is the OpenFlow flow table (can con=
tain wildcard rules); 2)</font><font face=3D"courier new, monospace">facet<=
/font><font face=3D"arial, sans-serif">=A0(also lives in userspace), which =
only has exact match rules; 3)=A0</font><font face=3D"courier new, monospac=
e">subfacet</font><font face=3D"arial, sans-serif">=A0(lives in kernel), wh=
ich only has exact match rules.=A0</font></div>
<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"font-si=
ze:13px"><font face=3D"arial, sans-serif">From our understanding, when a sw=
itch receives a packet, the kernel space will first look up the=A0</font><f=
ont face=3D"courier new, monospace">subfacet</font><font face=3D"arial, hel=
vetica, sans-serif">s cur</font><font face=3D"arial, sans-serif">rently ins=
talled in the kernel. If no match, the kernel will trigger an upcall sendin=
g the packet to userspace. Then the userspace will first lookup the=A0</fon=
t><font face=3D"courier new, monospace">facet</font><font face=3D"arial, sa=
ns-serif">=A0in=A0</font><font face=3D"courier new, monospace">handle_flow_=
miss()</font><font face=3D"arial, sans-serif">=A0via</font><font face=3D"co=
urier new, monospace">facet_lookup_valid()</font><font face=3D"arial, sans-=
serif">. If no match, userspace will lookup the=A0</font><font face=3D"cour=
ier new, monospace">classifier</font><font face=3D"arial, sans-serif">=A0vi=
a=A0</font><font face=3D"courier new, monospace">rule_dpif_lookup()</font><=
font face=3D"arial, sans-serif">=A0and create a=A0</font><font face=3D"cour=
ier new, monospace">facet</font><font face=3D"arial, sans-serif">=A0for the=
 rule from the=A0</font><font face=3D"courier new, monospace">classifier</f=
ont><font face=3D"arial, sans-serif">. After that,=A0</font><font face=3D"c=
ourier new, monospace">handle_flow_miss_with_facet()</font><font face=3D"ar=
ial, sans-serif">=A0is called so that the packet is handle by this=A0</font=
><font face=3D"courier new, monospace">facet</font><font face=3D"arial, san=
s-serif">. A</font></span><span style=3D"font-size:13px">fter the packet is=
 handed to</span><span style=3D"font-size:13px"><font face=3D"courier new, =
monospace">handle_flow_miss_with_facet()</font></span><span style=3D"font-s=
ize:13px">, a=A0</span><span style=3D"font-size:13px"><font face=3D"courier=
 new, monospace">subfacet</font></span><span style=3D"font-size:13px">=A0wi=
ll be created from the=A0</span><span style=3D"font-size:13px"><font face=
=3D"courier new, monospace">facet</font></span><span style=3D"font-size:13p=
x">.=A0</span></div>
<div class=3D"im" style=3D"font-family:arial,sans-serif;font-size:12.727272=
033691406px"><div style=3D"font-size:13px"><br></div><div style=3D"font-siz=
e:13px">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 appre=
ciated.=A0<br>
</div><div style=3D"font-size:13px"><br></div></div><div style=3D"font-fami=
ly:arial,sans-serif;font-size:13px"><span style=3D"font-size:13px">My quest=
ion about the packet processing in openvswitch is:</span></div><div style=
=3D"font-family:arial,sans-serif;font-size:13px">
<span style=3D"font-size:13px">How is the subfacet installed back to datapa=
th? via which function call in userspace?</span><br></div><div style=3D"fon=
t-family:arial,sans-serif;font-size:13px">How this packet is forwarded (pro=
cessed) by userspace? and via which function call?<br>
</div><div style=3D"font-size:13px"><span style=3D"font-family:arial,sans-s=
erif">This two questions confused me since I did not find the related funct=
ion calls in=A0</span><font face=3D"courier new, monospace">handle_flow_mis=
s_with_facet().</font></div>
<div><font face=3D"comic sans ms, sans-serif" style=3D"font-size:13px">In=
=A0</font><span style=3D"font-size:12.727272033691406px;font-family:&#39;co=
urier new&#39;,monospace">handle_flow_miss_with_</span><span style=3D"font-=
size:12.727272033691406px;font-family:&#39;courier new&#39;,monospace">face=
t()</span><span style=3D"font-size:12.727272033691406px"><font face=3D"aria=
l, helvetica, sans-serif">,=A0</font></span><span style=3D"font-family:&#39=
;courier new&#39;,monospace">struct dpif_execute</span><font face=3D"arial,=
 helvetica, sans-serif">=A0is created, However, it is never used in the fun=
ction. I am wondering if this struct is related to the packet processing, a=
nd if yes, how does ovs use this struct.</font></div>
<div style=3D"font-family:arial,sans-serif;font-size:13px"><br></div><div s=
tyle=3D"font-family:arial,sans-serif;font-size:13px">Thanks,</div><div styl=
e=3D"font-family:arial,sans-serif;font-size:13px">Xiaoye</div><br clear=3D"=
all">
<div><br></div>-- <br><div>Xiaoye (Steven)=A0Sun, Ph.D. Student</div>
<div>Department of Electrical and Computer Engineering (ECE)=A0&amp;=A0Depa=
rtment of Computer Science (CS)</div>
<div>George R. Brown School of Engineering</div>
<div>Rice University, Houston, Texas, USA</div>
</div>

--047d7bf0e7c88e2d3904ea610fc2--


More information about the discuss mailing list