From: Stephen Hemminger Date: Mon, 04 Apr 2005 18:00:36 +0000 Subject: Re: [LARTC] netem with prio hangs on duplicate Message-Id: <20050404110036.1d76e9c1@dxpl.pdx.osdl.net> List-Id: References: <20050330180504.75838.qmail@web41523.mail.yahoo.com> In-Reply-To: <20050330180504.75838.qmail@web41523.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On Wed, 30 Mar 2005 10:05:04 -0800 (PST) js si wrote: > hi > > i tried the example given on the examples page to > duplicate selected traffic like > > tc qdisc add dev eth0 root handle 1: prio > tc qdisc add dev eth0 parent 1:3 handle 3: netem > duplicate 40% > tc filter add dev eth0 protocol ip parent 1:0 prio 3 > u32 match ip dst 11.0.2.2 flowid 1:3 > Try this. qdisc_restart() has a bug. It will spin until packet becomes available, which is wrong. This effects both netem and tbf, maybe other qdisc as well. --- linux-2.6/net/sched/sch_generic.c 2005-03-14 14:30:52.000000000 -0800 +++ tcp-2.6/net/sched/sch_generic.c 2005-04-04 10:28:31.000000000 -0700 @@ -176,10 +176,10 @@ int qdisc_restart(struct net_device *dev requeue: q->ops->requeue(skb, q); - netif_schedule(dev); - return 1; + netif_schedule(dev); + return q->q.qlen; } - return q->q.qlen; + return 0; } static void dev_watchdog(unsigned long arg) _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc