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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1383239006.4857.84.camel@edumazet-glaptop.roam.corp.google.com>
Date:	Thu, 31 Oct 2013 10:03:26 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Vijay Subramanian <subramanian.vijay@...il.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net, shemminger@...tta.com,
	Mythili Prabhu <mysuryan@...co.com>,
	Dave Taht <dave.taht@...ferbloat.net>
Subject: Re: [PATCH v2 net-next] net: pkt_sched: PIE AQM scheme

On Wed, 2013-10-30 at 14:18 -0700, Vijay Subramanian wrote:


+       if (tb[TCA_PIE_TUPDATE]) {
+               /* tupdate is in us */
+               u32 tupdate = nla_get_u32(tb[TCA_PIE_TUPDATE]);
+               /* convert to pschedtime */
+               q->params.tupdate = PSCHED_NS2TICKS((u64) tupdate * NSEC_PER_USEC);
+       }

...

> +static void pie_timer(unsigned long arg)
> +{
> +	struct Qdisc *sch = (struct Qdisc *)arg;
> +	struct pie_sched_data *q = qdisc_priv(sch);
> +	u32 tup;
> +	spinlock_t *root_lock = qdisc_lock(qdisc_root_sleeping(sch));
> +
> +	spin_lock(root_lock);
> +	calculate_probability(sch);
> +
> +	/* reset the timer to fire after 'tupdate'. tupdate is currently in
> +	 * psched_time; mod_timer expects time to be in jiffies so convert from
> +	 * pschedtime to jiffies
> +	 */
> +	tup = PSCHED_TICKS2NS(q->params.tupdate);
> +	tup = tup / NSEC_PER_MSEC;
> +	tup = (tup * HZ) / MSEC_PER_SEC;
> +
> +	mod_timer(&q->adapt_timer, jiffies + tup);
> +	spin_unlock(root_lock);
> +
> +}

Oh well, this makes no sense.

mod_timer() resolution is in jiffies, so please maintains params.tupdate
in usec, and use usecs_to_jiffies()

	mod_timer(&q->adapt_timer, jiffies +
				   usecs_to_jiffies(q->params.tupdate));



--
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