Re: [ovs-dev] unit of burst in ingress_policing

2016-04-12 Thread Miguel Angel Ajo Pelayo
I will send it today. Best, Miguel Angel El 12/4/2016 20:33, "Ben Pfaff" escribió: > Would you like to submit a fix? > > On Tue, Apr 12, 2016 at 01:34:28PM +0200, Miguel Angel Ajo Pelayo wrote: > > After looking at iproute2/tc sources and ovs sources, I believe the > > error is in

Re: [ovs-dev] unit of burst in ingress_policing

2016-04-12 Thread Ben Pfaff
Would you like to submit a fix? On Tue, Apr 12, 2016 at 01:34:28PM +0200, Miguel Angel Ajo Pelayo wrote: > After looking at iproute2/tc sources and ovs sources, I believe the > error is in ovs, > In tc, the burst is calculated with > >tc_calc_xmittime(size, rate) = tick_in_us *

Re: [ovs-dev] unit of burst in ingress_policing

2016-04-12 Thread Miguel Angel Ajo Pelayo
After looking at iproute2/tc sources and ovs sources, I believe the error is in ovs, In tc, the burst is calculated with tc_calc_xmittime(size, rate) = tick_in_us * TIME_UNITS_PER_SEC * (size/rate) tick_in_us seems to be the number of ticks in a microsecond, and TIME_UNITS_PER_SEC is

Re: [ovs-dev] unit of burst in ingress_policing

2016-04-12 Thread Miguel Angel Ajo Pelayo
Hi Ben, I think slawe is not worried about the 1000 vs 1024 difference. But on the fact that when setting 1000kbit burst on an policy, when you check via tc cmdline, you see 1000kbyte. Is TC command line reporting it wrong?, is it TC API?, or is it a bug in OVS?. I'm reading the

Re: [ovs-dev] unit of burst in ingress_policing

2016-04-10 Thread Ben Pfaff
No, I'm talking about the rest of the comment, please read it again. The difference between 1000 vs 1024 bits is a trivial 2.4% difference. On Sun, Apr 10, 2016 at 09:46:28PM +0200, Sławek Kapłoński wrote: > Hello, > > Thx for anwear and checking that. AFAIU You are talking about issue with SI

Re: [ovs-dev] unit of burst in ingress_policing

2016-04-10 Thread Sławek Kapłoński
Hello, Thx for anwear and checking that. AFAIU You are talking about issue with SI and IEC units and problem with it. I'm not talking about such issue or not issue. What I pointed here is that (from comment in ovs code) ovs is doing something like: "sbin/tc filter add dev parent :

Re: [ovs-dev] unit of burst in ingress_policing

2016-04-10 Thread Ben Pfaff
On Thu, Apr 07, 2016 at 09:28:50PM +0200, Sławek Kapłoński wrote: > Hello, > > I'm playing littlebit with ingress policing in openvswitch and I found some > kind of inconsistency. > In docs and in source code (https://github.com/openvswitch/ovs/blob/master/ > lib/netdev-linux.c#L4698) there is

[ovs-dev] unit of burst in ingress_policing

2016-04-07 Thread Sławek Kapłoński
Hello, I'm playing littlebit with ingress policing in openvswitch and I found some kind of inconsistency. In docs and in source code (https://github.com/openvswitch/ovs/blob/master/ lib/netdev-linux.c#L4698) there is info that burst is set in kilobits, but I found that in fact it is set in