Hi Shivani,

You seems to specify "command_bucket_id" field like;
  command_bucket_id='last'
but I guess you need to specify one of the following constants for this field.

https://github.com/osrg/ryu/blob/6ec8802a00723758f255dea1a0be7456bb3e3bb4/ryu/ofproto/ofproto_v1_5.py#L698-L710

Example)
  command_bucket_id = ofp.OFPG_BUCKET_LAST

Thanks,
Iwase

On 2017年11月14日 20:38, shivani dommeti wrote:
Hi,

I am using OpenFlow Version 1.5 and I have tried to use the Insert_Bucket and Remove_Bucket commands which are supported in the following version,

On the OVS side i have followed the following steps:



ovs-ofctl -O openflow15 add-group br_test group_id=3,type=all,bucket=output:2

ovs-ofctl -O openflow15 insert-buckets br_test group_id=3*,command_bucket_id=first,*bucket=bucket_id:1,actions=output:1


 But when i try insert a bucket from RYU I see following  issues when I am try to set value for command_bucket_id as 'last/first' in my code:

group_id = 1

command_bucket_id='last'

actions = [parser.OFPActionOutput(2)]

buckets =  [parser.OFPBucket(actions= actions,bucket_id =1)]

req = ofp_parser.OFPGroupMod(datapath, ofp.OFPGC_INSERT_BUCKET, ofp.OFPGT_SELECT, group_id, command_bucket_id, buckets)

datapath.send_msg(req)


it throws the following error:

When I try to set command_bucket_id value as ‘last’ it throws

File "/usr/local/lib/python2.7/dist-packages/ryu/app/indentedServer.py", line 136, in cp_instruction_processor

self.op_group_add(instruction)

   File "/usr/local/lib/python2.7/dist-packages/ryu/app/indentedServer.py", 
line 1099, in op_group_add

dp_info.send_msg(mod)

   File "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", 
line 347, in send_msg

msg.serialize()

   File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py", 
line 270, in serialize

self._serialize_body()

  File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_5_parser.py", line 6181, in _serialize_body

self.bucket_array_len, self.command_bucket_id)

   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/pack_utils.py", line 
25, in msg_pack_into

struct.pack_into(fmt, buf, offset, *args)

error: cannot convert argument to integer


When I try to set command_bucket_id value as integer 1 it throws:


group_id = 1

command_bucket_id=1

actions = [parser.OFPActionOutput(2)]

buckets =  [parser.OFPBucket(actions= actions,bucket_id =1)]

req = ofp_parser.OFPGroupMod(datapath, ofp.OFPGC_INSERT_BUCKET, ofp.OFPGT_SELECT, group_id, command_bucket_id, buckets)

datapath.send_msg(req)


I don't see any error message but the group is not getting added on the OVS if i check the logs i see the following error:


Error from the logs :

command_bucket_id (1) is out of range

sending OFPGMFC_BAD_BUCKET error reply to OFPT_GROUP_MOD message


Kindly suggest the correction that need to be make to overcome the following 
issue.

Thanks,

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

Reply via email to