1. 09 6月, 2009 6 次提交
    • M
      net: add qemu_send_packet_async() · f3b6c7fc
      Mark McLoughlin 提交于
      Add a qemu_send_packet() variant which will queue up the packet
      if it cannot be sent when all client queues are full. It later
      invokes the supplied callback when the packet has been sent.
      
      If qemu_send_packet_async() returns zero, the caller is expected
      to not send any more packets until the queued packet has been
      sent.
      
      Packets are queued iff a receive() handler returns zero (indicating
      queue full) and the caller has provided a sent notification callback
      (indicating it will stop and start its own queue).
      
      We need the packet sending API to support queueing because:
      
        - a sending client should process all available packets in one go
          (e.g. virtio-net emptying its tx ring)
      
        - a receiving client may not be able to handle the packet
          (e.g. -EAGAIN from write() to tapfd)
      
        - the sending client could detect this condition in advance
          (e.g. by select() for writable on tapfd)
      
        - that's too much overhead (e.g. a select() call per packet)
      
        - therefore the sending client must handle the condition by
          dropping the packet or queueing it
      
        - dropping packets is poor form; we should queue.
      
      However, we don't want queueing to be completely transparent. We
      want the sending client to stop sending packets as soon as a
      packet is queued. This allows the sending client to be throttled
      by the receiver.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      f3b6c7fc
    • M
      net: add return value to packet receive handler · 4f1c942b
      Mark McLoughlin 提交于
      This allows us to handle queue full conditions rather than dropping
      the packet on the floor.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      4f1c942b
    • M
      net: pass VLANClientState* as first arg to receive handlers · e3f5ec2b
      Mark McLoughlin 提交于
      Give static type checking a chance to catch errors.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      e3f5ec2b
    • M
      net: re-name vc->fd_read() to vc->receive() · cda9046b
      Mark McLoughlin 提交于
      VLANClientState's fd_read() handler doesn't read from file
      descriptors, it adds a buffer to the client's receive queue.
      
      Re-name the handlers to make things a little less confusing.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      cda9046b
    • M
      net: add fd_readv() handler to qemu_new_vlan_client() args · 463af534
      Mark McLoughlin 提交于
      This, apparently, is the style we prefer - all VLANClientState
      should be an argument to qemu_new_vlan_client().
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      463af534
    • J
      net: Improve parameter error reporting · 10ae5a7a
      Jan Kiszka 提交于
      As host network devices can also be instantiated via the monitor, errors
      should then be reported to the related monitor instead of stderr. This
      requires larger refactoring, so this patch starts small with introducing
      a helper to catch both cases and convert net_client_init as well as
      net_slirp_redir.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      10ae5a7a
  2. 27 5月, 2009 1 次提交
  3. 15 5月, 2009 1 次提交
  4. 22 4月, 2009 2 次提交
  5. 18 4月, 2009 1 次提交
  6. 06 3月, 2009 1 次提交
    • A
      monitor: Rework API (Jan Kiszka) · 376253ec
      aliguori 提交于
      Refactor the monitor API and prepare it for decoupled terminals:
      term_print functions are renamed to monitor_* and all monitor services
      gain a new parameter (mon) that will once refer to the monitor instance
      the output is supposed to appear on. However, the argument remains
      unused for now. All monitor command callbacks are also extended by a mon
      parameter so that command handlers are able to pass an appropriate
      reference to monitor output services.
      
      For the case that monitor outputs so far happen without clearly
      identifiable context, the global variable cur_mon is introduced that
      shall once provide a pointer either to the current active monitor (while
      processing commands) or to the default one. On the mid or long term,
      those use case will be obsoleted so that this variable can be removed
      again.
      
      Due to the broad usage of the monitor interface, this patch mostly deals
      with converting users of the monitor API. A few of them are already
      extended to pass 'mon' from the command handler further down to internal
      functions that invoke monitor_printf.
      
      At this chance, monitor-related prototypes are moved from console.h to
      a new monitor.h. The same is done for the readline API.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
      376253ec
  7. 11 2月, 2009 4 次提交
  8. 14 1月, 2009 1 次提交
  9. 09 1月, 2009 2 次提交
  10. 08 1月, 2009 4 次提交
  11. 19 12月, 2008 1 次提交
  12. 18 12月, 2008 1 次提交
  13. 01 11月, 2008 1 次提交
  14. 29 9月, 2008 1 次提交
  15. 30 7月, 2008 1 次提交
  16. 18 7月, 2008 1 次提交
  17. 18 11月, 2007 1 次提交