From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: "Paul Barker" <paul.barker.ct@bp.renesas.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
"Geert Uytterhoeven" <geert+renesas@glider.be>
Cc: <netdev@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net 2/4] net: ravb: Allow RX loop to move past DMA mapping errors
Date: Thu, 11 Apr 2024 19:37:50 +0300 [thread overview]
Message-ID: <e7fea01d-d549-cd8c-8d7f-ed403ca980fa@omp.ru> (raw)
In-Reply-To: <20240411114434.26186-3-paul.barker.ct@bp.renesas.com>
On 4/11/24 2:44 PM, Paul Barker wrote:
> The RX loops in ravb_rx_gbeth() and ravb_rx_rcar() skip to the next loop
> interation if a zero-length descriptor is seen (indicating a DMA mapping
Iteration. :-)
> error). However, the current rx descriptor index `priv->cur_rx[q]` was
RX?
> incremented at the end of the loop and so would not be incremented when
> we skip to the next loop iteration. This would cause the loop to keep
> seeing the same zero-length descriptor instead of moving on to the next
> descriptor.
>
> As the loop counter `i` still increments, the loop would eventually
> terminate so there is no risk of being stuck here forever - but we
> should still fix this to avoid wasting cycles.
>
> To fix this, the rx descriptor index is incremented at the top of the
RX?
> loop, in the for statement itself. The assignments of `entry` and `desc`
> are brought into the loop to avoid the need for duplication.
>
> Fixes: d8b48911fd24 ("ravb: fix ring memory allocation")
> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
next prev parent reply other threads:[~2024-04-11 16:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 11:44 [PATCH net 0/4] ravb Ethernet driver bugfixes Paul Barker
2024-04-11 11:44 ` [PATCH net 1/4] net: ravb: Count packets instead of descriptors in R-Car RX path Paul Barker
2024-04-11 16:23 ` Sergey Shtylyov
2024-04-14 12:08 ` Niklas Söderlund
2024-04-15 7:04 ` Paul Barker
2024-04-15 9:44 ` Niklas Söderlund
2024-04-11 11:44 ` [PATCH net 2/4] net: ravb: Allow RX loop to move past DMA mapping errors Paul Barker
2024-04-11 16:37 ` Sergey Shtylyov [this message]
2024-04-14 12:17 ` Niklas Söderlund
2024-04-15 7:12 ` Paul Barker
2024-04-15 9:52 ` Niklas Söderlund
2024-04-11 11:44 ` [PATCH net 3/4] net: ravb: Fix GbEth jumbo packet RX checksum handling Paul Barker
2024-04-11 16:50 ` Sergey Shtylyov
2024-04-11 11:44 ` [PATCH net 4/4] net: ravb: Fix RX byte accounting for jumbo packets Paul Barker
2024-04-11 17:56 ` Sergey Shtylyov
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=e7fea01d-d549-cd8c-8d7f-ed403ca980fa@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=pabeni@redhat.com \
--cc=paul.barker.ct@bp.renesas.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
all inboxes | Powered by JetHome®