Hello community!
I am trying to use Ryu REST API to insert a flow in an OpenvSwitch datapath.
Unfortunately, I have run into problems with the fields tun_ipv4_src and
tun_ipv4_dst. However, if I add the intended flow via ovs-ofctl, then I can
then fetch it correctly through the Ryu REST API.
The ovs-ofctl command is the following:
# ovs-ofctl add-flow -O OpenFlow13 br-test0
"table=0,priority=10,in_port=100,ip,nw_src=192.168.0.100,nw_dst=172.16.0.1
actions=set_field:100.64.1.130->tun_src,set_field:100.64.2.130->tun_dst,set_field:5->tun_id,output:101"
Is there any way around this issue? I took a look at the ofctl_rest.py but
couldn't figure out myself how to modify the parser so it accepts Nicira fields.
Thank you!
Jesus
PS: This is exactly the same problem as already reported by Zhao Jun on
2016-03-03. I copy it here for further reference
>>> Hi, all
>>> I want to use ryu rest api to add a flow rule to OpenvSwitch.
>>> Here is the body I use
>>> { "dpid": 95529493015, "table_id": 0, "idle_timeout": 0,
>>> "hard_timeout": 1800, "priority": 11, "match":{ "in_port":2,
>>> "tunnel_id_nxm":5001, "tun_ipv4_src":"52.193.10.12",
>>> "dl_type":2048, "nw_src":"10.0.0.0/24",
>>> "nw_dst":"10.0.1.0/24" }, "actions":[ {
>>> "type":"SET_FIELD", "field":"tunnel_id_nxm",
>>> "value":5001 }, { "type":"SET_FIELD",
>>> "field":"tun_ipv4_dst", "value":"52.33.232.199" },
>>> { "type":"OUTPUT", "port": 0xfffffff8 } ]}
>>> The log shows that "Unknown match field: tunnel_id_nxm" and "Unknown match
>>> field: tun_ipv4_src"
>>> These two match fields are found here:
>>> https://github.com/osrg/ryu/blob/7a9b1be5d6874933fdfbf4e610992dd302915ed9/ryu/ofproto/nx_match.py
>>> I guess they are corresponding with "tun_id" and "tun_src" in OpenvSwitch.
>>> But the result is not same as I expected. So if I want to match "tun_id"
>>> and "tun_src" in Openvswitch, which match field shoud I use?
>>> Many thanks.
>>>
>>> Zhao Jun
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel