public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that
  2001-02-05 23:15 TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that sexy?) Dan Kegel
@ 2001-02-05 23:20 ` Alan Cox
  2001-02-05 23:24   ` Dan Kegel
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alan Cox @ 2001-02-05 23:20 UTC (permalink / raw)
  To: dank; +Cc: Tony Finch, Linus Torvalds, linux-kernel@vger.kernel.org

> How close is TCP_NOPUSH to behaving identically to TCP_CORK now?
> If it does behave identically, it might be time to standardize
> the symbolic name for this option, to make apps more portable
> between the two OS's.  (It'd be nice to also standardize the
> numeric value, in the interest of making the ABI's more compatible, too.)

That one isnt practical because of the way the implementations handle 
boolean options. BSD uses bitmask based option setting for the basic
options and Linus uses switch statements
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that
  2001-02-05 23:20 ` TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that Alan Cox
@ 2001-02-05 23:24   ` Dan Kegel
  2001-02-05 23:49   ` Tony Finch
  2001-02-06 18:41   ` kuznet
  2 siblings, 0 replies; 7+ messages in thread
From: Dan Kegel @ 2001-02-05 23:24 UTC (permalink / raw)
  To: Alan Cox; +Cc: Tony Finch, Linus Torvalds, linux-kernel@vger.kernel.org

Alan Cox wrote:
> 
> > How close is TCP_NOPUSH to behaving identically to TCP_CORK now?
> > If it does behave identically, it might be time to standardize
> > the symbolic name for this option, to make apps more portable
> > between the two OS's.  (It'd be nice to also standardize the
> > numeric value, in the interest of making the ABI's more compatible, too.)
> 
> That one isnt practical because of the way the implementations handle
> boolean options. BSD uses bitmask based option setting for the basic
> options and Linus uses switch statements

OK, well, at least a common symbolic name could be chosen.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that
  2001-02-05 23:20 ` TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that Alan Cox
  2001-02-05 23:24   ` Dan Kegel
@ 2001-02-05 23:49   ` Tony Finch
  2001-02-06 18:41   ` kuznet
  2 siblings, 0 replies; 7+ messages in thread
From: Tony Finch @ 2001-02-05 23:49 UTC (permalink / raw)
  To: Alan Cox; +Cc: dank, Linus Torvalds, linux-kernel@vger.kernel.org, Tony Finch

Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> How close is TCP_NOPUSH to behaving identically to TCP_CORK now?
>> If it does behave identically, it might be time to standardize
>> the symbolic name for this option, to make apps more portable
>> between the two OS's.  (It'd be nice to also standardize the
>> numeric value, in the interest of making the ABI's more compatible, too.)
>
>That one isnt practical because of the way the implementations handle 
>boolean options. BSD uses bitmask based option setting for the basic
>options and Linus uses switch statements

No, that's only true for some of the socket-level options. For the TCP
options there isn't a direct correspondance between the option number
and the number of the flag in the PCB.

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
"Dead! And yet there he stands!"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that
  2001-02-05 23:20 ` TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that Alan Cox
  2001-02-05 23:24   ` Dan Kegel
  2001-02-05 23:49   ` Tony Finch
@ 2001-02-06 18:41   ` kuznet
  2 siblings, 0 replies; 7+ messages in thread
From: kuznet @ 2001-02-06 18:41 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Hello!

> > How close is TCP_NOPUSH to behaving identically to TCP_CORK now?

They have not so much of common.

TCP_NOPUSH enables T/TCP and its presense used to mean that
T/TCP is possible on this system. Linux headers cannot
even contain TCP_NOPUSH.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that
@ 2001-02-08  1:27 Dan Kegel
  2001-02-08  3:58 ` Tony Finch
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Kegel @ 2001-02-08  1:27 UTC (permalink / raw)
  To: kuznet, linux-kernel@vger.kernel.org, dot

Alexy wrote:

> > > How close is TCP_NOPUSH to behaving identically to TCP_CORK now? 
> 
> They have not so much of common. 
> 
> TCP_NOPUSH enables T/TCP and its presense used to mean that 
> T/TCP is possible on this system. Linux headers cannot 
> even contain TCP_NOPUSH.

But Tony Finch wrote:
> They are exactly the same. 

Alexy, Tony just checked in a change to FreeBSD to make TCP_NOPUSH behave the
same as TCP_CORK.

Tony, are people using the TCP_NOPUSH define as a way to detect
the presence of T/TCP support?  In that case, perhaps the right
thing to do to achieve source compatibility would be for FreeBSD
to also define TCP_CORK (and give it TCP_NOPUSH as a value, perhaps).

- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that
  2001-02-08  1:27 TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that Dan Kegel
@ 2001-02-08  3:58 ` Tony Finch
  2001-02-08 19:52   ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Finch @ 2001-02-08  3:58 UTC (permalink / raw)
  To: Dan Kegel; +Cc: kuznet, linux-kernel@vger.kernel.org, Tony Finch

Dan Kegel <dank@alumni.caltech.edu> wrote:
>
>Tony, are people using the TCP_NOPUSH define as a way to detect
>the presence of T/TCP support?

No, MSG_EOF is the right way to do that.

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
FAIR ISLE: WESTERLY VEERING NORTHERLY 4 OR 5. WINTRY SHOWERS. MAINLY GOOD.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that
  2001-02-08  3:58 ` Tony Finch
@ 2001-02-08 19:52   ` Linus Torvalds
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Torvalds @ 2001-02-08 19:52 UTC (permalink / raw)
  To: linux-kernel

In article <20010208035803.L74296@hand.dotat.at>,
Tony Finch  <dot@dotat.at> wrote:
>Dan Kegel <dank@alumni.caltech.edu> wrote:
>>
>>Tony, are people using the TCP_NOPUSH define as a way to detect
>>the presence of T/TCP support?
>
>No, MSG_EOF is the right way to do that.

However, I think ank is at least partially correct: TCP_NOPUSH has some
magic behaviour for sockets in listen state, and turns on at least some
T/TCP semantics, if I remember correctly. Tony?

If I remember correctly, may I suggest something: make a new BSD option
called (ehh, just random name ;) TCP_CORK, and make the old BSD
TCP_NOPUSH option be a superset of TCP_CORK that also turns on T/TCP on
listen sockets.

Linux TCP_CORK doesn't have anything to do with T/TCP (not surprisingly,
as T/TCP is considered a broken protocol in Linux and other circles).

And Linux TCP_CORK _is_ used on listen sockets: it makes sockets that
are accepted from the listen socket have the corking semantics. In
contrast, BSD TCP_NOPUSH, I think, has this overloading issue..

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-08 19:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-08  1:27 TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that Dan Kegel
2001-02-08  3:58 ` Tony Finch
2001-02-08 19:52   ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2001-02-05 23:15 TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that sexy?) Dan Kegel
2001-02-05 23:20 ` TCP_NOPUSH on FreeBSD, TCP_CORK on Linux (was: Is sendfile all that Alan Cox
2001-02-05 23:24   ` Dan Kegel
2001-02-05 23:49   ` Tony Finch
2001-02-06 18:41   ` kuznet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox