From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Nabih Estefan <nabihestefan@google.com>, peter.maydell@linaro.org
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, kfting@nuvoton.com,
wuhaotsh@google.com, jasowang@redhat.com,
avi.fishman@nuvoton.com, kwliu@nuvoton.com,
tomer.maimon@nuvoton.com, Hila.Miranda-Kuzi@nuvoton.com
Subject: Re: [PATCH v10 08/10] hw/net: GMAC Rx Implementation
Date: Tue, 9 Jan 2024 00:14:29 +0100 [thread overview]
Message-ID: <58a28201-7f26-4637-b311-4c291dd7aa7a@linaro.org> (raw)
In-Reply-To: <20240108222747.2453106-9-nabihestefan@google.com>
On 8/1/24 23:27, Nabih Estefan wrote:
> From: Nabih Estefan Diaz <nabihestefan@google.com>
>
> - Implementation of Receive function for packets
> - Implementation for reading and writing from and to descriptors in
> memory for Rx
>
> When RX starts, we need to flush the queued packets so that they
> can be received by the GMAC device. Without this it won't work
> with TAP NIC device.
>
> When RX descriptor list is full, it returns a DMA_STATUS for
> software to handle it. But there's no way to indicate the software has
> handled all RX descriptors and the whole pipeline stalls.
>
> We do something similar to NPCM7XX EMC to handle this case.
>
> 1. Return packet size when RX descriptor is full, effectively dropping
> these packets in such a case.
> 2. When software clears RX descriptor full bit, continue receiving
> further packets by flushing QEMU packet queue.
>
> Added relevant trace-events
>
> Change-Id: I132aa254a94cda1a586aba2ea33bbfc74ecdb831
> Signed-off-by: Hao Wu <wuhaotsh@google.com>
> Signed-off-by: Nabih Estefan <nabihestefan@google.com>
> Reviewed-by: Tyrone Ting <kfting@nuvoton.com>
> ---
> hw/net/npcm_gmac.c | 324 +++++++++++++++++++++++++++++++++++++++++++-
> hw/net/trace-events | 5 +
> 2 files changed, 327 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/npcm_gmac.c b/hw/net/npcm_gmac.c
> index 44c4ffaff4..54c8af3b41 100644
> --- a/hw/net/npcm_gmac.c
> +++ b/hw/net/npcm_gmac.c
> @@ -23,7 +23,11 @@
> #include "hw/registerfields.h"
> #include "hw/net/mii.h"
> #include "hw/net/npcm_gmac.h"
> +#include "linux/if_ether.h"
Still doesn't build on macOS:
[1215/1649] Compiling C object libcommon.fa.p/hw_net_npcm_gmac.c.o
../../hw/net/npcm_gmac.c:26:10: fatal error: 'linux/if_ether.h' file not
found
#include "linux/if_ether.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
FAILED: libcommon.fa.p/hw_net_npcm_gmac.c.o
next prev parent reply other threads:[~2024-01-08 23:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 22:27 [PATCH v10 00/10] Implementation of NPI Mailbox and GMAC Networking Module Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 01/10] hw/misc: Add Nuvoton's PCI Mailbox Module Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 02/10] hw/arm: Add PCI mailbox module to Nuvoton SoC Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 03/10] hw/misc: Add qtest for NPCM7xx PCI Mailbox Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 04/10] hw/net: Add NPCMXXX GMAC device Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 05/10] hw/arm: Add GMAC devices to NPCM7XX SoC Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 06/10] tests/qtest: Creating qtest for GMAC Module Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 07/10] include/hw/net: GMAC IRQ Implementation Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 08/10] hw/net: GMAC Rx Implementation Nabih Estefan
2024-01-08 23:14 ` Philippe Mathieu-Daudé [this message]
2024-01-08 22:27 ` [PATCH v10 09/10] hw/net: GMAC Tx Implementation Nabih Estefan
2024-01-08 22:27 ` [PATCH v10 10/10] tests/qtest: Adding PCS Module test to GMAC Qtest Nabih Estefan
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=58a28201-7f26-4637-b311-4c291dd7aa7a@linaro.org \
--to=philmd@linaro.org \
--cc=Hila.Miranda-Kuzi@nuvoton.com \
--cc=avi.fishman@nuvoton.com \
--cc=jasowang@redhat.com \
--cc=kfting@nuvoton.com \
--cc=kwliu@nuvoton.com \
--cc=nabihestefan@google.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=tomer.maimon@nuvoton.com \
--cc=wuhaotsh@google.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).