From: Finn Thain <fthain@telegraphics.com.au>
To: Jason Wang <jasowang@redhat.com>, qemu-devel@nongnu.org
Cc: "Aleksandar Rikalo" <aleksandar.rikalo@rt-rk.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Laurent Vivier" <laurent@vivier.eu>,
qemu-stable@nongnu.org
Subject: Re: [PATCH v2 13/13] dp8393x: Correctly advance RRP
Date: Sat, 21 Dec 2019 09:15:21 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LNX.2.21.1.1912210905360.8@nippy.intranet> (raw)
In-Reply-To: <05a689e082735b2ad972b3372ceeb7cfe47d4bd4.1576815466.git.fthain@telegraphics.com.au>
Please disregard this patch. An off-by-one bug was found in one of my
Linux sonic driver patches. When I fixed that bug, this patch (13/13) was
shown to be incorrect.
The Linux sonic driver patches are being tested on actual SONIC hardware
(Mac Centris 610). I will send v3 of this series after I've finished
debugging the Linux sonic driver.
On Fri, 20 Dec 2019, Finn Thain wrote:
> The last entry in the RRA is at the address given by the REA register.
> The address wrap-around logic is off-by-one entry. The last resource
> never gets used and RRP can jump over the RWP. The guest driver fails
> badly because the SONIC starts re-using old buffer addresses. Fix this.
>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
> ---
> hw/net/dp8393x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
> index bd92fa28f6..92a30f9f69 100644
> --- a/hw/net/dp8393x.c
> +++ b/hw/net/dp8393x.c
> @@ -340,7 +340,7 @@ static void dp8393x_do_read_rra(dp8393xState *s)
> s->regs[SONIC_RRP] += size;
>
> /* Handle wrap */
> - if (s->regs[SONIC_RRP] == s->regs[SONIC_REA]) {
> + if (s->regs[SONIC_RRP] == s->regs[SONIC_REA] + size) {
> s->regs[SONIC_RRP] = s->regs[SONIC_RSA];
> }
>
>
next prev parent reply other threads:[~2019-12-20 22:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 4:17 [PATCH v2 00/13] Fixes for DP8393X SONIC device emulation Finn Thain
2019-12-20 4:17 ` [PATCH v2 12/13] dp8393x: Always update RRA pointers and sequence numbers Finn Thain
2019-12-20 4:17 ` [PATCH v2 02/13] dp8393x: Clean up endianness hacks Finn Thain
2020-01-06 22:19 ` Finn Thain
2020-01-07 7:20 ` Philippe Mathieu-Daudé
2020-01-08 0:21 ` Finn Thain
2019-12-20 4:17 ` [PATCH v2 04/13] dp8393x: Update LLFA and CRDA registers from rx descriptor Finn Thain
2019-12-20 4:17 ` [PATCH v2 09/13] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode Finn Thain
2019-12-20 4:17 ` [PATCH v2 06/13] dp8393x: Implement packet size limit and RBAE interrupt Finn Thain
2019-12-20 4:17 ` [PATCH v2 11/13] dp8393x: Clear descriptor in_use field when necessary Finn Thain
2019-12-20 4:17 ` [PATCH v2 07/13] dp8393x: Don't stop reception upon RBE interrupt assertion Finn Thain
2019-12-20 4:17 ` [PATCH v2 03/13] dp8393x: Have dp8393x_receive() return the packet size Finn Thain
2019-12-20 4:17 ` [PATCH v2 08/13] dp8393x: Don't clobber packet checksum Finn Thain
2019-12-20 4:17 ` [PATCH v2 10/13] dp8393x: Pad frames to word or long word boundary Finn Thain
2019-12-20 4:17 ` [PATCH v2 05/13] dp8393x: Clear RRRA command register bit only when appropriate Finn Thain
2019-12-20 4:17 ` [PATCH v2 01/13] dp8393x: Mask EOL bit from descriptor addresses Finn Thain
2019-12-20 4:17 ` [PATCH v2 13/13] dp8393x: Correctly advance RRP Finn Thain
2019-12-20 22:15 ` Finn Thain [this message]
2019-12-20 10:16 ` [PATCH v2 00/13] Fixes for DP8393X SONIC device emulation Laurent Vivier
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=alpine.LNX.2.21.1.1912210905360.8@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=aleksandar.rikalo@rt-rk.com \
--cc=hpoussin@reactos.org \
--cc=jasowang@redhat.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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).