[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1012231002310.16569@pobox.suse.cz>
Date: Thu, 23 Dec 2010 10:03:18 +0100 (CET)
From: Jiri Kosina <jkosina@...e.cz>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Vojtech Pavlik <vojtech@...e.cz>,
Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
Subject: Re: [PATCH] tcp: cleanup of cwnd initialization in
tcp_init_metrics()
On Thu, 23 Dec 2010, Eric Dumazet wrote:
> Le mercredi 22 décembre 2010 à 19:39 +0100, Jiri Kosina a écrit :
> > Commit 86bcebafc5e7f5 ("tcp: fix >2 iw selection") fixed a case when
> > congestion window initialization has been mistakenly omitted by
> > introducing cwnd label and putting backwards jump from the end of the
> > function.
> >
> > This makes the code unnecessarily tricky to read and understand on a first
> > sight.
> >
> > Shuffle the code around a little bit to make it more obvious.
>
> Well in fine you have
>
> if (inet_csk(sk)->icsk_rto < TCP_TIMEOUT_INIT && !tp->rx_opt.saw_tstamp)
> goto reset;
> goto out;
> reset:
>
> Is that really more obvious ? ;)
To me it seems much more obvious than goto from the very end of the
function somewhere into the middle and returning from there, but
definitely a matter of personal taste.
--
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists