1. 30 10月, 2012 5 次提交
  2. 18 10月, 2012 1 次提交
  3. 08 10月, 2012 1 次提交
  4. 28 9月, 2012 1 次提交
  5. 14 9月, 2012 1 次提交
  6. 01 8月, 2012 2 次提交
  7. 23 7月, 2012 1 次提交
  8. 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
  9. 22 5月, 2012 1 次提交
  10. 28 1月, 2012 2 次提交
  11. 21 8月, 2011 1 次提交
  12. 28 7月, 2011 1 次提交
  13. 18 7月, 2011 1 次提交
  14. 21 3月, 2011 1 次提交
    • P
      change all other clock references to use nanosecond resolution accessors · 74475455
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
              $(git grep -l 'qemu_get_clock\>' )
          sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
              $(git grep -l 'qemu_new_timer\>' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      
      There was exactly one false positive in qemu_run_timers:
      
           -    current_time = qemu_get_clock (clock);
           +    current_time = qemu_get_clock_ns (clock);
      
      which is of course not in this patch.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      74475455
  15. 04 3月, 2011 1 次提交
  16. 21 2月, 2011 1 次提交
  17. 02 2月, 2011 1 次提交
  18. 29 1月, 2011 1 次提交
    • A
      virtio-net: fix cross-endianness support · 44b15bc5
      Aurelien Jarno 提交于
      virtio-net used to work on cross-endianness configurations, but doesn't
      anymore with recent guest kernels, as the new features don't handle
      endianness correctly.
      
      This patch fixes wrong conversion, and add missing ones to make
      virtio-net working. Tested on the following configurations:
      - i386 guest on x86_64 host
      - ppc guest on x86_64 host
      - i386 guest on mips host
      - ppc guest on mips host
      
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      44b15bc5
  19. 10 1月, 2011 1 次提交
  20. 12 12月, 2010 1 次提交
  21. 09 12月, 2010 2 次提交
  22. 21 11月, 2010 1 次提交
  23. 07 10月, 2010 1 次提交
  24. 08 9月, 2010 4 次提交
    • A
      virtio-net: Introduce a new bottom half packet TX · a697a334
      Alex Williamson 提交于
      Based on a patch from Mark McLoughlin, this patch introduces a new
      bottom half packet transmitter that avoids the latency imposed by
      the tx_timer approach.  Rather than scheduling a timer when a TX
      packet comes in, schedule a bottom half to be run from the iothread.
      The bottom half handler first attempts to flush the queue with
      notification disabled (this is where we could race with a guest
      without txburst).  If we flush a full burst, reschedule immediately.
      If we send short of a full burst, try to re-enable notification.
      To avoid a race with TXs that may have occurred, we must then
      flush again.  If we find some packets to send, the guest it probably
      active, so we can reschedule again.
      
      tx_timer and tx_bh are mutually exclusive, so we can re-use the
      tx_waiting flag to indicate one or the other needs to be setup.
      This allows us to seamlessly migrate between timer and bh TX
      handling.
      
      The bottom half handler becomes the new default and we add a new
      tx= option to virtio-net-pci.  Usage:
      
      -device virtio-net-pci,tx=timer # select timer mitigation vs "bh"
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a697a334
    • A
      virtio-net: Rename tx_timer_active to tx_waiting · 4b4b8d36
      Alex Williamson 提交于
      De-couple this from the timer since we might want to use
      different backends to send the packet.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      4b4b8d36
    • A
      virtio-net: Limit number of packets sent per TX flush · e3f30488
      Alex Williamson 提交于
      If virtio_net_flush_tx() is called with notification disabled, we can
      race with the guest, processing packets at the same rate as they
      get produced.  The trouble is that this means we have no guaranteed
      exit condition from the function and can spend minutes in there.
      Currently flush_tx is only called with notification on, which seems
      to limit us to one pass through the queue per call.  An upcoming
      patch changes this.
      
      Also add an option to set this value on the command line as different
      workloads may wish to use different values.  We can't necessarily
      support any random value, so this is a developer option: x-txburst=
      Usage:
      
      -device virtio-net-pci,x-txburst=64 # 64 packets per tx flush
      
      One pass through the queue (256) seems to be a good default value
      for this, balancing latency with throughput.  We use a signed int
      for x-txburst because 2^31 packets in a burst would take many, many
      minutes to process and it allows us to easily return a negative
      value value from virtio_net_flush_tx() to indicate a back-off
      or error condition.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      e3f30488
    • A
      virtio-net: Make tx_timer timeout configurable · f0c07c7c
      Alex Williamson 提交于
      Add an option to make the TX mitigation timer adjustable as a device
      option.  The 150us hard coded default used currently is reasonable,
      but may not be suitable for all workloads, this gives us a way to
      adjust it using a single binary.  We can't support any random option
      though, so use the "x-" prefix to indicate this is a developer
      option.  Usage:
      
      -device virtio-net-pci,x-txtimer=500000,... # .5ms timeout
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      f0c07c7c
  25. 12 7月, 2010 1 次提交
  26. 06 7月, 2010 2 次提交
  27. 07 6月, 2010 1 次提交
    • M
      virtio-net: truncating packet · 940cda94
      Michael S. Tsirkin 提交于
      virtio net attempts to peek into virtio queue to
      determine that we have enough space for the complete
      packet to fit. However, it fails to account for space
      consumed by virtio net header when it does this,
      under stress this results in a failure
      with the message 'truncating packet'.
      
      redhat bz 591494.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      940cda94
  28. 02 6月, 2010 1 次提交
  29. 12 5月, 2010 1 次提交