1. 01 10月, 2009 1 次提交
  2. 12 9月, 2009 1 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f
  3. 11 9月, 2009 1 次提交
  4. 05 9月, 2009 1 次提交
  5. 04 9月, 2009 3 次提交
  6. 24 8月, 2009 1 次提交
  7. 11 8月, 2009 1 次提交
  8. 28 7月, 2009 3 次提交
  9. 27 7月, 2009 1 次提交
  10. 17 7月, 2009 1 次提交
  11. 16 7月, 2009 1 次提交
  12. 10 7月, 2009 2 次提交
    • M
      Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied · d026fb6d
      Mark McLoughlin 提交于
      If no tap,sndbuf= arg is supplied, we use a default value. If
      TUNSETSNDBUF fails in this case, we should not abort.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d026fb6d
    • M
      net: set a default value for sndbuf= · fc5b81d1
      Mark McLoughlin 提交于
      On reflection, perhaps it does make sense to set a default value for
      the sndbuf= tap parameter.
      
      For best effect, sndbuf= should be set to just below the capacity of
      the physical NIC.
      
      Setting it higher will cause packets to be dropped before the limit
      is hit. Setting it much lower will not cause any problems unless
      you set it low enough such that the guest cannot queue up new packets
      before the NIC has emptied its queue.
      
      In Linux, txqueuelen=1000 by default for ethernet NICs. Given a 1500
      byte MTU, 1Mb is a good choice for sndbuf.
      
      If it turns out that txqueuelen is actually much lower than this, then
      sndbuf is essentially disabled. In the event that txqueuelen is much
      higher, it's unlikely that the NIC will be able to empty a 1Mb queue.
      
      Thanks to Herbert Xu for this logic.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: Herbert Xu <herbert.xu@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      fc5b81d1
  13. 02 7月, 2009 1 次提交
  14. 29 6月, 2009 19 次提交
  15. 24 6月, 2009 1 次提交
  16. 22 6月, 2009 2 次提交
    • M
      net: add packet length to NetPacketSent callback · 783527a9
      Mark McLoughlin 提交于
      virtio-net needs this - for the same purpose that it currently uses the
      return value from qemu_sendv_packet().
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      783527a9
    • M
      net: add '-net tap,sndbuf=nbytes' · 0df0ff6d
      Mark McLoughlin 提交于
      2.6.30 adds a new TUNSETSNDBUF ioctl() which allows a send buffer limit
      for the tap device to be specified. When this limit is reached, a tap
      write() will return EAGAIN and poll() will indicate the fd isn't
      writable.
      
      This allows people to tune their setups so as to avoid e.g. UDP packet
      loss when the sending application in the guest out-runs the NIC in the
      host.
      
      There is no obviously sensible default setting - a suitable value
      depends mostly on the capabilities of the physical NIC through which the
      packets are being sent.
      
      Also, note that when using a bridge with netfilter enabled, we currently
      never get EAGAIN because netfilter causes the packet to be immediately
      orphaned. Set /proc/sys/net/bridge/bridge nf-call-iptables to zero to
      disable this behaviour.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0df0ff6d