From: Jakub Kicinski <kuba@kernel.org>
To: Ingo Rohloff <ingo.rohloff@lauterbach.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Lars-Peter Clausen <lars@metafoo.de>
Cc: robert.hancock@calian.com, Nicolas.Ferre@microchip.com,
claudiu.beznea@microchip.com, davem@davemloft.net,
netdev@vger.kernel.org, tomas.melin@vaisala.com
Subject: Re: [PATCH 0/1] Alternative, restart tx after tx used bit read
Date: Tue, 11 Apr 2023 19:07:15 -0700 [thread overview]
Message-ID: <20230411190715.6eefb4fa@kernel.org> (raw)
In-Reply-To: <20230407213349.8013-1-ingo.rohloff@lauterbach.com>
On Fri, 7 Apr 2023 23:33:48 +0200 Ingo Rohloff wrote:
> Analysis:
> Commit 404cd086f29e867f ("net: macb: Allocate valid memory for TX and RX BD
> prefetch") mentions:
>
> GEM version in ZynqMP and most versions greater than r1p07 supports
> TX and RX BD prefetch. The number of BDs that can be prefetched is a
> HW configurable parameter. For ZynqMP, this parameter is 4.
>
> I think what happens is this:
> Example Scenario (SW == linux kernel, HW == cadence ethernet IP).
> 1) SW has written TX descriptors 0..7
> 2) HW is currently transmitting TX descriptor 6.
> HW has already prefetched TX descriptors 6,7,8,9.
> 3) SW writes TX descriptor 8 (clearing TX_USED)
> 4) SW writes the TSTART bit.
> HW ignores this, because it is still transmitting.
> 5) HW transmits TX descriptor 7.
> 6) HW reaches descriptor 8; because this descriptor
> has already been prefetched, HW sees a non-active
> descriptor (TX_USED set) and stops transmitting.
This sounds broken, any idea if this is how the IP is supposed to work
or it may be an integration issue in Zynq? The other side of this
question is how expensive the workaround is - a spin lock and two extra
register reads on completion seems like a lot.
Roman, Lars, have you seen Tx stalls on your macb setups?
next prev parent reply other threads:[~2023-04-12 2:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 10:02 [PATCH v3] net: macb: restart tx after tx used bit read Claudiu.Beznea
2018-12-17 10:14 ` Nicolas.Ferre
2018-12-18 23:58 ` David Miller
2022-03-23 8:08 ` Tomas Melin
2022-03-23 15:43 ` Jakub Kicinski
2022-03-23 16:42 ` Robert Hancock
2022-03-25 7:10 ` Tomas Melin
2022-03-25 8:13 ` Claudiu.Beznea
2022-03-25 9:33 ` Tomas Melin
2023-04-07 21:33 ` [PATCH 0/1] Alternative, " Ingo Rohloff
2023-04-07 21:33 ` [PATCH 1/1] net: macb: A different way to restart a stuck TX descriptor ring Ingo Rohloff
2023-04-11 15:25 ` Jesse Brandeburg
2023-04-10 17:05 ` [PATCH 0/1] Alternative, restart tx after tx used bit read Robert Hancock
2023-04-12 2:07 ` Jakub Kicinski [this message]
2023-04-12 3:17 ` Lars-Peter Clausen
2023-04-12 3:43 ` Roman Gushchin
2023-04-21 13:00 ` [PATCH v2 0/1] net: macb: Avoid erroneously stopped TX ring Ingo Rohloff
2023-04-21 13:00 ` [PATCH v2 1/1] " Ingo Rohloff
2023-04-22 2:57 ` Jakub Kicinski
2023-04-12 6:27 ` [PATCH 0/1] Alternative, restart tx after tx used bit read Tomas Melin
2023-04-12 16:17 ` Robert Hancock
2023-04-24 8:54 ` Claudiu.Beznea
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=20230411190715.6eefb4fa@kernel.org \
--to=kuba@kernel.org \
--cc=Nicolas.Ferre@microchip.com \
--cc=claudiu.beznea@microchip.com \
--cc=davem@davemloft.net \
--cc=ingo.rohloff@lauterbach.com \
--cc=lars@metafoo.de \
--cc=netdev@vger.kernel.org \
--cc=robert.hancock@calian.com \
--cc=roman.gushchin@linux.dev \
--cc=tomas.melin@vaisala.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).