1. 12 6月, 2011 2 次提交
    • P
      net: add Faraday FTGMAC100 Gigabit Ethernet driver · 69785b79
      Po-Yu Chuang 提交于
      FTGMAC100 Ethernet Media Access Controller supports 10/100/1000 Mbps
      and MII/GMII.  This driver has been working on some ARM/NDS32 SoC's
      including Faraday A369 and Andes AG102.
      Signed-off-by: NPo-Yu Chuang <ratbert@faraday-tech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      69785b79
    • G
      net/m68k: Include <linux/interrupt.h> where needed · ac752277
      Geert Uytterhoeven 提交于
      arch/m68k/emu/nfeth.c: In function ‘nfeth_init’:
      arch/m68k/emu/nfeth.c:243: error: implicit declaration of function ‘request_irq’
      arch/m68k/emu/nfeth.c:243: error: ‘IRQF_SHARED’ undeclared (first use in this function)
      arch/m68k/emu/nfeth.c:243: error: (Each undeclared identifier is reported only once
      arch/m68k/emu/nfeth.c:243: error: for each function it appears in.)
      arch/m68k/emu/nfeth.c: In function ‘nfeth_cleanup’:
      arch/m68k/emu/nfeth.c:266: error: implicit declaration of function ‘free_irq’
      drivers/net/apne.c: In function ‘apne_probe’:
      drivers/net/apne.c:189: error: implicit declaration of function ‘free_irq’
      drivers/net/apne.c: In function ‘apne_probe1’:
      drivers/net/apne.c:317: error: implicit declaration of function ‘request_irq’
      drivers/net/apne.c:317: error: ‘IRQF_SHARED’ undeclared (first use in this function)
      drivers/net/apne.c:317: error: (Each undeclared identifier is reported only once
      drivers/net/apne.c:317: error: for each function it appears in.)
      
      Introduced by commit a6b7a407 ("net: remove interrupt.h inclusion from
      netdevice.h").
      
      Include <linux/interrupt.h> in the individual drivers to fix the build.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac752277
  2. 10 6月, 2011 28 次提交
  3. 09 6月, 2011 10 次提交
    • M
      net: emaclite: Add missing linux/interrupt.h header · 075cd29e
      Michal Simek 提交于
      Log:
      drivers/net/xilinx_emaclite.c: In function 'xemaclite_open':
      drivers/net/xilinx_emaclite.c:961: error: implicit declaration of function 'request_irq'
      drivers/net/xilinx_emaclite.c: In function 'xemaclite_close':
      drivers/net/xilinx_emaclite.c:995: error: implicit declaration of function 'free_irq'
      make[2]: *** [drivers/net/xilinx_emaclite.o] Error 1
      make[1]: *** [drivers/net] Error 2
      make: *** [drivers] Error 2
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      075cd29e
    • A
      tun: do not put self in waitq if doing a nonblock read · 61a5ff15
      Amos Kong 提交于
      Perf shows a relatively high rate (about 8%) race in
      spin_lock_irqsave() when doing netperf between external host and
      guest. It's mainly becuase the lock contention between the
      tun_do_read() and tun_xmit_skb(), so this patch do not put self into
      waitqueue to reduce this kind of race. After this patch, it drops to
      4%.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NAmos Kong <akong@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61a5ff15
    • S
      tun: dont force inline of functions · 6f7c156c
      stephen hemminger 提交于
      Current standard practice is to not mark most functions as inline
      and  let compiler decide instead.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f7c156c
    • S
      tun: reserves space for network in skb · a504b86e
      stephen hemminger 提交于
      The tun driver allocates skb's to hold data from user and then passes
      the data into the network stack as received data. Most network devices
      allocate the receive skb with routines like dev_alloc_skb() that reserves
      additional space for use by network protocol stack but tun does not.
      
      Because of the lack of padding, when the packet is passed through bridge
      netfilter a new skb has to be allocated.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a504b86e
    • M
      cnic, bnx2: Check iSCSI support early in bnx2_init_one() · 7625eb2f
      Michael Chan 提交于
      Based on earlier patch from Neil Horman <nhorman@tuxdriver.com>
      
      If iSCSI is not supported on a bnx2 device, bnx2_cnic_probe() will
      return NULL and the cnic device will not be visible to bnx2i.  This
      will prevent bnx2i from registering and then unregistering during
      cnic_start() and cause the warning message:
      
      bnx2 0003:01:00.1: eth1: Failed waiting for ULP up call to complete
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7625eb2f
    • M
      cnic: Improve NETDEV_UP event handling · db1d350f
      Michael Chan 提交于
      During NETDEV_UP, we use symbol_get() to get the net driver's cnic
      probe function.  This sometimes doesn't work if NETDEV_UP happens
      right after NETDEV_REGISTER and the net driver is still running module
      init code.  As a result, the cnic device may not be discovered.  We
      fix this by probing on all NETDEV events if the device's netif_running
      state is up.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db1d350f
    • E
      cnic: Randomize initial TCP port for iSCSI connections · 11f23aa8
      Eddie Wai 提交于
      This reduces the likelihood of port re-use when re-loading the driver.
      Signed-off-by: NEddie Wai <eddie.wai@broadcom.com>
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11f23aa8
    • M
      cnic: Fix race conditions with firmware · 101c40c8
      Michael Chan 提交于
      During iSCSI connection terminations, if the target is also terminating
      at about the same time, the firmware may not complete the driver's
      request to close or reset the connection.  This is fixed by handling
      other events (instead of the expected completion event) as an indication
      that the driver's request has been rejected.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      101c40c8
    • M
      cnic: Fix interrupt logic · 93736656
      Michael Chan 提交于
      We need to keep looping until cnic_get_kcqes() returns 0.  cnic_get_kcqes()
      returns a maximum of 64 entries.  If there are more entries in the queue
      and we don't loop back, the remaining entries may not be serviced for a
      long time.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93736656
    • E
      inetpeer: lower false sharing effect · 2b77bdde
      Eric Dumazet 提交于
      Profiles show false sharing in addr_compare() because refcnt/dtime
      changes dirty the first inet_peer cache line, where are lying the keys
      used at lookup time. If many cpus are calling inet_getpeer() and
      inet_putpeer(), or need frag ids, addr_compare() is in 2nd position in
      "perf top".
      
      Before patch, my udpflood bench (16 threads) on my 2x4x2 machine :
      
                   5784.00  9.7% csum_partial_copy_generic [kernel]
                   3356.00  5.6% addr_compare              [kernel]
                   2638.00  4.4% fib_table_lookup          [kernel]
                   2625.00  4.4% ip_fragment               [kernel]
                   1934.00  3.2% neigh_lookup              [kernel]
                   1617.00  2.7% udp_sendmsg               [kernel]
                   1608.00  2.7% __ip_route_output_key     [kernel]
                   1480.00  2.5% __ip_append_data          [kernel]
                   1396.00  2.3% kfree                     [kernel]
                   1195.00  2.0% kmem_cache_free           [kernel]
                   1157.00  1.9% inet_getpeer              [kernel]
                   1121.00  1.9% neigh_resolve_output      [kernel]
                   1012.00  1.7% dev_queue_xmit            [kernel]
      # time ./udpflood.sh
      
      real	0m44.511s
      user	0m20.020s
      sys	11m22.780s
      
      # time ./udpflood.sh
      
      real	0m44.099s
      user	0m20.140s
      sys	11m15.870s
      
      After patch, no more addr_compare() in profiles :
      
                   4171.00 10.7% csum_partial_copy_generic   [kernel]
                   1787.00  4.6% fib_table_lookup            [kernel]
                   1756.00  4.5% ip_fragment                 [kernel]
                   1234.00  3.2% udp_sendmsg                 [kernel]
                   1191.00  3.0% neigh_lookup                [kernel]
                   1118.00  2.9% __ip_append_data            [kernel]
                   1022.00  2.6% kfree                       [kernel]
                    993.00  2.5% __ip_route_output_key       [kernel]
                    841.00  2.2% neigh_resolve_output        [kernel]
                    816.00  2.1% kmem_cache_free             [kernel]
                    658.00  1.7% ia32_sysenter_target        [kernel]
                    632.00  1.6% kmem_cache_alloc_node       [kernel]
      
      # time ./udpflood.sh
      
      real	0m41.587s
      user	0m19.190s
      sys	10m36.370s
      
      # time ./udpflood.sh
      
      real	0m41.486s
      user	0m19.290s
      sys	10m33.650s
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b77bdde