public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public•gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public•gmane.org>
Cc: herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public•gmane.org,
	mb-fseUSCV1ubazQB+pC5nmwQ@public•gmane.org,
	johannes-cdvu00un1VgdHxzADdlk8Q@public•gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	ron.rindjunsky-ral2JQCrhuEAvxtiuMwx3w@public•gmane.org,
	tomasw-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org,
	ivdoorn-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org,
	peter.p.waskiewicz.jr-ral2JQCrhuEAvxtiuMwx3w@public•gmane.org
Subject: Re: [PATCH] mac80211: rewrite fragmentation code
Date: Fri, 16 May 2008 20:32:48 +1000	[thread overview]
Message-ID: <200805162032.48469.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20080515.215823.28841530.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Friday 16 May 2008 14:58:23 David Miller wrote:
> From: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public•gmane.org>
> Date: Fri, 16 May 2008 12:01:48 +1000
>
> > Dave, please allow me to ask a heretical question.  Returning
> > TX_BUSY has some appeal for virtio_net: is it fundamentally a flawed
> > idea, or simply a matter of coding?
>
> Allowing TX_BUSY adds a special case to the caller which we'd
> like to remove at some point.
>
> > Currently we have no virtio interface to ask how many descriptors are
> > left; it's not clear that it's a fair question to ask, since for Xen it's
> > depends on the actual buffers we're trying to put in the descirptors.
>
> Two things:
>
> 1) You can always make sure that you have enough space for a
>    TSO frame, with arbitrary page boundaries and thus buffer
>    chopping.
>
>    It can even be estimated, and if violated by some corner case
>    you can punt and drop.

Yes, this is what we'd have to do.  Wasting room in the ring feels wrong 
though.

> 2) You can queue inside of the driver one packet when you hit
>    the limits unexpectedly, netif_stop_queue(), and return
>    success.  Spit this packet out right before waking the
>    queue again.

I put a patch in to do exactly that at Herbert's prompting, for 2.6.26, but 
it's buggy in (at least) two ways.  I have a fix for this, which adds a new 
tasklet to xmit the packet.  There's still some subtle race, however, since 
I'm still seeing a stuck packet.  I'll have to revert to TX_BUSY for 2.6.26 
if I can't find it (unlikely).

And I haven't measured what it does to performance (should be OK, but still).

> Really, there are no hard reasons to ever return TX_BUSY,
> it's always a bug.

But it's *simple*, and seems like a common thing to want.  Why not change 
everything to use TX_BUSY and rip out the guestimate/buffering hacks?

> In fact, I want to move things more and more towards the driver
> queueing TX packets internally instead of the networking mid-layer.
>
> That will ahve benefits for things like TX multiqueue, we won't
> need any locking at all, nor have any knowledge about multiple
> queues at all, if the driver takes care of providing the buffer
> between what the kernel gives it and what the device can handle
> at the moment.

That would be great: then I could shove the packet back on the queue myself 
and not have to ask you about it.  It's adding a *second* queue inside the 
driver which feels terribly ugly...

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-05-16 10:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 12:40 [RFC/RFT 0/4] mac80211 QoS-related enhancements Johannes Berg
2008-04-30 12:40 ` [RFC/RFT 1/4] mac80211: use rate index in TX control Johannes Berg
2008-04-30 12:40 ` [RFC/RFT 2/4] GSO: generalize for mac80211 Johannes Berg
     [not found]   ` <20080430130049.359549000-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2008-05-06 16:12     ` Johannes Berg
2008-04-30 12:40 ` [RFC/RFT 3/4] mac80211: use GSO for fragmentation Johannes Berg
2008-05-07  7:10   ` Herbert Xu
2008-05-07  8:50     ` Johannes Berg
2008-05-07  9:00       ` Herbert Xu
     [not found]         ` <20080507090040.GA25186-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-07 11:22           ` [PATCH] mac80211: rewrite fragmentation code Johannes Berg
     [not found]             ` <1210159339.5642.13.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-07 11:41               ` Herbert Xu
2008-05-07 11:52                 ` Johannes Berg
     [not found]                   ` <1210161133.5642.19.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-07 13:05                     ` Herbert Xu
     [not found]                       ` <20080507130548.GA26977-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-07 13:48                         ` Michael Buesch
2008-05-08  3:22                           ` Herbert Xu
     [not found]                             ` <20080508032208.GA401-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-08  3:26                               ` David Miller
     [not found]                                 ` <20080507.202606.242037993.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-08  9:00                                   ` Johannes Berg
2008-05-16  2:01                                   ` Rusty Russell
2008-05-16  3:28                                     ` Herbert Xu
2008-05-16  4:58                                     ` David Miller
     [not found]                                       ` <20080515.215823.28841530.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-16 10:32                                         ` Rusty Russell [this message]
     [not found]                                           ` <200805162032.48469.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2008-05-16 10:38                                             ` Johannes Berg
2008-05-16 12:15                                           ` Herbert Xu
2008-05-16 19:40                                           ` David Miller
     [not found]                                             ` <20080516.124039.253626477.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-19  3:08                                               ` Rusty Russell
2008-05-19  7:03                                                 ` David Miller
2008-05-08 13:00                             ` Michael Buesch
     [not found]                               ` <200805081500.00682.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2008-05-08 13:08                                 ` Herbert Xu
2008-05-08 13:13                                   ` Michael Buesch
2008-05-08 13:15                                     ` Michael Buesch
     [not found]                                     ` <200805081513.56521.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2008-05-08 13:32                                       ` Herbert Xu
2008-05-07 19:19                         ` Johannes Berg
2008-04-30 12:40 ` [RFC/RFT 4/4] mac80211: use multi-queue master netdevice Johannes Berg
     [not found]   ` <20080430130051.397094000-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2008-04-30 14:37     ` Ivo van Doorn
     [not found]       ` <200804301637.35170.IvDoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-04-30 14:45         ` Johannes Berg
     [not found]           ` <1209566743.18659.30.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-04-30 15:00             ` Johannes Berg
     [not found]               ` <1209567609.18659.33.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-04-30 15:34                 ` Ivo van Doorn
2008-04-30 15:38                   ` Johannes Berg
2008-05-01  8:21                 ` Ivo van Doorn
     [not found]                   ` <200805011021.04435.IvDoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-05-01  8:54                     ` Johannes Berg
2008-04-30 19:39     ` Waskiewicz Jr, Peter P
     [not found]       ` <D5C1322C3E673F459512FB59E0DDC32904FE144F-O6kdQIuPh0Q64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-04-30 20:07         ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805162032.48469.rusty@rustcorp.com.au \
    --to=rusty-8n+1lvoiyb80n/f98k4iww@public$(echo .)gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public$(echo .)gmane.org \
    --cc=herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public$(echo .)gmane.org \
    --cc=ivdoorn-Re5JQEeQqe8AvxtiuMwx3w@public$(echo .)gmane.org \
    --cc=johannes-cdvu00un1VgdHxzADdlk8Q@public$(echo .)gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=mb-fseUSCV1ubazQB+pC5nmwQ@public$(echo .)gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=peter.p.waskiewicz.jr-ral2JQCrhuEAvxtiuMwx3w@public$(echo .)gmane.org \
    --cc=ron.rindjunsky-ral2JQCrhuEAvxtiuMwx3w@public$(echo .)gmane.org \
    --cc=tomasw-Re5JQEeQqe8AvxtiuMwx3w@public$(echo .)gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox