From: Jochen Henneberg <jh@henneberg-systemdesign.com>
To: Piotr Raczynski <piotr.raczynski@intel.com>
Cc: netdev@vger.kernel.org,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Ong Boon Leong <boon.leong.ong@intel.com>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: stmmac: Premature loop termination check was ignored
Date: Tue, 14 Mar 2023 16:01:11 +0100 [thread overview]
Message-ID: <878rfzgysa.fsf@henneberg-systemdesign.com> (raw)
In-Reply-To: <ZBCIM//XkpFkiC4W@nimitz>
Piotr Raczynski <piotr.raczynski@intel.com> writes:
> On Tue, Mar 14, 2023 at 01:37:58PM +0100, Jochen Henneberg wrote:
>> The premature loop termination check makes sense only in case of the
>> jump to read_again where the count may have been updated. But
>> read_again did not include the check.
>
> Your commit titles and messages seems identical in both patches, someone
> may get confused, maybe you could change commit titles at least?
>
> Or since those are very related one liner fixes, maybe combine them into
> one?
I was told to split them into a series because the fixes apply to
different kernel versions.
>
> Also a question, since you in generally goto backwards here, is it guarded from
> an infinite loop (during some corner case scenario maybe)?
In theory I think this may happen, however, I would consider that to be
a different patch since it addresses a different issue.
>
> Other than that looks fine, thanks.
> Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
>
>>
>> Fixes: ec222003bd94 ("net: stmmac: Prepare to add Split Header support")
>> Signed-off-by: Jochen Henneberg <jh@henneberg-systemdesign.com>
>> ---
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> index e4902a7bb61e..ea51c7c93101 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> @@ -5221,10 +5221,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
>> len = 0;
>> }
>>
>> +read_again:
>> if (count >= limit)
>> break;
>>
>> -read_again:
>> buf1_len = 0;
>> buf2_len = 0;
>> entry = next_entry;
>> --
>> 2.39.2
>>
--
Henneberg - Systemdesign
Jochen Henneberg
Loehnfeld 26
21423 Winsen (Luhe)
--
Fon: +49 172 160 14 69
Url: https://www.henneberg-systemdesign.com
next prev parent reply other threads:[~2023-03-14 15:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 12:37 [PATCH net 0/2] net: stmmac: Premature loop termination check was ignored Jochen Henneberg
2023-03-14 12:37 ` [PATCH net 1/2] " Jochen Henneberg
2023-03-14 14:44 ` Piotr Raczynski
2023-03-14 15:01 ` Jochen Henneberg [this message]
2023-03-15 8:59 ` Piotr Raczynski
2023-03-15 9:13 ` Jochen Henneberg
2023-03-14 12:37 ` [PATCH net 2/2] " Jochen Henneberg
2023-03-16 7:59 ` [PATCH net V2 0/2] " Jochen Henneberg
2023-03-16 7:59 ` [PATCH net V2 1/2] net: stmmac: Premature loop termination check was ignored on rx Jochen Henneberg
2023-03-17 12:32 ` Piotr Raczynski
2023-03-18 5:21 ` Jakub Kicinski
2023-03-18 8:38 ` Jochen Henneberg
2023-03-19 2:01 ` Jakub Kicinski
2023-03-20 9:04 ` Jochen Henneberg
2023-03-20 18:36 ` Jakub Kicinski
2023-03-21 18:53 ` Jochen Henneberg
2023-03-16 7:59 ` [PATCH net V2 2/2] net: stmmac: Premature loop termination check was ignored on ZC rx Jochen Henneberg
2023-03-17 12:32 ` Piotr Raczynski
2023-03-16 23:20 ` [PATCH net V2 0/2] net: stmmac: Premature loop termination check was ignored Horatiu Vultur
2023-03-17 12:31 ` Piotr Raczynski
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=878rfzgysa.fsf@henneberg-systemdesign.com \
--to=jh@henneberg-systemdesign.com \
--cc=alexandre.torgue@foss.st.com \
--cc=boon.leong.ong@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=piotr.raczynski@intel.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).