[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1229511143.13305.23.camel@nathan.suse.cz>
Date: Wed, 17 Dec 2008 11:52:23 +0100
From: Petr Tesarik <ptesarik@...e.cz>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Ilpo J??rvinen <ilpo.jarvinen@...sinki.fi>, davem@...emloft.net,
netdev@...r.kernel.org
Subject: Re: [PATCH] tcp: make urg+gso work for real this time
Herbert Xu píše v St 17. 12. 2008 v 21:42 +1100:
> On Wed, Dec 17, 2008 at 09:31:29PM +1100, Herbert Xu wrote:
> >
> > Oh I see what you mean now. Yes this isn't as easy as it appears.
>
> Reading RFC 793 again, it seems that what we're doing may not be
> correct. It would appear that the intention is to flag urgent mode
> as soon as urgent data appears from the user, regardless of whether
> it's 64K or more beyond the current sequence number.
>
> The fact that the pointer is 16 bits long is not an issue. We
> should setting it to 0xffff.
You might read it this way, but this would have some undesired
consequences in practise. Both Linux and *BSD interprets the offset as a
pointer to the first byte after the "out-of-band" data. So, they remove
the immediately preceding byte from the TCP stream (unless you set
MSG_OOB_INLINE, but that's not on by default).
Additionally, whenever the urgent pointer (the absolute offset in the
stream) changes, Linux (and maybe also *BSD -- not tested) sends a
SIGURG to the process.
In short, if you keep urg_ptr at 0xffff while moving forward in the
stream, the receiving side will interpret it as multiple urgent data.
Not quite what you want, I think.
Petr Tesarik
> The way we do it currently means that if there is loads of data
> in the pipe then we don't signal urgent mode at all until we're
> within 64K of snd.up, which defeats the whole point of urgent
> mode.
>
> Cheers,
--
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