[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine |
Date: |
Fri, 6 Mar 2020 13:08:53 +0000 |
On Tue, Mar 03, 2020 at 04:17:24PM +0530, P J P wrote:
> diff --git a/hw/net/tulip.c b/hw/net/tulip.c
> index fbe40095da..757f12c710 100644
> --- a/hw/net/tulip.c
> +++ b/hw/net/tulip.c
> @@ -229,6 +229,18 @@ static bool tulip_filter_address(TULIPState *s, const
> uint8_t *addr)
> return ret;
> }
>
> +static int
> +tulip_can_receive(NetClientState *nc)
> +{
> + TULIPState *s = qemu_get_nic_opaque(nc);
> +
> + if (s->rx_frame_len || tulip_rx_stopped(s)) {
> + return false;
> + }
> +
> + return true;
> +}
Are the required qemu_flush_queued_packets() calls in place so that
packet transfer wakes up again when .can_receive() transitions from
false to true?
(If qemu_flush_queued_packets() is missing then transmission hangs after
.can_receive() becomes false.)
Stefan
signature.asc
Description: PGP signature
- [PATCH v3 0/2] net: tulip: add checks to avoid OOB access, P J P, 2020/03/03
- [PATCH v3 1/2] net: tulip: check frame size and r/w data length, P J P, 2020/03/03
- [PATCH v3 2/2] net: tulip: add .can_recieve routine, P J P, 2020/03/03
- Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine,
Stefan Hajnoczi <=
- Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine, P J P, 2020/03/16
- Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine, Jason Wang, 2020/03/17
- Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine, P J P, 2020/03/17
- Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine, Jason Wang, 2020/03/17
- Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine, P J P, 2020/03/19
Re: [PATCH v3 0/2] net: tulip: add checks to avoid OOB access, no-reply, 2020/03/03
Re: [PATCH v3 0/2] net: tulip: add checks to avoid OOB access, no-reply, 2020/03/03
Re: [PATCH v3 0/2] net: tulip: add checks to avoid OOB access, no-reply, 2020/03/03
Re: [PATCH v3 0/2] net: tulip: add checks to avoid OOB access, no-reply, 2020/03/03