1. 12 6月, 2015 7 次提交
    • F
      main-loop: Drop qemu_set_fd_handler2 · 6484e422
      Fam Zheng 提交于
      All users are converted to qemu_set_fd_handler now, drop
      qemu_set_fd_handler2 and IOHandlerRecord.fd_read_poll.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-9-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      6484e422
    • F
      Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler · 82e1cc4b
      Fam Zheng 提交于
      Done with following Coccinelle semantic patch, plus manual cosmetic changes in
      net/*.c.
      
          @@
          expression E1, E2, E3, E4;
          @@
          -   qemu_set_fd_handler2(E1, NULL, E2, E3, E4);
          +   qemu_set_fd_handler(E1, E2, E3, E4);
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-8-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      82e1cc4b
    • F
      tap: Drop tap_can_send · a90a7425
      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 incoming_queue, and when the device status
      changes, this queue will be flushed.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-7-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a90a7425
    • F
      net/socket: Drop net_socket_can_send · 6e99c631
      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 incoming_queue, and when the device status
      changes, this queue will be flushed.
      
      If the peer is not ready, disable the read poll until send completes.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-6-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      6e99c631
    • F
      netmap: Drop netmap_can_send · e8dd1d9c
      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 copied from s->fd to s->iov when it arrives. If the
      device can't receive, it will be queued to incoming_queue, and when the
      device status changes, this queue will be flushed.
      
      Also remove the qemu_can_send_packet() check in netmap_send. If it's
      true, we are good; if it's false, the qemu_sendv_packet_async would
      return 0 and read poll will be disabled until netmap_send_completed is
      called.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-5-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e8dd1d9c
    • F
      l2tpv3: Drop l2tpv3_can_send · 95b1416a
      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 copied from s->fd to s->msgvec when it arrives. If the
      device can't receive, it will be queued to incoming_queue, and when the
      device status changes, this queue will be flushed.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-4-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      95b1416a
    • F
      stubs: Add qemu_set_fd_handler · 0bc12c4f
      Fam Zheng 提交于
      Some qemu_set_fd_handler2 stub callers will be converted to
      call qemu_set_fd_handler, add this stub for them before making the
      change.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-2-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      0bc12c4f
  2. 11 6月, 2015 33 次提交