1. 19 12月, 2014 1 次提交
  2. 05 9月, 2014 1 次提交
  3. 27 2月, 2013 1 次提交
    • L
      net: fix unbounded NetQueue · 7d91ddd2
      Luigi Rizzo 提交于
      In the current implementation of qemu, running without a network
      backend will cause the queue to grow unbounded when the guest is
      transmitting traffic.
      
      This patch fixes the problem by implementing bounded size NetQueue,
      used with an arbitrary limit of 10000 packets, and dropping packets
      when the queue is full _and_ the sender does not pass a callback.
      
      The second condition makes sure that we never drop packets that
      contains a callback (which would be tricky, because the producer
      expects the callback to be run when all previous packets have been
      consumed; so we cannot run it when the packet is dropped).
      
      If documentation is correct, producers that submit a callback should
      stop sending when their packet is queued, so there is no real risk
      that the queue exceeds the max size by large values.
      Signed-off-by: NLuigi Rizzo <rizzo@iet.unipi.it>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      7d91ddd2
  4. 19 12月, 2012 2 次提交
  5. 14 9月, 2012 2 次提交
    • S
      net: do not report queued packets as sent · 06b5f36d
      Stefan Hajnoczi 提交于
      Net send functions have a return value where 0 means the packet has not
      been sent and will be queued.  A non-zero value means the packet was
      sent or an error caused the packet to be dropped.
      
      This patch fixes two instances where packets are queued but we return
      their size.  This causes callers to believe the packets were sent.  When
      the caller uses the async send interface this creates a real problem
      because the callback will be invoked for a packet that the caller
      believed to be already sent.  This bug can cause double-frees in the
      caller.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      06b5f36d
    • 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
  6. 01 8月, 2012 3 次提交
  7. 21 8月, 2011 1 次提交
  8. 09 11月, 2009 1 次提交
  9. 30 10月, 2009 1 次提交
  10. 28 10月, 2009 1 次提交
  11. 15 10月, 2009 1 次提交