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-next>] [day] [month] [year] [list]
Date:	Thu, 17 Dec 2009 18:26:33 +0530
From:	Krishna Kumar2 <krkumar2@...ibm.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	davem@...emloft.net, mst@...hat.com, netdev@...r.kernel.org,
	Rusty Russell <rusty@...tcorp.com.au>,
	Sridhar Samudrala <sri@...ibm.com>
Subject: Re: [RFC PATCH] Regression in linux 2.6.32 virtio_net seen with	vhost-net

Herbert Xu <herbert@...dor.apana.org.au> wrote on 12/17/2009 06:01:53 PM:
>
> > On a (slightly) related note, qdisc_restart() has this code:
> >    /* Dequeue packet */
> >    skb = dequeue_skb(q);
> >    if (unlikely(!skb))
> >       return 0;
> >
> > When a txq is stopped, all subsequent dev_queue_xmits will
> > execute this path, pass the "unlikely" code, and return. Is
> > it reasonable to remove "unlikely" in both dequeue_skb and
> > qdisc_restart, if so patch inlined below:
>
> Why would it return skb == NULL? If the queue is stopped, then
> chances are packets will pile up in the qdisc so dequeue_skb
> should return a non-NULL skb.

Since dequeue_skb finds the first skb that was cached in gso_skb,
handles the stopped txq and returns NULL for all subsequent skbs.
And qdisc_restart bails out immediately. Only the first skb will
get requeue'd, and no more skbs are taken out of the queue -
either dequeue or gso_skb, till the driver restarts the queue.
That's why I think this code is not the issue, and probably as
optimized as possible for all cases.

I still feel the device is wrongly waking up the txq, and next
tx fails, driver stops the queue, and core does another requeue/sched,
and so on.

thanks,

- KK

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