Nitish,
i was trying to do something like i guess.
But i am trying to edit the swith handler, as i want the table miss to be
with the meter!
Following you question:
First you need to reate the meter:
For my it i slike this:
rate=25
burst_size=0
bands=[]
bands.append(parser.OFPMeterBandDrop(rate, burst_size))
meter_mod = parser.OFPMeterMod(
datapath,command=ofproto.OFPMC_ADD,flags=ofproto.OFPMF_PKTPS ,meter_id=1,
bands=bands)
datapath.send_msg(meter_mod)
And now you have a meter instaled! You need to edit to the meter type and
parameters you want! i just gave an exampe of adding a meter! (Sorry not
much time)
And now you need to add a flow with this meter in instructions:
match = parser.OFPMatch()
pre_actions = [parser.OFPActionOutput(ofproto.OFPP_CONTROLLER,
ofproto.OFPCML_NO_BUFFER)]
actions =
parser.OFPInstructionActions(ofproto.OFPIT_APPLY_ACTIONS,pre_actions)
*meter_inst = parser.OFPInstructionMeter(meter_id=1)*
mod = parser.OFPFlowMod(datapath=datapath, priority=0, match=match,
instructions=[meter_inst,actions])
datapath.send_msg(mod)
Again, in my example i edit the table miss as you can see the match with
nothing to match.
Hope i helped you..
If you need more help let me know!
I am stuck now with muitiple tables....
Em Tue Jan 13 2015 at 10:52:42, nitish nagesh <[email protected]>
escreveu:
> Hi All,
>
> I am trying to write a RYU script to send an experimenter Match
> field in the Flow Mod message. I was referring to
> "simple_switch_13.py" and trying to figure out how i can change the
> add_flow function so that the "match" would contain the experimenter
> Match field as well. Was not able to do much. Can someone please post
> a sample code snippet or point to one which might be already existing.
>
> Following is the Experimenter Match Field structure i am trying to encode:
>
> oxm_class=OFPXMC_EXPERIMENTER (16-bit)
> oxm_field = 1 (7-bit)
> has_mask = 1 (1-bit)
> oxm_length = 2 (8-bit)
> experimenter_id = 0x00001234 (16-bit)
> Match value (16-bit)
> Match Mask (16-bit)
>
> Thanks,
> Nitish
>
> ------------------------------------------------------------
> ------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel