qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]