On Wed, 28 Feb 2007, Jarek Poplawski wrote:

> On 27-02-2007 16:50, Ilpo Järvinen wrote:
> > New sysctl tcp_frto_response is added to select amongst these
> ...
> > Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
> > @@ -762,15 +763,17 @@ __u32 tcp_init_cwnd(struct tcp_sock *tp,
> >  }
> >  
> >  /* Set slow start threshold and cwnd not falling to slow start */
> > -void tcp_enter_cwr(struct sock *sk)
> > +void tcp_enter_cwr(struct sock *sk, const int set_ssthresh)
> >  {
> >     struct tcp_sock *tp = tcp_sk(sk);
> > +   const struct inet_connection_sock *icsk = inet_csk(sk);
> >  
> >     tp->prior_ssthresh = 0;
> >     tp->bytes_acked = 0;
> >     if (inet_csk(sk)->icsk_ca_state < TCP_CA_CWR) {
> 
> -     if (inet_csk(sk)->icsk_ca_state < TCP_CA_CWR) {
> +     if (icsk->icsk_ca_state < TCP_CA_CWR) {
> 
> Probably something for the next "BTW".

These are going to 2.6.22, not to 2.6.21, see:
  http://marc.theaimsgroup.com/?l=linux-netdev&m=117213215924406&w=2
...or do you mean something else?

Since DaveM has already applied this, here is a patch with your correction 
alone on the top of tcp-2.6.

--
[PATCH] [TCP]: Complete icsk-to-local-variable change (in tcp_enter_cwr)

A local variable for icsk was created but this change was
missing. Spotted by Jarek Poplawski.

Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
---

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d6e1776..dc221a3 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -770,7 +770,7 @@ void tcp_enter_cwr(struct sock *sk, cons
 
        tp->prior_ssthresh = 0;
        tp->bytes_acked = 0;
-       if (inet_csk(sk)->icsk_ca_state < TCP_CA_CWR) {
+       if (icsk->icsk_ca_state < TCP_CA_CWR) {
                tp->undo_marker = 0;
                if (set_ssthresh)
                        tp->snd_ssthresh = icsk->icsk_ca_ops->ssthresh(sk);
-- 
1.4.2

Reply via email to