[PATCH 1/4] net: skb_orphan on dev_hard_start_xmit
David Miller
davem at davemloft.net
Mon Aug 17 21:47:12 EDT 2009
From: Herbert Xu <herbert at gondor.apana.org.au>
Date: Sun, 5 Jul 2009 11:34:08 +0800
> Here's an even crazier idea that doesn't use dummy descriptors.
>
> xmit(skb)
>
> if (TX queue contains no interrupting descriptor &&
> qdisc is empty)
> mark TX descriptor as interrupting
>
> if (TX queue now contains an interrupting descriptor &&
> qdisc len < 2)
> stop queue
>
> if (TX ring full)
> stop queue
>
> clean()
>
> do work
> wake queue as per usual
I'm pretty sure that for normal TCP and UDP workloads, this is just
going to set the interrupt bit on the first packet that gets into the
queue, and then not in the rest.
TCP just loops over packets in the send queue, and at initial state
the qdisc will be empty.
It's very hard to get this to work as well as if we had a real
queue empty interrupt status event.
Even if you get upstream status from the protocols saying "there's
more packets coming" via some flag in the SKB, that only says what one
client feeding the TX ring is about to do.
It says nothing about other threads of control which are about to start
feeding packets to the same device.
More information about the libertas-dev
mailing list