Thanks Ilya, your proposal works for me, not bad :-)

-----邮件原件-----
发件人: Ilya Maximets [mailto:i.maxim...@samsung.com] 
发送时间: 2019年8月12日 14:48
收件人: ovs-dev@openvswitch.org; Yi Yang (杨燚)-云服务集团 <yangy...@inspur.com>
抄送: William Tu <u9012...@gmail.com>; Ben Pfaff <b...@ovn.org>
主题: Re: Re: [ovs-dev] 答复: [ovs-discuss] why action "meter" only can be 
specified once?

Hi.
If you'll try to use more recent OVS version, you'll get more informative error 
message:
    ovs-ofctl: duplicate meter instruction not allowed, for OpenFlow 1.1+ 
compatibility

So, it seems like an issue between different versions of OF standards.

Anyway, you may overcome this issue by splitting your flows in two parts:

    table=0,ip,nw_src=10.0.0.0/24 actions=meter:4,resubmit:1
    table=1,ip,nw_src=10.0.0.2    actions=meter:1, ...other-actions
    table=1,ip,nw_src=10.0.0.3    actions=meter:2, ...other-actions
    table=1,ip,nw_src=10.0.0.4    actions=meter:3, ...other-actions

Best regards, Ilya Maximets.

> William, I have several flows to share a meter, at the time, every flow has 
> its own meter, they look like the below:
> 
> table=0,ip,nw_src=10.0.0.2 actions=meter:1,meter:4, ...other-actions
> table=0,ip,nw_src=10.0.0.3 actions=meter:2,meter:4, ...other-actions
> table=0,ip,nw_src=10.0.0.3 actions=meter:3,meter:4, ...other-actions
> 
> meter 4 are shared by three flows so that we can let tenants leverage their 
> bandwidth more efficient between three flows, so total limit is 100Mbps, 
> every one limit is 50Mbps, if flow 3 has lower bandwidth utilization rate, 
> flow 1 and 2 can leverage it. I can get every flow stats and also can get all 
> the flows stats by meter 4, that is what I'm saying.
> 
> I think supporting it isn't a big technical issue, it will be great if you 
> can add this feature, I think it is very helpful, we have real use cases 
> which is called shared bandwith.
> 
> -----邮件原件-----
> 发件人: William Tu [mailto:u9012063 at gmail.com]
> 发送时间: 2019年8月10日 0:54
> 收件人: Yi Yang (杨燚)-云服务集团 <yangyi01 at inspur.com>
> 抄送: ovs-dev at openvswitch.org; ovs-discuss at openvswitch.org
> 主题: Re: [ovs-discuss] why action "meter" only can be specified once?
> 
> On Mon, Aug 5, 2019 at 12:39 AM Yi Yang (杨燚)-云服务集团 <yangyi01 at inspur.com> 
> wrote:
>>
>> Hi, all
>>
>>
>>
>> I was told meter only can be specified once, but actually there is such case 
>> existing, i.e. multiple flows share a total bandwidth, but every flow also 
>> has its own bandwidth limit, by two meters, we can not only get every flow 
>> stats but also get total stats, I think this is very reasonable user 
>> scenario.
>>
> 
> I don't understand your use case.
> You can create multiple meters and each flow can use it own meter to rate 
> limit, right?
>>
>>
>> ovs-ofctl: instruction meter may be specified only once
> How do you get this error?
> 
> Thanks
> William

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to