Hi,
here an idea, how we might get rid of the nasty divide:
Stephen Hemminger wrote:
> +/* RFC2861 Check whether we are limited by application or congestion
> window + * This is the inverse of tcp_tso_should_defer
> + */
> +static inline int tcp_cwnd_full(const struct tcp_sock *tp, u32 in_flight,
> + u32 ack_seq)
> +{
> + u32 left;
> +
> + if (in_flight >= tp->snd_cwnd)
> + return 1;
> +
> + left = tp->snd_cwnd - in_flight;
> + if (sysctl_tcp_tso_win_divisor)
> + return left < tp->snd_cwnd / sysctl_tcp_tso_win_divisor;
return (left * sysctl_tcp_tso_win_divisor) < tp->snd_cwnd;
> + else
> + return left <= tcp_max_burst(tp);
> +}
But now we might have overflow issues[1].
Regards
Ingo Oeser
[1] Taking care of that is left as an exercise to the reader :-)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html