Re: [Qemu-devel] [PATCH v3 06/13] tap: Drop tap_can_send

2015-06-03 Thread Fam Zheng
On Tue, 06/02 17:21, Stefan Hajnoczi wrote: > On Tue, May 19, 2015 at 10:51:03AM +, Fam Zheng wrote: > > -while (qemu_can_send_packet(&s->nc)) { > > +while (true) { > > +bool can_send; > > uint8_t *buf = s->buf; > > > > +can_send = qemu_can_send_packet(&s->nc)

Re: [Qemu-devel] [PATCH v3 06/13] tap: Drop tap_can_send

2015-06-02 Thread Stefan Hajnoczi
On Tue, May 19, 2015 at 10:51:03AM +, Fam Zheng wrote: > -while (qemu_can_send_packet(&s->nc)) { > +while (true) { > +bool can_send; > uint8_t *buf = s->buf; > > +can_send = qemu_can_send_packet(&s->nc); > + > size = tap_read_packet(s->fd, s->buf, siz

[Qemu-devel] [PATCH v3 06/13] tap: Drop tap_can_send

2015-05-18 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be sent to peer when it arrives. If the device can't receive, it will be queued to incomi