Hi Takahashi,
Thanks for your share sample, Yes, I can create meter-entry on the real sw.
But I don't understand how can use meter-entry apply to some flow-entry?
Such as:

==================================I can create meterentry
curl -X POST -d '{"dpid": "2",
                    "meter_id": 1,
                    "flags": ["KBPS", "BURST"],
                    "bands": [{"type": "DROP", "rate": 1024}]}' 
http://10.1.25.52:8080/stats/meterentry/add

==================================I can add flowentry 
curl -X POST -d '{"dpid": "2",
          "priority": "10240",
          "match": {},             <--------------but I can't add any more 
field.
          "actions": [{"type": "METER", "meter_id":1}]}' 
http://10.1.25.52:8080/stats/flowentry/add


=================================== I want to rate-limit this flow entry.
Could you tell me how can use above meter in this flow entry? 

curl -d '{"cookie": "1",
          "dpid": "2",
          "priority": "10240",
          "match": {"in_port": "46",
                    "eth_type": 0x8847,
                    "mpls_label": "121"},
          "actions": [{"type": "PUSH_MPLS", "ethertype":0x8847},
                      {"type":"SET_FIELD","field":"mpls_label","value":27},
                      {"type":"OUTPUT","port":"48"}]}' 
http://10.1.25.52:8080/stats/flowentry/add

Thanks

Jalee



-----Original Message-----
From: Minoru TAKAHASHI [mailto:[email protected]] 
Sent: Wednesday, July 23, 2014 2:32 PM
To: jaleeb
Cc: [email protected]
Subject: Re: [Ryu-devel] About meter/qos support real OFS


(2014年07月22日 02:43), jalee wrote:
> Hi.
> I have question about meter, if I use real openflow switch not OVS, 
> can I use meter/qos function in 3.11 version?
> I mean just only load "ofctl_rest.py" module. 

Yes.
I think operation of ofctl_rest that's the same in real openflow switch and OVS.

> If can support real openflow switch can you share sample restful-api to me?

Please see following examples.

FlowMod with the meter instruction:

    flow = {'match': {},
            'actions': [{'type': 'METER',
                         'meter_id': 1}]
    curl -X POST -d '{"dpid": 1, "match": {}, "actions": [{"type": "METER", 
"meter_id": 1}]}' http://localhost:8080/stats/flowentry/add

MeterMod:

    meter = {'meter_id': 1,
             'flags': 'KBPS',
             'bands': [{'type': 'DROP',
                        'rate': 1000}]}
    curl -X POST -d '{"dpid": 1, "meter_id": 1, "flags": "KBPS", "bands": 
[{"type": "DROP", "rate": 1000}]}' http://localhost:8080/stats/meterentry/add

> Thanks,
> 
> 
> Jalee
> 
> 
> 
> 
> ======================================================================
> ============== This message may contain information which is private, 
> privileged or confidential of INNO-Tech Network & Service Inc.
> If you are not the intended recipient of this message, please notify the 
> sender and destroy/delete the message. 
> Any review, retransmission, dissemination or other use of, or taking 
> of any action in reliance upon this information, by persons or entities other 
> than the intended recipient is prohibited.
> ======================================================================
> ==============
> 
> 
> 
> ----------------------------------------------------------------------
> -------- Want fast and easy access to all the code in your enterprise? 
> Index and search up to 200,000 lines of code with a free copy of Black 
> Duck Code Sight - the same software that powers the world's largest 
> code search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 




====================================================================================
This message may contain information which is private, privileged or 
confidential of INNO-Tech Network & Service Inc. 
If you are not the intended recipient of this message, please notify the sender 
and destroy/delete the message. 
Any review, retransmission, dissemination or other use of, or taking of any 
action in reliance upon this information, 
by persons or entities other than the intended recipient is prohibited.
====================================================================================
 



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to