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: P J P
Subject: Re: [PATCH v3 2/2] net: tulip: add .can_recieve routine
Date: Tue, 17 Mar 2020 16:19:02 +0530 (IST)

+-- On Tue, 17 Mar 2020, Jason Wang wrote --+
| > +-- On Fri, 6 Mar 2020, Stefan Hajnoczi wrote --+
| > | > +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;
| > | > +    }
|
| Btw, what's the point of checking rx_frame_len here?

tulip_can_recive() is called from tulip_receive(). IIUC non zero(0) 
'rx_frame_len' hints that s->rs_frame[] buffer still has unread data bytes and 
it can not receive new bytes. The check was earlier in tulip_receive().

Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D




reply via email to

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