netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* TCP_CORK questions
@ 2011-11-02  9:43 Mihai Maruseac
  0 siblings, 0 replies; only message in thread
From: Mihai Maruseac @ 2011-11-02  9:43 UTC (permalink / raw)
  To: kernelnewbies; +Cc: netdev

Hi,

We are using TCP_CORK with TCP_NODELAY. We are setting TCP_NODELAY
first and then setting TCP_CORK before sending a bunch of data
buffers. After sending all the buffers we are clearing TCP_CORK. The
expectation -- as per manpage -- is that when TCP_CORK is set small
data packets will not be sent. When TCP_CORK is removed it will
immediately send out the remaining data even if the remaining amount
is very small.

However, this is not the observed behavior. Small packets are sent at
an approximatively constant rate. Digging further into the manpage for
tcp we saw that there is a 200ms ceiling on the time for which the
output is corked. Can we change this limit somehow? Ideally, in our
case we would like to have userspace mark a socket such that it will
only send full packets as long as it is marked, even if the completion
comes after a long time.

Digging into tcp.c when the socket options are set, we found that if
when setting TCP_NAGLE_CORK we also disable TCP_NAGLE_PUSH the code
works as intended. Is this the right way to solve it? Code comments
suggest that disabling this flag there has no effect.

Thanks,
Mihai

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-02  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-02  9:43 TCP_CORK questions Mihai Maruseac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).