Re: TCP window updates [Was: PROBLEM: Sending mail-attachment]

Matthias Moeller (mattes@ice.robin.de)
Mon, 8 Mar 1999 15:48:36 +0100 (CET)


On Mon, 8 Mar 1999, Andrea Arcangeli wrote:

> + /*
> + * If needed advertise the new window also in the nonblocking
> + * case to allow the sender to make some progress while
> + * we'll return to userspace. -arca
> + */
> + cleanup_rbuf(sk, copied);
> +
> if (nonblock) {
> copied = -EAGAIN;
> break;
> }

This looks wrong. In nonblocking case the "break" exits the loop and
cleanup_rbuf() will be called then anyway. You probably overlooked that
there are 2 cleanup_rbuf() calls, one in the loop and one at the end
of the function.

> + * will avoid us to deadlock here. -arca
> + */
> + schedule_timeout(10*HZ);

What is this timeout supposed to do exactly?

Im missing a timeout at the senders side acording to RFC1122/4.2.3.4:

"To avoid a resulting
deadlock, it is necessary to have a timeout to force
transmission of data, overriding the SWS avoidance
algorithm. In practice, this timeout should seldom
occur."

Matthias

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