[ovs-discuss] How to apply rate limiting or QoS on upload speed?

Zhangguanghui zhang.guanghui at h3c.com
Wed Mar 11 02:18:10 UTC 2015


I'd like to make an addition in the patch.
- tc_fill_rate(&tc_police.rate, (kbits_rate * 1000)/8, mtu);
+ tc_fill_rate(&tc_police.rate, ((uint64_t)kbits_rate * 1000)/8, mtu);

From: Ben Pfaff<mailto:blp at nicira.com>
Date: 2015-03-11 04:37
To: zhangguanghui 10102 (RD)<mailto:zhang.guanghui at h3c.com>
CC: discuss<mailto:discuss-bounces at openvswitch.org>; Navneet Singh<mailto:navneet.singh2012 at gmail.com>; discuss at openvswitch.org<mailto:discuss at openvswitch.org>
Subject: Re: [ovs-discuss] How to apply rate limiting or QoS on upload speed?

Thanks for the report.  I posted a patch:
        http://openvswitch.org/pipermail/dev/2015-March/052260.html
Will you try it out?

Thanks,

Ben.

On Tue, Mar 10, 2015 at 05:52:02AM +0000, Zhangguanghui wrote:
> There is a bug in the rate limiting, for the type of int has a max limit 2147483648,(lt 2000000*1000)
> if you can change type 'int' to 'uint' in the function context, as follow,
> static int tc_add_policer(struct netdev *netdev, int kbits_rate, int kbits_burst)
>
> From: discuss<mailto:discuss-bounces at openvswitch.org>
> Date: 2015-03-10 13:37
> To: Navneet Singh<mailto:navneet.singh2012 at gmail.com>
> CC: discuss at openvswitch.org<mailto:discuss at openvswitch.org>
> Subject: Re: [ovs-discuss] How to apply rate limiting or QoS on upload speed?
>
> On Tue, Mar 10, 2015 at 11:05:12AM +0530, Navneet Singh wrote:
> > I am trying to control upload speed using openvswitch on eth1 port using
> > commands like
> >
> >
> > > =>ovs-vsctl set port eth1 qos=@newqos -- --id=@newqos create qos
> > > type=linux-htb queues=0=@q0,1=@q1 -- --id=@q0 create queue
> > > other-config:min-rate=2000000 other-config:max-rate=2000000 -- --id=@q1
> > > create queue other-config:min-rate=3000000 other-config:max-rate=3000000
> >
> >
> > WAN is provided to eth0 port and forwarded to br0 through iptables and NAT.
> > I am able to achieve rate limiting on downloading but not on uploading.
>
> qdiscs only control the rate of data transmission, not reception.  You
> might want to use policing, please see ovs-vswitchd.conf.db(5) for
> configuration details.
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss
>
> -------------------------------------------------------------------------------------------------------------------------------------
> ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ?????????
> This e-mail and its attachments contain confidential information from H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!

> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss


-------------------------------------------------------------------------------------------------------------------------------------
??????????????????????????,?????????????
?????????????????????(??????????????????
???)?????????????????,??????????????????
??!
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150311/bd7f1966/attachment-0002.html>


More information about the discuss mailing list