[ovs-discuss] Is there any document about nicira externtion
Ashish Varma
ashishvarma.ovs at gmail.com
Tue Aug 20 16:45:52 UTC 2019
I have attempted to write a document explaining the Nicira extension which
is still a v1 patch for review.
https://patchwork.ozlabs.org/patch/1145870/
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.
packet_in message is supported in OpenFlow 1.3. Any specific reason to use
nxm_packet_in_2?
Below is an example of OpenFlow 1.0 Nicira Vendor message 'Flow Mod' with
'NXM' or Nicira Extensible Match fields generated using:
ovs-ofctl add-flow br1 "table=10, priority=100, cookie=0x0102030405060708
ip, sctp, sctp_dst=9, actions=drop"
This is an example to show how NXM is encoded.
OVS NXM fields are described at
http://www.openvswitch.org/support/dist-docs/ovs-fields.7.txt
0x01 0x04 0x00 0x48 0x00 0x00 0x00 0x0a
0x00 0x00 0x23 0x20 0x00 0x00 0x00 0x0d
0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08
0x0a 0x00 0x00 0x00 0x00 0x00 0x00 0x64
0xff 0xff 0xff 0xff 0xff 0xff 0x00 0x00
0x00 0x11 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x06 0x02 0x08 0x00 0x00 0x00
0x0c 0x01 0x84 0x80 0x00 0x24 0x02 0x00
0x09 0x00 0x00 0x00 0x00 0x00 0x00 0x00
// ofp_header with Version=1, Message Type=4 (Vendor)
0x01 0x04 0x00 0x48 0x00 0x00 0x00 0x0a
// Vendor id = 0x00002320 Subtype = 0x00 0x0d (Where are these defined ??)
0x00 0x00 0x23 0x20 0x00 0x00 0x00 0x0d
// Cookie
0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08
// Command = 0x0a 0x00 (table-id=0x0a,command=add(0x00)) idle_time = 0
hard_time = 0 priority = 100
0x0a 0x00 0x00 0x00 0x00 0x00 0x00 0x64
// buffer_id = 0xffffffff out_port = OFPP_NONE(0xffff) flags = 0
0xff 0xff 0xff 0xff 0xff 0xff 0x00 0x00
// match_len = 0x11 padding= 0x000000000000
0x00 0x11 0x00 0x00 0x00 0x00 0x00 0x00
// OFPXMC12_NXM_0 (nxm_vendor 0x0000) nxm_field+hm=0x06,nxm_field=0x03,hm=0
nxm_length=0x02 value=0x0800 (ethernet)
0x00 0x00 0x06 0x02 0x08 0x00
// OFPXMC12_NXM_0 (nxm_vendor 0x0000) nxm_field+hm=0x0c,nxm_field=0x06,hm=0
nxm_length=0x01 value=0x84 (sctp)
0x00 0x00 0x0c 0x01 0x84
// OFPXMC_OPENFLOW_BASIC (0x8000) nxm_field+hm=0x24,nxm_field=0x12,hm=0
nxm_length=0x02 value=0x09 (sctp_dst_port)
0x80 0x00 0x24 0x02 0x00 0x09
// padding 7 bytes of 0s
0x00 0x00 0x00 0x00 0x00 0x00 0x00
Thanks,
Ashish
On Tue, Aug 20, 2019 at 3:45 AM kai xi fan <kaixi.f at gmail.com> wrote:
> Thanks.
> I have read the following file.
> https://github.com/openvswitch/ovs/blob/master/include/openflow/nicira
> -ext.h
> But it's too simple to understand. For example, nicira extension use
> properties in "nxm packet_in_2" packet in format. But there is no such
> openflow message format in detail.
> I have to tcpdump the openflow packet to understand it.
> May be there is a official document about this ?
>
> Numan Siddique <nusiddiq at redhat.com> 于2019年8月20日周二 下午3:37写道:
>
>>
>>
>> On Tue, Aug 20, 2019 at 7:35 AM kai xi fan <kaixi.f at gmail.com> wrote:
>>
>>> I am writing a controller to control ovs through openflow protocol.
>>> I found that when I dump flows from ovs using ovs-ofctl. It shows me
>>> so many fields prefixed with "NXM".
>>> And we plan to use "nxm packet_in_2" format. It also needs nicira
>>> extensions.
>>> So if the controller wants to communicate with ovs using openflow 1.3, I
>>> have to deal with nicira extensions.
>>> But I could not found any document about its format and the
>>> corresponding openflow message format.
>>> Could any one help me ?
>>>
>>
>> I think you can find useful information here -
>> https://github.com/openvswitch/ovs/blob/master/include/openflow/nicira-ext.h
>>
>> Thanks
>> Numan
>>
>>
>>> thanks.
>>> _______________________________________________
>>> discuss mailing list
>>> discuss at openvswitch.org
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>>>
>> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20190820/d836d9af/attachment.html>
More information about the discuss
mailing list