1. 23 7月, 2012 1 次提交
  2. 30 6月, 2012 1 次提交
  3. 28 6月, 2012 1 次提交
  4. 11 6月, 2012 1 次提交
  5. 31 5月, 2012 1 次提交
  6. 17 5月, 2012 1 次提交
    • M
      virtio_net: invoke softirqs after __napi_schedule · ec13ee80
      Michael S. Tsirkin 提交于
      __napi_schedule might raise softirq but nothing
      causes do_softirq to trigger, so it does not in fact
      run. As a result,
      the error message "NOHZ: local_softirq_pending 08"
      sometimes occurs during boot of a KVM guest when the network service is
      started and we are oom:
      
        ...
        Bringing up loopback interface:  [  OK  ]
        Bringing up interface eth0:
        Determining IP information for eth0...NOHZ: local_softirq_pending 08
         done.
        [  OK  ]
        ...
      
      Further, receive queue processing might get delayed
      indefinitely until some interrupt triggers:
      virtio_net expected napi to be run immediately.
      
      One way to cause do_softirq to be executed is by
      invoking local_bh_enable(). As __napi_schedule is
      normally called from bh or irq context, this
      seems to make sense: disable bh before __napi_schedule
      and enable afterwards.
      
      In fact it's a very complicated way of calling do_softirq(),
      and works since this function is only used when we are not
      in interrupt context.  It's not hot at all, in any ideal scenario.
      Reported-by: NUlrich Obergfell <uobergfe@redhat.com>
      Tested-by: NUlrich Obergfell <uobergfe@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      ec13ee80
  7. 15 4月, 2012 1 次提交
    • J
      virtio-net: send gratuitous packets when needed · 586d17c5
      Jason Wang 提交于
      As hypervior does not have the knowledge of guest network configuration, it's
      better to ask guest to send gratuitous packets when needed.
      
      This patch implements VIRTIO_NET_F_GUEST_ANNOUNCE feature: hypervisor would
      notice the guest when it thinks it's time for guest to announce the link
      presnece. Guest tests VIRTIO_NET_S_ANNOUNCE bit during config change interrupt
      and woule send gratuitous packets through netif_notify_peers() and ack the
      notification through ctrl vq.
      
      We need to make sure the atomicy of read and ack in guest otherwise we may ack
      more times than being notified. This is done through handling the whole config
      change interrupt in an non-reentrant workqueue.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      586d17c5
  8. 13 4月, 2012 1 次提交
  9. 28 3月, 2012 1 次提交
  10. 16 2月, 2012 1 次提交
  11. 14 2月, 2012 1 次提交
  12. 12 1月, 2012 4 次提交
  13. 06 1月, 2012 1 次提交
  14. 30 12月, 2011 2 次提交
    • R
      virtio_net: use non-reentrant workqueue. · f1776dad
      Rusty Russell 提交于
      Michael S. Tsirkin also noticed that we could run the refill work
      multiple CPUs: if we kick off a refill on one CPU and then on another,
      they would both manipulate the queue at the same time (they use
      napi_disable to avoid racing against the receive handler itself).
      
      Tejun points out that this is what the WQ_NON_REENTRANT flag is for,
      and that there is a convenient system kthread we can use.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1776dad
    • R
      virtio_net: set/cancel work on ndo_open/ndo_stop · b2baed69
      Rusty Russell 提交于
      Michael S. Tsirkin noticed that we could run the refill work after
      ndo_close, which can re-enable napi - we don't disable it until
      virtnet_remove.  This is clearly wrong, so move the workqueue control
      to ndo_open and ndo_stop (aka. virtnet_open and virtnet_close).
      
      One subtle point: virtnet_probe() could simply fail if it couldn't
      allocate a receive buffer, but that's less polite in virtnet_open() so
      we schedule a refill as we do in the normal receive path if we run out
      of memory.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b2baed69
  15. 20 12月, 2011 1 次提交
  16. 09 12月, 2011 1 次提交
  17. 27 11月, 2011 1 次提交
  18. 17 11月, 2011 1 次提交
  19. 02 11月, 2011 1 次提交
  20. 24 10月, 2011 1 次提交
  21. 21 10月, 2011 1 次提交
  22. 20 10月, 2011 1 次提交
  23. 19 10月, 2011 1 次提交
  24. 07 10月, 2011 1 次提交
    • S
      virtio-net: Verify page list size before fitting into skb · e878d78b
      Sasha Levin 提交于
      This patch verifies that the length of a buffer stored in a linked list
      of pages is small enough to fit into a skb.
      
      If the size is larger than a max size of a skb, it means that we shouldn't
      go ahead building skbs anyway since we won't be able to send the buffer as
      the user requested.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: virtualization@lists.linux-foundation.org
      Cc: netdev@vger.kernel.org
      Cc: kvm@vger.kernel.org
      Signed-off-by: NSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e878d78b
  25. 23 9月, 2011 1 次提交
  26. 18 8月, 2011 1 次提交
  27. 22 7月, 2011 1 次提交
  28. 01 7月, 2011 1 次提交
  29. 12 6月, 2011 1 次提交
    • J
      virtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID · 10a8d94a
      Jason Wang 提交于
      There's no need for the guest to validate the checksum if it have been
      validated by host nics. So this patch introduces a new flag -
      VIRTIO_NET_HDR_F_DATA_VALID which is used to bypass the checksum
      examing in guest. The backend (tap/macvtap) may set this flag when
      met skbs with CHECKSUM_UNNECESSARY to save cpu utilization.
      
      No feature negotiation is needed as old driver just ignore this flag.
      
      Iperf shows 12%-30% performance improvement for UDP traffic. For TCP,
      when gro is on no difference as it produces skb with partial
      checksum. But when gro is disabled, 20% or even higher improvement
      could be measured by netperf.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10a8d94a
  30. 30 5月, 2011 1 次提交
  31. 02 4月, 2011 1 次提交
  32. 11 2月, 2011 1 次提交
  33. 17 12月, 2010 1 次提交
  34. 13 11月, 2010 1 次提交
  35. 17 8月, 2010 1 次提交
  36. 05 8月, 2010 1 次提交
    • R
      virtio_net: implements ethtool_ops.get_drvinfo · a767bde4
      Rusty Russell 提交于
      I often use "ethtool -i" command to check what driver controls the
      ehternet device.  But because current virtio_net driver doesn't
      support "ethtool -i", it becomes the following:
      
              # ethtool -i eth3
              Cannot get driver information: Operation not supported
      
      This patch simply adds the "ethtool -i" support. The following is the
      result when using the virtio_net driver with my patch applied to.
      
              # ethtool -i eth3
              driver: virtio_net
              version: N/A
              firmware-version: N/A
              bus-info: virtio0
      
      Personally, "-i" is one of the most frequently-used option, and most
      network drivers support "ethtool -i", so I think virtio_net also
      should do.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (use ARRAY_SIZE)
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a767bde4