lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <298f5c050906020312r514c4638sfa2b504f55d71bc1@mail.gmail.com>
Date:	Tue, 2 Jun 2009 11:12:45 +0100
From:	Antonio Almeida <vexwek@...il.com>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	Stephen Hemminger <shemminger@...tta.com>, netdev@...r.kernel.org,
	kaber@...sh.net, davem@...emloft.net, devik@....cz,
	Eric Dumazet <dada1@...mosbay.com>,
	Vladimir Ivashchenko <hazard@...ncoudi.com>
Subject: Re: [PATCH iproute2] Re: HTB accuracy for high speed

On Sat, May 30, 2009 at 9:07 PM, Jarek Poplawski wrote:
> Here is a tc patch, which should minimize these boundaries, so please,
> repeat this test with previous patches/conditions plus this one.
>
> Thanks,
> Jarek P.
> ---
>
>  tc/tc_core.c |   10 +++++-----
>  tc/tc_core.h |    4 ++--
>  2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tc/tc_core.c b/tc/tc_core.c
> index 9a0ff39..6d74287 100644
> --- a/tc/tc_core.c
> +++ b/tc/tc_core.c
> @@ -27,18 +27,18 @@
>  static double tick_in_usec = 1;
>  static double clock_factor = 1;
>
> -int tc_core_time2big(unsigned time)
> +int tc_core_time2big(double time)
>  {
> -       __u64 t = time;
> +       __u64 t;
>
> -       t *= tick_in_usec;
> +       t = time * tick_in_usec + 0.5;
>        return (t >> 32) != 0;
>  }
>
>
> -unsigned tc_core_time2tick(unsigned time)
> +unsigned tc_core_time2tick(double time)
>  {
> -       return time*tick_in_usec;
> +       return time * tick_in_usec + 0.5;
>  }
>
>  unsigned tc_core_tick2time(unsigned tick)
> diff --git a/tc/tc_core.h b/tc/tc_core.h
> index 5a693ba..0ac65aa 100644
> --- a/tc/tc_core.h
> +++ b/tc/tc_core.h
> @@ -13,8 +13,8 @@ enum link_layer {
>  };
>
>
> -int  tc_core_time2big(unsigned time);
> -unsigned tc_core_time2tick(unsigned time);
> +int  tc_core_time2big(double time);
> +unsigned tc_core_time2tick(double time);
>  unsigned tc_core_tick2time(unsigned tick);
>  unsigned tc_core_time2ktime(unsigned time);
>  unsigned tc_core_ktime2time(unsigned ktime);
>

I'm getting great values with this patch!

class htb 1:108 parent 1:10 leaf 108: prio 7 quantum 1514 rate
555000Kbit ceil 555000Kbit burst 70970b/8 mpu 0b overhead 0b cburst
70970b/8 mpu 0b overhead 0b level 0
 Sent 14270693572 bytes 17928007 pkt (dropped 12579262, overlimits 0 requeues 0)
 rate 552755Kbit 86802pps backlog 0b 127p requeues 0
 lended: 17927880 borrowed: 0 giants: 0
 tokens: -16095 ctokens: -16095

(for packets of 800 bytes)
I'll get back to you with more values.

  Antonio Almeida
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ