From: walter harms <wharms@bfs.de>
To: Richard Hartmann <richih.mailinglist@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-ppp@vger.kernel.org, erik_list@caneris.com
Subject: Re: [Patch] fix packet loss and massive ping spikes with PPP multi-link
Date: Fri, 28 May 2010 07:28:29 +0000 [thread overview]
Message-ID: <4BFF709D.5040005@bfs.de> (raw)
In-Reply-To: <AANLkTikeld4fbr9r1Sq0jhfkWxf0ZlwOsufUIRvb1rFH@mail.gmail.com>
Richard Hartmann schrieb:
> =It seems LKML & netdev were dropped from the To list, re-adding=
>
> Hi Walter,
>
>
>> if (ppp->rrsched % ppp->n_channels = i)
>>
>> since both do not change in that while() loop you can calculate in advance
>> perhaps ppp->rrsched %= ppp->n_channels before the while ?
>> (that would reduce my bad feels about variables that only increments also :)
>
> rrsched and i do change when appropriate. As they are used as a cheap
> way to get round robin, rrsched is not even initialized. One can argue
> that this should be done, but as it literally does not matter where the
> value starts counting....
>
yep,
the problem is that you will trigger a warning "variable uninitialised".
And as programmer you are trained to spot such kind of code.
in short you violated "the rule of least surprise", simply set it to 99
and add a comment that the value does not matter because it is actualy a
random seed.
Basicly the same reason for the ppp->rrsched %= ppp->n_channels outside
the loop. 1. people/compiler are happy because they see the variable
is used. 2. no need to recalculate the if in a loop (never trust optimisers).
/*
perhaps rr_chanel is a better name ? round robin channel
that would requiere the changes but explain what it actualy is
*/
>
>> btw: you are doing after loop() if(pch->chan = NULL) continue;
>> that means the else in the if below if (pch->chan) should never be reached.
>> Or is it likely that some channel will be dropped (?) ?
>
> Channels could be dropped and we need to guard against that.
>
please add a comment about that. i can garantee you someone will spot it
and remove either the pch->chan = NULL or the else.
just my 2 cents,
wh
>
>> btw: this is intentional ? looks strange
>>
>> if(ppp_ml_noexplode) {
>> + }
>> + else {
>
> Leftover from various printks for debugging reasons.
>
>
> Thanks for your feedback,
> Richard
>
prev parent reply other threads:[~2010-05-28 7:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 15:50 [Patch] fix packet loss and massive ping spikes with PPP multi-link Richard Hartmann
2010-03-26 15:58 ` [Patch] fix packet loss and massive ping spikes with PPP Alan Cox
2010-03-26 16:33 ` Joe Perches
2010-03-26 16:39 ` Richard Hartmann
2010-03-26 16:59 ` David Miller
2010-03-26 17:04 ` David Miller
2010-03-26 17:04 ` [Patch] fix packet loss and massive ping spikes with PPP multi-link James Carlson
2010-03-26 16:59 ` Alexander E. Patrakov
2010-03-26 17:04 ` [Patch] fix packet loss and massive ping spikes with PPP Alan Cox
2010-03-31 10:03 ` [Patch] fix packet loss and massive ping spikes with PPP multi-link Ben McKeegan
2010-05-29 2:16 ` [Patch] fix packet loss and massive ping spikes with PPP Paul Mackerras
2010-05-29 9:06 ` Richard Hartmann
2010-05-31 13:39 ` Richard Hartmann
2010-05-31 16:20 ` [Patch] fix packet loss and massive ping spikes with PPP multi-link Ben McKeegan
2010-06-02 14:55 ` Ben McKeegan
2010-06-02 15:04 ` [PATCH] ppp_generic: fix multilink fragment sizes Ben McKeegan
2010-06-02 15:17 ` Paoloni, Gabriele
2010-06-02 15:31 ` David Miller
2010-06-02 15:55 ` Ben McKeegan
2010-06-03 8:41 ` Paoloni, Gabriele
2010-06-03 9:14 ` Ben McKeegan
2010-11-08 14:05 ` [Patch] fix packet loss and massive ping spikes with PPP multi-link Richard Hartmann
2010-11-15 12:07 ` Richard Hartmann
2010-06-01 10:20 ` [Patch] fix packet loss and massive ping spikes with PPP Richard Hartmann
2010-06-01 11:18 ` [Patch] fix packet loss and massive ping spikes with PPP multi-link Ben McKeegan
2010-06-01 11:28 ` [Patch] fix packet loss and massive ping spikes with PPP Richard Hartmann
2010-06-01 22:15 ` David Miller
2010-03-31 9:01 ` Richard Hartmann
2010-05-25 9:52 ` Richard Hartmann
2010-05-25 10:18 ` [Patch] fix packet loss and massive ping spikes with PPP multi-link walter harms
2010-05-25 14:58 ` [Patch] fix packet loss and massive ping spikes with PPP Richard Hartmann
2010-05-25 17:30 ` [Patch] fix packet loss and massive ping spikes with PPP multi-link walter harms
2010-05-26 8:47 ` [Patch] fix packet loss and massive ping spikes with PPP Richard Hartmann
2010-05-28 7:28 ` walter harms [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BFF709D.5040005@bfs.de \
--to=wharms@bfs.de \
--cc=erik_list@caneris.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richih.mailinglist@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).