1. 18 11月, 2009 3 次提交
    • E
      linkwatch: linkwatch_forget_dev() to speedup device dismantle · e014debe
      Eric Dumazet 提交于
      Herbert Xu a écrit :
      > On Tue, Nov 17, 2009 at 04:26:04AM -0800, David Miller wrote:
      >> Really, the link watch stuff is just due for a redesign.  I don't
      >> think a simple hack is going to cut it this time, sorry Eric :-)
      >
      > I have no objections against any redesigns, but since the only
      > caller of linkwatch_forget_dev runs in process context with the
      > RTNL, it could also legally emit those events.
      
      Thanks guys, here an updated version then, before linkwatch surgery ?
      
      In this version, I force the event to be sent synchronously.
      
      [PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle
      
      time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105
      
      real	0m0.266s
      user	0m0.000s
      sys	0m0.001s
      
      real	0m0.770s
      user	0m0.000s
      sys	0m0.000s
      
      real	0m1.022s
      user	0m0.000s
      sys	0m0.000s
      
      One problem of current schem in vlan dismantle phase is the
      holding of device done by following chain :
      
      vlan_dev_stop() ->
      	netif_carrier_off(dev) ->
      		linkwatch_fire_event(dev) ->
      			dev_hold() ...
      
      And __linkwatch_run_queue() runs up to one second later...
      
      A generic fix to this problem is to add a linkwatch_forget_dev() method
      to unlink the device from the list of watched devices.
      
      dev->link_watch_next becomes dev->link_watch_list (and use a bit more memory),
      to be able to unlink device in O(1).
      
      After patch :
      time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105
      
      real    0m0.024s
      user    0m0.000s
      sys     0m0.000s
      
      real    0m0.032s
      user    0m0.000s
      sys     0m0.001s
      
      real    0m0.033s
      user    0m0.000s
      sys     0m0.000s
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e014debe
    • O
      net: introduce NETDEV_UNREGISTER_PERNET · 395264d5
      Octavian Purdila 提交于
      This new event is called once for each unique net namespace in batched
      unregister operations (with the argument set to a random device from
      that namespace) and once per device in non-batched unregister
      operations.
      
      It allows us to factorize some device unregister work such as clearing the
      routing cache.
      Signed-off-by: NOctavian Purdila <opurdila@ixiacom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      395264d5
    • E
      net: add dev_txq_stats_fold() helper · d83345ad
      Eric Dumazet 提交于
      Some drivers ndo_get_stats() method need to perform txqueue stats folding.
      
      Move folding from dev_get_stats() to a new dev_txq_stats_fold() function
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d83345ad
  2. 16 11月, 2009 3 次提交
  3. 14 11月, 2009 3 次提交
  4. 11 11月, 2009 3 次提交
  5. 09 11月, 2009 3 次提交
    • A
      net/compat_ioctl: support SIOCWANDEV · 7a50a240
      Arnd Bergmann 提交于
      This adds compat_ioctl support for SIOCWANDEV, which has
      always been missing.
      
      The definition of struct compat_ifreq was missing an
      ifru_settings fields that is needed to support SIOCWANDEV,
      so add that and clean up the whitespace damage in the
      struct definition.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a50a240
    • E
      udp: secondary hash on (local port, local address) · 512615b6
      Eric Dumazet 提交于
      Extends udp_table to contain a secondary hash table.
      
      socket anchor for this second hash is free, because UDP
      doesnt use skc_bind_node : We define an union to hold
      both skc_bind_node & a new hlist_nulls_node udp_portaddr_node
      
      udp_lib_get_port() inserts sockets into second hash chain
      (additional cost of one atomic op)
      
      udp_lib_unhash() deletes socket from second hash chain
      (additional cost of one atomic op)
      
      Note : No spinlock lockdep annotation is needed, because
      lock for the secondary hash chain is always get after
      lock for primary hash chain.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      512615b6
    • E
      udp: split sk_hash into two u16 hashes · d4cada4a
      Eric Dumazet 提交于
      Union sk_hash with two u16 hashes for udp (no extra memory taken)
      
      One 16 bits hash on (local port) value (the previous udp 'hash')
      
      One 16 bits hash on (local address, local port) values, initialized
      but not yet used. This second hash is using jenkin hash for better
      distribution.
      
      Because the 'port' is xored later, a partial hash is performed
      on local address + net_hash_mix(net)
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4cada4a
  6. 08 11月, 2009 1 次提交
  7. 07 11月, 2009 3 次提交
  8. 06 11月, 2009 4 次提交
  9. 05 11月, 2009 1 次提交
  10. 04 11月, 2009 1 次提交
  11. 03 11月, 2009 5 次提交
  12. 02 11月, 2009 1 次提交
  13. 31 10月, 2009 4 次提交
  14. 30 10月, 2009 3 次提交
  15. 29 10月, 2009 2 次提交