pcnet: switch to use qemu_receive_packet() for loopback
PATCH 1/1 pcnet: switch to use qemu_receive_packet() for loopback
In reply to a message not in the archiveThis patch switches to use qemu_receive_packet() which can detect reentrancy and return early.
---
Here's another one, that looks like the same issue. -Alex
hw/net/pcnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/pcnet.c +1 -1
@@ -1250,7 +1250,7 @@ txagain:if (BCR_SWSTYLE (s) ==1 ) add_crc = !GET_FIELD (tmd.status,TMDS ,NOFCS ); s->looptest = add_crc ?PCNET_LOOPTEST_CRC :PCNET_LOOPTEST_NOCRC ; -pcnet_receive (qemu_get_queue (s->nic), s->buffer, s->xmit_pos); +qemu_receive_packet (qemu_get_queue (s->nic), s->buffer, s->xmit_pos); s->looptest =0 ; }else {if (s->nic) {
Signature · 1 line
2.28.0
Quoted 5 lines · Alexander Bulekov
This patch switches to use
qemu_receive_packet()which can detect reentrancy and return early.Signed-off-by Alexander Bulekov <[email protected]>
Quoted 7 lines
---
Here's another one, that looks like the same issue. -Alex
hw/net/pcnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 1/1 cadence_gem: switch to use qemu_receive_packet() for loopback
In reply to a message not in the archiveThis patch switches to use qemu_receive_packet() which can detect reentrancy and return early.
--- hw/net/cadence_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/cadence_gem.c +1 -1
@@ -1275,7 +1275,7 @@ static void gem_transmit(CadenceGEMState *s)/* Send the packet somewhere */ if (s->phy_loop || (s->regs[GEM_NWCTRL ] &GEM_NWCTRL_LOCALLOOP )) { -gem_receive (qemu_get_queue (s->nic), s->tx_packet, +qemu_receive_packet (qemu_get_queue (s->nic), s->tx_packet, total_bytes); }else { qemu_send_packet(qemu_get_queue(s->nic), s->tx_packet,
Signature · 1 line
2.28.0
PATCH 1/1 lan9118: switch to use qemu_receive_packet() for loopback
In reply to a message not in the archiveThis patch switches to use qemu_receive_packet() which can detect reentrancy and return early.
---
I think this is the last one that directly calls its own receive function to do loopback (or the last one within my grepping capapbilities).
-Alex
hw/net/lan9118.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/lan9118.c +1 -1
@@ -680,7 +680,7 @@ static void do_tx_packet(lan9118_state *s)/* FIXME: Honor TX disable, and allow queueing of packets. */ if (s->phy_control &0x4000 ) {/* This assumes the receive routine doesn't touch the VLANClient. */ -lan9118_receive (qemu_get_queue (s->nic), s->txp->data, s->txp->len); +qemu_receive_packet (qemu_get_queue (s->nic), s->txp->data, s->txp->len); }else {qemu_send_packet (qemu_get_queue (s->nic), s->txp->data, s->txp->len); }
Signature · 1 line
2.28.0
Re: [PATCH] cadence_gem: switch to use qemu_receive_packet() for loopback
In reply to Alexander BulekovQuoted 5 lines · Alexander Bulekov
This patch switches to use
qemu_receive_packet()which can detect reentrancy and return early.Signed-off-by Alexander Bulekov <[email protected]>
Alistair
Quoted 21 lines
--- hw/net/cadence_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/net/cadence_gem.c +1
-2@@ -1275,7 +1275,7 @@ static void gem_transmit(CadenceGEMState *s)/* Send the packet somewhere */ if (s->phy_loop || (s->regs[GEM_NWCTRL ] &GEM_NWCTRL_LOCALLOOP )) { -gem_receive (qemu_get_queue (s->nic), s->tx_packet, +qemu_receive_packet (qemu_get_queue (s->nic), s->tx_packet, total_bytes); }else { qemu_send_packet(qemu_get_queue(s->nic), s->tx_packet, --2.28.0