[PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback

Jason Wang posted 10 patches 4 years, 11 months ago
Maintainers: Alistair Francis <alistair@alistair23.me>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Jason Wang <jasowang@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback
Posted by Jason Wang 4 years, 11 months ago
From: Alexander Bulekov <alxndr@bu.edu>

This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.

Buglink: https://bugs.launchpad.net/qemu/+bug/1910826
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
---
 hw/net/rtl8139.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 4675ac878e..90b4fc63ce 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -1795,7 +1795,7 @@ static void rtl8139_transfer_frame(RTL8139State *s, uint8_t *buf, int size,
         }
 
         DPRINTF("+++ transmit loopback mode\n");
-        rtl8139_do_receive(qemu_get_queue(s->nic), buf, size, do_interrupt);
+        qemu_receive_packet(qemu_get_queue(s->nic), buf, size);
 
         if (iov) {
             g_free(buf2);
-- 
2.24.3 (Apple Git-128)


Re: [PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback
Posted by P J P 4 years, 11 months ago
+-- On Tue, 2 Mar 2021, Jason Wang wrote --+
|          DPRINTF("+++ transmit loopback mode\n");
| -        rtl8139_do_receive(qemu_get_queue(s->nic), buf, size, do_interrupt);
| +        qemu_receive_packet(qemu_get_queue(s->nic), buf, size);
|  
...
|[PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback

* Patch 'V2' need not be here.

Thank you.
--
 - P J P
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D


Re: [PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback
Posted by Jason Wang 4 years, 11 months ago
On 2021/3/2 2:39 下午, P J P wrote:
> +-- On Tue, 2 Mar 2021, Jason Wang wrote --+
> |          DPRINTF("+++ transmit loopback mode\n");
> | -        rtl8139_do_receive(qemu_get_queue(s->nic), buf, size, do_interrupt);
> | +        qemu_receive_packet(qemu_get_queue(s->nic), buf, size);
> |
> ...
> |[PATCH V2 7/7] rtl8193: switch to use qemu_receive_packet() for loopback
>
> * Patch 'V2' need not be here.
>
> Thank you.


Right, looks like a stale patch in the directory.

Will not apply this one when mergeing the series.

Thanks


> --
>   - P J P
> 8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D