1. 17 1月, 2013 1 次提交
  2. 13 1月, 2013 1 次提交
  3. 19 12月, 2012 6 次提交
  4. 01 11月, 2012 1 次提交
    • S
      net: Reject non-netdevs in qmp_netdev_del() · 645c9496
      Stefan Hajnoczi 提交于
      The netdev_del command crashes when given a -net device, because it
      calls qemu_opts_del(NULL).
      
      Check that this is a -netdev before attempting to delete it and the
      QemuOpts.
      
      Note the subtle change from qemu_find_opts_err("netdev", errp) to
      qemu_find_opts_err("netdev", NULL).  Since "netdev" is a built in
      options group and we don't check for NULL return anyway, there's no use
      in passing errp here.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      645c9496
  5. 08 10月, 2012 1 次提交
    • P
      net: consolidate NetClientState header files into one · a245fc18
      Paolo Bonzini 提交于
      This patch doesn't seem much useful alone, I must admit.  However,
      it makes sense as part of the upcoming directory reorganization,
      where I want to have include/net/tap.h as the net<->hw interface
      for tap.  Then having both net/tap.h and include/net/tap.h does
      not work.  "Fixed" by moving all the init functions to a single
      header file net/clients.h.
      
      The patch also adopts a uniform style for including net/*.h files
      from net/*.c, without the net/ path.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@gmail.com>
      a245fc18
  6. 14 9月, 2012 2 次提交
    • S
      net: add receive_disabled logic to iov delivery path · c67f5dc1
      Stefan Hajnoczi 提交于
      This patch adds the missing NetClient->receive_disabled logic in the
      sendv delivery code path.  It seems that commit
      893379ef ("net: disable receiving if
      client returns zero") only added the logic to qemu_deliver_packet() and
      not qemu_deliver_packet_iov().
      
      The receive_disabled flag should be automatically set when .receive(),
      .receive_raw(), or .receive_iov() return 0.  No further packets will be
      delivered to the NetClient until the receive_disabled flag is cleared
      again by calling qemu_flush_queued_packets().
      
      Typically the NetClient will wait until its file descriptor becomes
      writable and then invoke qemu_flush_queued_packets() to resume
      transmission.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      c67f5dc1
    • P
      net: notify iothread after flushing queue · 987a9b48
      Paolo Bonzini 提交于
      virtio-net has code to flush the queue and notify the iothread
      whenever new receive buffers are added by the guest.  That is
      fine, and indeed we need to do the same in all other drivers.
      However, notifying the iothread should be work for the network
      subsystem.  And since we are at it we can add a little smartness:
      if some of the queued packets already could not be delivered,
      there is no need to notify the iothread.
      Reported-by: NLuigi Rizzo <rizzo@iet.unipi.it>
      Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Cc: Jan Kiszka <jan.kiszka@siemens.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NAmos Kong <akong@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      987a9b48
  7. 07 9月, 2012 1 次提交
  8. 03 8月, 2012 1 次提交
    • P
      Support 'help' as a synonym for '?' in command line options · c8057f95
      Peter Maydell 提交于
      For command line options which permit '?' meaning 'please list the
      permitted values', add support for 'help' as a synonym, by abstracting
      the check out into a helper function.
      
      This change means that in some cases where we were being lazy in
      our string parsing, "?junk" will now be rejected as an invalid option
      rather than being (undocumentedly) treated the same way as "?".
      
      Update the documentation to use 'help' rather than '?', since '?'
      is a shell metacharacter and thus prone to fail confusingly if there
      is a single character filename in the current working directory and
      the '?' has not been escaped. It's therefore better to steer users
      towards 'help', though '?' is retained for backwards compatibility.
      
      We do not, however, update the output of the system emulator's -help
      (or any documentation autogenerated from the qemu-options.hx which
      is the source of the -help text) because libvirt parses our -help
      output and will break. At a later date when QEMU provides a better
      interface so libvirt can avoid having to do this, we can update the
      -help text too.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c8057f95
  9. 01 8月, 2012 13 次提交
  10. 23 7月, 2012 4 次提交
  11. 08 6月, 2012 1 次提交
    • M
      change iov_* function prototypes to be more appropriate · dcf6f5e1
      Michael Tokarev 提交于
      Reorder arguments to be more natural, readable and
      consistent with other iov_* functions, and change
      argument names, from:
       iov_from_buf(iov, iov_cnt, buf, iov_off, size)
      to
       iov_from_buf(iov, iov_cnt, offset, buf, bytes)
      
      The result becomes natural English:
      
       copy data to this `iov' vector with `iov_cnt'
       elements starting at byte offset `offset'
       from memory buffer `buf', processing `bytes'
       bytes max.
      
      (Try to read the original prototype this way).
      
      Also change iov_clear() to more general iov_memset()
      (it uses memset() internally anyway).
      
      While at it, add comments to the header file
      describing what the routines actually does.
      
      The patch only renames argumens in the header, but
      keeps old names in the implementation.  The next
      patch will touch actual code to match.
      
      Now, it might look wrong to pay so much attention
      to so small things.  But we've so many badly designed
      interfaces already so the whole thing becomes rather
      confusing or error prone.  One example of this is
      previous commit and small discussion which emerged
      from it, with an outcome that the utility functions
      like these aren't well-understdandable, leading to
      strange usage cases.  That's why I paid quite some
      attention to this set of functions and a few
      others in subsequent patches.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      dcf6f5e1
  12. 05 6月, 2012 6 次提交
  13. 16 3月, 2012 1 次提交
  14. 04 2月, 2012 1 次提交