1. 12 5月, 2013 1 次提交
  2. 29 4月, 2013 1 次提交
    • S
      virtio-net: fill only rx queues which are being used · 55257d72
      Sasha Levin 提交于
      Due to MQ support we may allocate a whole bunch of rx queues but
      never use them. With this patch we'll safe the space used by
      the receive buffers until they are actually in use:
      
      sh-4.2# free -h
                   total       used       free     shared    buffers     cached
      Mem:          490M        35M       455M         0B         0B       4.1M
      -/+ buffers/cache:        31M       459M
      Swap:           0B         0B         0B
      sh-4.2# ethtool -L eth0 combined 8
      sh-4.2# free -h
                   total       used       free     shared    buffers     cached
      Mem:          490M       162M       327M         0B         0B       4.1M
      -/+ buffers/cache:       158M       331M
      Swap:           0B         0B         0B
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      55257d72
  3. 20 4月, 2013 2 次提交
  4. 12 4月, 2013 1 次提交
    • J
      virtio-net: initialize vlan_features · 4fda8302
      Jason Wang 提交于
      There's nothing that prevent passing the device features of virtio_net to its
      vlan device. So this patch simply passes those to vlan device to benefit from
      advanced features.
      
      Netperf shows better sending performance for vlan device since TSO can work on
      vlan now.
      
      before:
      netperf -H 192.168.5.2
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.5.2 ()
      port 0 AF_INET : demo
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    10.00    4162.35
      
      after:
      netperf -H 192.168.5.2
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.5.2 ()
      port 0 AF_INET : demo
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    10.00    9365.42
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      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>
      4fda8302
  5. 22 3月, 2013 1 次提交
  6. 20 3月, 2013 2 次提交
  7. 14 2月, 2013 1 次提交
    • P
      net: Fix possible wrong checksum generation. · c9af6db4
      Pravin B Shelar 提交于
      Patch cef401de (net: fix possible wrong checksum
      generation) fixed wrong checksum calculation but it broke TSO by
      defining new GSO type but not a netdev feature for that type.
      net_gso_ok() would not allow hardware checksum/segmentation
      offload of such packets without the feature.
      
      Following patch fixes TSO and wrong checksum. This patch uses
      same logic that Eric Dumazet used. Patch introduces new flag
      SKBTX_SHARED_FRAG if at least one frag can be modified by
      the user. but SKBTX_SHARED_FRAG flag is kept in skb shared
      info tx_flags rather than gso_type.
      
      tx_flags is better compared to gso_type since we can have skb with
      shared frag without gso packet. It does not link SHARED_FRAG to
      GSO, So there is no need to define netdev feature for this.
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9af6db4
  8. 13 2月, 2013 1 次提交
  9. 05 2月, 2013 1 次提交
  10. 28 1月, 2013 1 次提交
    • E
      net: fix possible wrong checksum generation · cef401de
      Eric Dumazet 提交于
      Pravin Shelar mentioned that GSO could potentially generate
      wrong TX checksum if skb has fragments that are overwritten
      by the user between the checksum computation and transmit.
      
      He suggested to linearize skbs but this extra copy can be
      avoided for normal tcp skbs cooked by tcp_sendmsg().
      
      This patch introduces a new SKB_GSO_SHARED_FRAG flag, set
      in skb_shinfo(skb)->gso_type if at least one frag can be
      modified by the user.
      
      Typical sources of such possible overwrites are {vm}splice(),
      sendfile(), and macvtap/tun/virtio_net drivers.
      
      Tested:
      
      $ netperf -H 7.7.8.84
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
      7.7.8.84 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    10.00    3959.52
      
      $ netperf -H 7.7.8.84 -t TCP_SENDFILE
      TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 7.7.8.84 ()
      port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    10.00    3216.80
      
      Performance of the SENDFILE is impacted by the extra allocation and
      copy, and because we use order-0 pages, while the TCP_STREAM uses
      bigger pages.
      Reported-by: NPravin Shelar <pshelar@nicira.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cef401de
  11. 27 1月, 2013 3 次提交
  12. 22 1月, 2013 2 次提交
  13. 18 12月, 2012 4 次提交
  14. 11 12月, 2012 1 次提交
  15. 09 12月, 2012 3 次提交
  16. 04 12月, 2012 1 次提交
  17. 10 11月, 2012 1 次提交
  18. 21 8月, 2012 1 次提交
    • T
      workqueue: deprecate system_nrt[_freezable]_wq · 3b07e9ca
      Tejun Heo 提交于
      system_nrt[_freezable]_wq are now spurious.  Mark them deprecated and
      convert all users to system[_freezable]_wq.
      
      If you're cc'd and wondering what's going on: Now all workqueues are
      non-reentrant, so there's no reason to use system_nrt[_freezable]_wq.
      Please use system[_freezable]_wq instead.
      
      This patch doesn't make any functional difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-By: NLai Jiangshan <laijs@cn.fujitsu.com>
      
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: David Howells <dhowells@redhat.com>
      3b07e9ca
  19. 15 8月, 2012 1 次提交
  20. 23 7月, 2012 1 次提交
  21. 30 6月, 2012 1 次提交
  22. 28 6月, 2012 1 次提交
  23. 11 6月, 2012 1 次提交
  24. 31 5月, 2012 1 次提交
  25. 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
  26. 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
  27. 13 4月, 2012 1 次提交
  28. 28 3月, 2012 1 次提交
  29. 16 2月, 2012 1 次提交
  30. 14 2月, 2012 1 次提交