* [Qemu-devel] [PATCH] eepro100: Frame Reception
@ 2016-08-23 16:46 Mateus Krepsky Ludwich
2016-09-07 0:39 ` Mateus Krepsky Ludwich
2016-09-22 2:02 ` Jason Wang
0 siblings, 2 replies; 3+ messages in thread
From: Mateus Krepsky Ludwich @ 2016-08-23 16:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Jason Wang
Changed E100 device so it updates EOF, F, and Actual Count fields of Receive
Frame Descriptor (RFD).
Assuming RFD.actual_count equals to size.
Signed-off-by: Mateus Krepsky Ludwich <mkludwich@gmail.com>
---
hw/net/eepro100.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index bab4dbf..c0f3816 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -1739,6 +1739,7 @@ static ssize_t nic_receive(NetClientState *nc,
const uint8_t * buf, size_t size)
&rx, sizeof(eepro100_rx_t));
uint16_t rfd_command = le16_to_cpu(rx.command);
uint16_t rfd_size = le16_to_cpu(rx.size);
+ uint16_t rfd_count = size | 0xc000 ; /* Setting EOF and F bits */
if (size > rfd_size) {
logout("Receive buffer (%" PRId16 " bytes) too small for data "
@@ -1756,6 +1757,8 @@ static ssize_t nic_receive(NetClientState *nc,
const uint8_t * buf, size_t size)
offsetof(eepro100_rx_t, status), rfd_status);
stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
offsetof(eepro100_rx_t, count), size);
+ stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
+ offsetof(eepro100_rx_t, count), rfd_count);
/* Early receive interrupt not supported. */
#if 0
eepro100_er_interrupt(s);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] eepro100: Frame Reception
2016-08-23 16:46 [Qemu-devel] [PATCH] eepro100: Frame Reception Mateus Krepsky Ludwich
@ 2016-09-07 0:39 ` Mateus Krepsky Ludwich
2016-09-22 2:02 ` Jason Wang
1 sibling, 0 replies; 3+ messages in thread
From: Mateus Krepsky Ludwich @ 2016-09-07 0:39 UTC (permalink / raw)
To: qemu-devel; +Cc: Jason Wang
Ping.
http://patchwork.ozlabs.org/patch/662355/
On Tue, Aug 23, 2016 at 1:46 PM, Mateus Krepsky Ludwich
<mkludwich@gmail.com> wrote:
> Changed E100 device so it updates EOF, F, and Actual Count fields of Receive
> Frame Descriptor (RFD).
> Assuming RFD.actual_count equals to size.
>
> Signed-off-by: Mateus Krepsky Ludwich <mkludwich@gmail.com>
> ---
> hw/net/eepro100.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
> index bab4dbf..c0f3816 100644
> --- a/hw/net/eepro100.c
> +++ b/hw/net/eepro100.c
> @@ -1739,6 +1739,7 @@ static ssize_t nic_receive(NetClientState *nc,
> const uint8_t * buf, size_t size)
> &rx, sizeof(eepro100_rx_t));
> uint16_t rfd_command = le16_to_cpu(rx.command);
> uint16_t rfd_size = le16_to_cpu(rx.size);
> + uint16_t rfd_count = size | 0xc000 ; /* Setting EOF and F bits */
>
> if (size > rfd_size) {
> logout("Receive buffer (%" PRId16 " bytes) too small for data "
> @@ -1756,6 +1757,8 @@ static ssize_t nic_receive(NetClientState *nc,
> const uint8_t * buf, size_t size)
> offsetof(eepro100_rx_t, status), rfd_status);
> stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
> offsetof(eepro100_rx_t, count), size);
> + stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
> + offsetof(eepro100_rx_t, count), rfd_count);
> /* Early receive interrupt not supported. */
> #if 0
> eepro100_er_interrupt(s);
> --
> 1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] eepro100: Frame Reception
2016-08-23 16:46 [Qemu-devel] [PATCH] eepro100: Frame Reception Mateus Krepsky Ludwich
2016-09-07 0:39 ` Mateus Krepsky Ludwich
@ 2016-09-22 2:02 ` Jason Wang
1 sibling, 0 replies; 3+ messages in thread
From: Jason Wang @ 2016-09-22 2:02 UTC (permalink / raw)
To: Mateus Krepsky Ludwich, qemu-devel
On 2016年08月24日 00:46, Mateus Krepsky Ludwich wrote:
> Changed E100 device so it updates EOF, F, and Actual Count fields of Receive
> Frame Descriptor (RFD).
Actual Count fields were updated before this patch I think?
> Assuming RFD.actual_count equals to size.
>
> Signed-off-by: Mateus Krepsky Ludwich <mkludwich@gmail.com>
> ---
> hw/net/eepro100.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
> index bab4dbf..c0f3816 100644
> --- a/hw/net/eepro100.c
> +++ b/hw/net/eepro100.c
> @@ -1739,6 +1739,7 @@ static ssize_t nic_receive(NetClientState *nc,
> const uint8_t * buf, size_t size)
> &rx, sizeof(eepro100_rx_t));
> uint16_t rfd_command = le16_to_cpu(rx.command);
> uint16_t rfd_size = le16_to_cpu(rx.size);
> + uint16_t rfd_count = size | 0xc000 ; /* Setting EOF and F bits */
>
> if (size > rfd_size) {
> logout("Receive buffer (%" PRId16 " bytes) too small for data "
> @@ -1756,6 +1757,8 @@ static ssize_t nic_receive(NetClientState *nc,
> const uint8_t * buf, size_t size)
> offsetof(eepro100_rx_t, status), rfd_status);
> stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
> offsetof(eepro100_rx_t, count), size);
Then this line can be removed, or what's maybe even better, you can just
reuse rfd_size.
> + stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
> + offsetof(eepro100_rx_t, count), rfd_count);
> /* Early receive interrupt not supported. */
> #if 0
> eepro100_er_interrupt(s);
We need a better title, e.g "Fixing EOF and F filed when updating RFD"
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-22 2:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 16:46 [Qemu-devel] [PATCH] eepro100: Frame Reception Mateus Krepsky Ludwich
2016-09-07 0:39 ` Mateus Krepsky Ludwich
2016-09-22 2:02 ` Jason Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.