Hi, Ali
Yes, Ryu supports meter actions!
In OF 1.5, OFPInstructionMeter is moved to OFPActionMeter,
so the following code should be work in your app:
bands = [parser.OFPMeterBandDrop(type_=ofproto.OFPMBT_DROP,
len_=0, rate=100, burst_size=10)]
req = parser.OFPMeterMod(datapath=datapath,
command=ofproto.OFPMC_ADD,
flags=ofproto.OFPMF_KBPS, meter_id=1,
bands=bands)
datapath.send_msg(req)
actions = [parser.OFPActionOutput(2), parser.OFPActionMeter(1,
ofproto.OFPAT_METER)]
inst =
[parser.OFPInstructionActions(ofproto.OFPIT_APPLY_ACTIONS, actions),]
mod = datapath.ofproto_parser.OFPFlowMod(
datapath=datapath, match=match, cookie=0,
command=ofproto.OFPFC_ADD, idle_timeout=0,
hard_timeout=0, priority=3, instructions=inst)
datapath.send_msg(mod)
Thanks,
Fujimoto
On 2017年06月15日 21:07, Ali Volkan Atli wrote:
Hello all
I'm trying to implement Openflow 1.5 Meter action (instead of instruction) on
Open vSwitch (OvS), now it seems working by using ovs-ofctl, and I'm tring to
test with ryu controller. Does ryu support meter actions (not instruction)? If
it does how I can convert the below code from OF1.3 to OF1.5 accordingly?
bands = [parser.OFPMeterBandDrop(type_=ofproto.OFPMBT_DROP, len_=0,
rate=100, burst_size=10)]
req=parser.OFPMeterMod(datapath=datapath, command=ofproto.OFPMC_ADD,
flags=ofproto.OFPMF_KBPS, meter_id=1, bands=bands)
datapath.send_msg(req)
actions = [parser.OFPActionOutput(2)]
inst = [parser.OFPInstructionActions(ofproto.OFPIT_APPLY_ACTIONS,
actions), parser.OFPInstructionMeter(1,ofproto.OFPIT_METER)]
mod = datapath.ofproto_parser.OFPFlowMod(
datapath=datapath, match=match, cookie=0,
command=ofproto.OFPFC_ADD, idle_timeout=0,
hard_timeout=0, priority=3, instructions=inst)
datapath.send_msg(mod)
Thanks in advance
- Volkan
------------------------------------------------------------------------------
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel