<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks all for the help.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I got the answer by adding some debug logs.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In our testbed in which the OVS is using the kernel datapath, GRE will receive the gre packets by gre_rcv function call registered in dp_init.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="signature">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> ovs-discuss-bounces@openvswitch.org &lt;ovs-discuss-bounces@openvswitch.org&gt; 代表 pei Jikui &lt;jkpei@hotmail.com&gt;<br>
<b>发送时间:</b> 2019年3月20日 7:03<br>
<b>收件人:</b> Gregory Rose; ovs-discuss@openvswitch.org<br>
<b>主题:</b> [ovs-discuss] 回复: GRE interface packet receive procedure</font>
<div>&nbsp;</div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks for your help.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
If OVS is using DPDK user space datapath, which one is used for receiving the GRE packets?</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
On the counterpart, how about OVS is using the traditional kernel datapath?</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Jikui</div>
<div id="x_signature">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> Gregory Rose &lt;gvrose8192@gmail.com&gt;<br>
<b>发送时间:</b> 2019年3月20日 4:18<br>
<b>收件人:</b> pei Jikui; ovs-discuss@openvswitch.org<br>
<b>主题:</b> Re: [ovs-discuss] GRE interface packet receive procedure</font>
<div>&nbsp;</div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText"><br>
On 3/19/2019 6:29 AM, pei Jikui wrote:<br>
&gt; hi,<br>
&gt;<br>
&gt; 1) I am reading the OVS source code about how a GRE interface in OVS <br>
&gt; receives packets into OVS bridge.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;I found there are two places that the GRE packets will possibly <br>
&gt; be received into OVS bridge.<br>
&gt;<br>
&gt; &nbsp; &nbsp; a) . The first place is when we create a gre interface with <br>
&gt; gre_create-&gt;ovs_netdev_link-&gt;netdev_rx_handler_register<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The register rx_handler is&nbsp;netdev_frame_hook which will <br>
&gt; receive the packets into the ovs bridge.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;b) The second place is located at the dp_init which will register <br>
&gt; a packet handler function gre_rcv for GRE protocol packets.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gre_rcv will also receive the packets to OVS bridge.<br>
&gt;<br>
&gt;<br>
&gt; 2) My questions are,<br>
&gt; &nbsp; &nbsp; &nbsp;a)&nbsp; Which is the real receive handler for the GRE packets?<br>
&gt; &nbsp; &nbsp; &nbsp;b) Is it possible that the packets could be received by both of <br>
&gt; the two cases. If yes, for which scenarios will be match to each one?<br>
<br>
OVS supports a user space datapath and a kernel datapath so it depends <br>
on whether you're using the user space datapath or the kernel datapath.<br>
<br>
- Greg<br>
<br>
&gt;<br>
&gt; Thanks much.<br>
&gt;<br>
&gt; Jikui<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; discuss mailing list<br>
&gt; discuss@openvswitch.org<br>
&gt; <a href="https://mail.openvswitch.org/mailman/listinfo/ovs-discuss">https://mail.openvswitch.org/mailman/listinfo/ovs-discuss</a><br>
<br>
</div>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>