<div dir="ltr">I have attempted to write a document explaining the Nicira extension which is still a v1 patch for review.<div><br></div><div><a href="https://patchwork.ozlabs.org/patch/1145870/">https://patchwork.ozlabs.org/patch/1145870/</a><br></div><div><br></div><div>Nicira extensions were added in the early days of OVS during early OpenFlow versions and a lot of those extensions made it to standard OpenFlow specifications.</div><div>packet_in message is supported in OpenFlow 1.3. Any specific reason to use nxm_packet_in_2?</div><div><br></div><div>Below is an example of OpenFlow 1.0 Nicira Vendor message &#39;Flow Mod&#39; with &#39;NXM&#39; or Nicira Extensible Match fields generated using:</div><div>ovs-ofctl add-flow br1 &quot;table=10, priority=100, cookie=0x0102030405060708 ip, sctp, sctp_dst=9, actions=drop&quot;<br></div><div><br></div><div>This is an example to show how NXM is encoded.</div><div><br></div><div>OVS NXM fields are described at </div><div><a href="http://www.openvswitch.org/support/dist-docs/ovs-fields.7.txt">http://www.openvswitch.org/support/dist-docs/ovs-fields.7.txt</a></div><div><br></div><div><font face="courier new, monospace">0x01    0x04    0x00    0x48    0x00    0x00    0x00    0x0a<br>0x00    0x00    0x23    0x20    0x00    0x00    0x00    0x0d<br>0x01    0x02    0x03    0x04    0x05    0x06    0x07    0x08<br>0x0a    0x00    0x00    0x00    0x00    0x00    0x00    0x64<br>0xff    0xff    0xff    0xff    0xff    0xff    0x00    0x00<br>0x00    0x11    0x00    0x00    0x00    0x00    0x00    0x00<br>0x00    0x00    0x06    0x02    0x08    0x00    0x00    0x00<br>0x0c    0x01    0x84    0x80    0x00    0x24    0x02    0x00<br>0x09    0x00    0x00    0x00    0x00    0x00    0x00    0x00<br><br><br>// ofp_header with Version=1, Message Type=4 (Vendor)<br>0x01    0x04    0x00    0x48    0x00    0x00    0x00    0x0a<br><br>// Vendor id = 0x00002320 Subtype = 0x00 0x0d   (Where are these defined ??)<br>0x00    0x00    0x23    0x20    0x00    0x00    0x00    0x0d<br><br>// Cookie<br>0x01    0x02    0x03    0x04    0x05    0x06    0x07    0x08<br><br>// Command = 0x0a 0x00 (table-id=0x0a,command=add(0x00))  idle_time = 0 hard_time = 0 priority = 100<br>0x0a    0x00    0x00    0x00    0x00    0x00    0x00    0x64<br><br>// buffer_id = 0xffffffff out_port = OFPP_NONE(0xffff) flags = 0<br>0xff    0xff    0xff    0xff    0xff    0xff    0x00    0x00<br><br>// match_len = 0x11 padding= 0x000000000000<br>0x00    0x11    0x00    0x00    0x00    0x00    0x00    0x00<br><br>// OFPXMC12_NXM_0 (nxm_vendor 0x0000) nxm_field+hm=0x06,nxm_field=0x03,hm=0 nxm_length=0x02 value=0x0800 (ethernet)<br>0x00    0x00    0x06    0x02    0x08    0x00<br><br>// OFPXMC12_NXM_0 (nxm_vendor 0x0000) nxm_field+hm=0x0c,nxm_field=0x06,hm=0 nxm_length=0x01 value=0x84 (sctp)<br>0x00    0x00    0x0c    0x01    0x84<br><br>// OFPXMC_OPENFLOW_BASIC (0x8000) nxm_field+hm=0x24,nxm_field=0x12,hm=0 nxm_length=0x02 value=0x09 (sctp_dst_port)<br>0x80    0x00    0x24    0x02    0x00    0x09<br><br>// padding 7 bytes of 0s<br>0x00    0x00    0x00    0x00    0x00    0x00    0x00<br></font></div><div><font face="courier new, monospace"><br></font></div><div><br></div><div><br></div><div>Thanks,</div><div>Ashish</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 3:45 AM kai xi fan &lt;<a href="mailto:kaixi.f@gmail.com">kaixi.f@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks.</div><div class="gmail_default" style="font-family:verdana,sans-serif">I have read the following file.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><a href="https://github.com/openvswitch/ovs/blob/master/include/openflow/nicira-ext.h" style="font-family:Arial,Helvetica,sans-serif" target="_blank">https://github.com/openvswitch/ovs/blob/master/include/openflow/<span class="gmail-m_-2400348285952197317gmail-il">nicira</span>-ext.h</a> </div><div class="gmail_default" style="font-family:verdana,sans-serif">But it&#39;s too simple to understand. For example, nicira extension use properties in <span style="color:rgb(80,0,80)">&quot;nxm packet_in_2&quot; packet in format. But there is no such openflow message format in detail.</span><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(80,0,80)">I have to tcpdump the openflow packet to understand it.</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(80,0,80)">May be there is a official document about this ?</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Numan Siddique &lt;<a href="mailto:nusiddiq@redhat.com" target="_blank">nusiddiq@redhat.com</a>&gt; 于2019年8月20日周二 下午3:37写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 20, 2019 at 7:35 AM kai xi fan &lt;<a href="mailto:kaixi.f@gmail.com" target="_blank">kaixi.f@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><font face="verdana, sans-serif">I am writing a controller to control ovs through openflow protocol. </font></div><div><font face="verdana, sans-serif">I found that  when I dump flows from ovs using ovs-ofctl. </font><span style="font-family:verdana,sans-serif">It shows me so many fields prefixed with &quot;NXM&quot;. </span></div><div><font face="verdana, sans-serif">And we plan to use &quot;nxm packet_in_2&quot; format. It also needs nicira extensions.</font></div><div><font face="verdana, sans-serif">So if the controller wants to communicate with ovs using openflow 1.3, I have to deal with nicira extensions.</font></div><div><font face="verdana, sans-serif">But I could not found any document about its format and the corresponding openflow message format.</font></div><div><font face="verdana, sans-serif">Could any one help me ?</font></div></div></blockquote><div><br></div><div>I think you can find useful information here - <a href="https://github.com/openvswitch/ovs/blob/master/include/openflow/nicira-ext.h" target="_blank">https://github.com/openvswitch/ovs/blob/master/include/openflow/nicira-ext.h</a></div><div><br></div><div>Thanks</div><div>Numan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><font face="verdana, sans-serif">thanks.</font></div></div>
_______________________________________________<br>
discuss mailing list<br>
<a href="mailto:discuss@openvswitch.org" target="_blank">discuss@openvswitch.org</a><br>
<a href="https://mail.openvswitch.org/mailman/listinfo/ovs-discuss" rel="noreferrer" target="_blank">https://mail.openvswitch.org/mailman/listinfo/ovs-discuss</a><br>
</blockquote></div></div>
</blockquote></div>
_______________________________________________<br>
discuss mailing list<br>
<a href="mailto:discuss@openvswitch.org" target="_blank">discuss@openvswitch.org</a><br>
<a href="https://mail.openvswitch.org/mailman/listinfo/ovs-discuss" rel="noreferrer" target="_blank">https://mail.openvswitch.org/mailman/listinfo/ovs-discuss</a><br>
</blockquote></div>