Hi, Shivani
PopVlan action requires that vlan_vid is specified in the match field.
See "7.5.4.3 Bad Action error codes" in OpenFlow Specification:
https://www.opennetworking.org/wp-content/uploads/2014/10/openflow-switch-v1.5.1.pdf
So you should specify vlan_vid to the match field.
See this section to learn what number should be specified:
http://ryu.readthedocs.io/en/latest/app/ofctl_rest.html#example-of-vlan-id-match-field
Thanks,
Fujimoto
On 2017年12月14日 03:17, shivani dommeti wrote:
Hi,
Working on:
OVS version: 2.8.2
OF version: 1.5
I have tried the following command on ovs to add a flow:
ovs-ofctl add-flow br0
"cookie=0x5000000000000c3/0xffffffffffffffff,table=0, priority=100,
in_port=3, actions=pop_vlan
and i dint see any issue, but when i try to add the same flow from ryu
with the following message:
OFPFlowMod(buffer_id=4294967295,command=0,cookie=360287970189639875,cookie_mask=18446744073709551615L,flags=1,hard_timeout=0,idle_timeout=0,importance=0,instructions=[OFPInstructionActions(actions=[OFPActionPopVlan(len=8,type=18)],type=4)],match=OFPMatch(oxm_fields={'in_port':
3}),out_group=0,out_port=4294967295,priority=100,table_id=0)
i find the following error received:
OFPErrorMsg(type=0x2, code=0xa,
data=b'\x06\x0e\x00\x50\xa1\x31\xea\x3b\x05\x00\x00\x00\x00\x00\x00\xc3\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x64\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x0c\x80\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x00')
|-- type: OFPET_BAD_ACTION(2)
|-- code: OFPBAC_MATCH_INCONSISTENT(10)
`-- data: version=0x6, msg_type=0xe, msg_len=0x50, xid=0xa131ea3b
`-- msg_type: OFPT_FLOW_MOD(14)
I find the same issue with modfiy flow command also.
command set from OVS:
ovs-ofctl add-flow br0 "cookie=0x5000000000000c3,table=0,
priority=100,in_port=3, actions=output:3"
ovs-ofctl mod-flows br0 "cookie=0x5000000000000c3/0xffffffffffffffff,
table=0, priority=100, actions = pop_vlan"
output i see on OVS:
root@shivani-VirtualBox:/usr/local/bin# ovs-ofctl dump-flows br0
cookie=0x5000000000000c3, duration=21.498s, table=0, n_packets=0,
n_bytes=0, reset_counts priority=100,in_port=3 actions=pop_vlan
but when i try to do the same from RYU :
//add a flow with match-field as in_port=3 and action=output:3
OFPFlowMod(buffer_id=4294967295,command=0,cookie=360287970189639875,cookie_mask=18446744073709551615L,flags=1,hard_timeout=0,idle_timeout=0,importance=0,instructions=[OFPInstructionActions(actions=[OFPActionOutput(len=16,max_len=65509,port=3,type=0)],type=4)],match=OFPMatch(oxm_fields={'in_port':
3}),out_group=0,out_port=4294967295,priority=100,table_id=0)
//modify the flow to action=pop_vlan
OFPFlowMod(buffer_id=4294967295,command=1,cookie=360287970189639875,cookie_mask=18446744073709551615L,flags=1,hard_timeout=0,idle_timeout=0,importance=0,instructions=[OFPInstructionActions(actions=[OFPActionPopVlan(len=8,type=18)],type=4)],match=OFPMatch(oxm_fields={}),out_group=0,out_port=4294967295,priority=100,table_id=0)
but is see the same error when i try to modify the flow:
OFPErrorMsg(type=0x2, code=0xa,
data=b'\x06\x0e\x00\x48\xa6\xac\x2e\x67\x05\x00\x00\x00\x00\x00\x00\xc3\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x00\x00\x00\x00\x00\x64\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x04\x00\x00\x00\x00\x00\x04\x00\x10\x00\x00\x00\x00')
|-- type: OFPET_BAD_ACTION(2)
|-- code: OFPBAC_MATCH_INCONSISTENT(10)
`-- data: version=0x6, msg_type=0xe, msg_len=0x48, xid=0xa6ac2e67
`-- msg_type: OFPT_FLOW_MOD(14)
I have not seen the error if i give vlan_vid mentioned in the match feild.
Kindly suggest way to add the flow without sending vlan_vid in the
match field.
Regards,
Shivani.
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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