+-- 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().