1. 05 10月, 2010 5 次提交
  2. 04 10月, 2010 13 次提交
  3. 01 10月, 2010 5 次提交
    • E
      ipv4: rcu conversion in ip_route_output_slow · 0197aa38
      Eric Dumazet 提交于
      ip_route_output_slow() is enclosed in an rcu_read_lock() protected
      section, so that no references are taken/released on device, thanks to
      __ip_dev_find() & dev_get_by_index_rcu()
      
      Tested with ip route cache disabled, and a stress test :
      
      Before patch:
      
      elapsed time :
      
      real	1m38.347s
      user	0m11.909s
      sys	23m51.501s
      
      Profile:
      
      13788.00 22.7% ip_route_output_slow [kernel]
       7875.00 13.0% dst_destroy          [kernel]
       3925.00  6.5% fib_semantic_match   [kernel]
       3144.00  5.2% fib_rules_lookup     [kernel]
       3061.00  5.0% dst_alloc            [kernel]
       2276.00  3.7% rt_set_nexthop       [kernel]
       1762.00  2.9% fib_table_lookup     [kernel]
       1538.00  2.5% _raw_read_lock       [kernel]
       1358.00  2.2% ip_output            [kernel]
      
      After patch:
      
      real	1m28.808s
      user	0m13.245s
      sys	20m37.293s
      
      10950.00 17.2% ip_route_output_slow [kernel]
      10726.00 16.9% dst_destroy          [kernel]
       5170.00  8.1% fib_semantic_match   [kernel]
       3937.00  6.2% dst_alloc            [kernel]
       3635.00  5.7% rt_set_nexthop       [kernel]
       2900.00  4.6% fib_rules_lookup     [kernel]
       2240.00  3.5% fib_table_lookup     [kernel]
       1427.00  2.2% _raw_read_lock       [kernel]
       1157.00  1.8% kmem_cache_alloc     [kernel]
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0197aa38
    • E
      ipv4: introduce __ip_dev_find() · 82efee14
      Eric Dumazet 提交于
      ip_dev_find(net, addr) finds a device given an IPv4 source address and
      takes a reference on it.
      
      Introduce __ip_dev_find(), taking a third argument, to optionally take
      the device reference. Callers not asking the reference to be taken
      should be in an rcu_read_lock() protected section.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82efee14
    • E
      vlan: dont drop packets from unknown vlans in promiscuous mode · 173e79fb
      Eric Dumazet 提交于
      Roger Luethi noticed packets for unknown VLANs getting silently dropped
      even in promiscuous mode.
      
      Check for promiscuous mode in __vlan_hwaccel_rx() and vlan_gro_common()
      before drops.
      
      As suggested by Patrick, mark such packets to have skb->pkt_type set to
      PACKET_OTHERHOST to make sure they are dropped by IP stack.
      Reported-by: NRoger Luethi <rl@hellgate.ch>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      173e79fb
    • E
      ipv4: __mkroute_output() speedup · dd28d1a0
      Eric Dumazet 提交于
      While doing stress tests with a disabled IP route cache, I found
      __mkroute_output() was touching three times in_device atomic refcount.
      
      Use RCU to touch it once to reduce cache line ping pongs.
      
      Before patch
      
      time to perform the test
      real	1m42.009s
      user	0m12.545s
      sys	25m0.726s
      
      Profile :
      
      16109.00 26.4% ip_route_output_slow   vmlinux
       7434.00 12.2% dst_destroy            vmlinux
       3280.00  5.4% fib_rules_lookup       vmlinux
       3252.00  5.3% fib_semantic_match     vmlinux
       2622.00  4.3% fib_table_lookup       vmlinux
       2535.00  4.1% dst_alloc              vmlinux
       1750.00  2.9% _raw_read_lock         vmlinux
       1532.00  2.5% rt_set_nexthop         vmlinux
      
      After patch
      
      real	1m36.503s
      user	0m12.977s
      sys	23m25.608s
      
      14234.00 22.4% ip_route_output_slow   vmlinux
       8717.00 13.7% dst_destroy            vmlinux
       4052.00  6.4% fib_rules_lookup       vmlinux
       3951.00  6.2% fib_semantic_match     vmlinux
       3191.00  5.0% dst_alloc              vmlinux
       1764.00  2.8% fib_table_lookup       vmlinux
       1692.00  2.7% _raw_read_lock         vmlinux
       1605.00  2.5% rt_set_nexthop         vmlinux
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd28d1a0
    • R
      Phonet: restore flow control credits when sending fails · e1a5964f
      Rémi Denis-Courmont 提交于
      This patch restores the below flow control patch submitted by Rémi
      Denis-Courmont, which accidentaly got lost due to Pipe controller patch
      on Phonet.
      
      	commit 1a98214f
      	Author: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
      	Date:   Mon Aug 30 12:57:03 2010 +0000
      
      	Phonet: restore flow control credits when sending fails
      Signed-off-by: NRémi Denis-Courmont <remi.denis-courmont@nokia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NKumar Sanghvi <kumar.sanghvi@stericsson.com>
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1a5964f
  4. 30 9月, 2010 12 次提交
  5. 29 9月, 2010 5 次提交
    • M
      ipv6: Implement Any-IP support for IPv6. · ab79ad14
      Maciej Żenczykowski 提交于
      AnyIP is the capability to receive packets and establish incoming
      connections on IPs we have not explicitly configured on the machine.
      
      An example use case is to configure a machine to accept all incoming
      traffic on eth0, and leave the policy of whether traffic for a given IP
      should be delivered to the machine up to the load balancer.
      
      Can be setup as follows:
        ip -6 rule from all iif eth0 lookup 200
        ip -6 route add local default dev lo table 200
      (in this case for all IPv6 addresses)
      Signed-off-by: NMaciej Żenczykowski <maze@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab79ad14
    • T
      ipv4: Allow configuring subnets as local addresses · 4465b469
      Tom Herbert 提交于
      This patch allows a host to be configured to respond to any address in
      a specified range as if it were local, without actually needing to
      configure the address on an interface.  This is done through routing
      table configuration.  For instance, to configure a host to respond
      to any address in 10.1/16 received on eth0 as a local address we can do:
      
      ip rule add from all iif eth0 lookup 200
      ip route add local 10.1/16 dev lo proto kernel scope host src 127.0.0.1 table 200
      
      This host is now reachable by any 10.1/16 address (route lookup on
      input for packets received on eth0 can find the route).  On output, the
      rule will not be matched so that this host can still send packets to
      10.1/16 (not sent on loopback).  Presumably, external routing can be
      configured to make sense out of this.
      
      To make this work, we needed to modify the logic in finding the
      interface which is assigned a given source address for output
      (dev_ip_find).  We perform a normal fib_lookup instead of just a
      lookup on the local table, and in the lookup we ignore the input
      interface for matching.
      
      This patch is useful to implement IP-anycast for subnets of virtual
      addresses.
      Signed-off-by: NTom Herbert <therbert@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4465b469
    • D
      ip_gre: Fix dependencies wrt. ipv6. · 68c1f3a9
      David S. Miller 提交于
      The GRE tunnel driver needs to invoke icmpv6 helpers in the
      ipv6 stack when ipv6 support is enabled.
      
      Therefore if IPV6 is enabled, we have to enforce that GRE's
      enabling (modular or static) matches that of ipv6.
      Reported-by: NPatrick McHardy <kaber@trash.net>
      Reported-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68c1f3a9
    • D
      net-2.6: SYN retransmits: Add new parameter to retransmits_timed_out() · 4d22f7d3
      Damian Lukowski 提交于
      Fixes kernel Bugzilla Bug 18952
      
      This patch adds a syn_set parameter to the retransmits_timed_out()
      routine and updates its callers. If not set, TCP_RTO_MIN is taken
      as the calculation basis as before. If set, TCP_TIMEOUT_INIT is
      used instead, so that sysctl_syn_retries represents the actual
      amount of SYN retransmissions in case no SYNACKs are received when
      establishing a new connection.
      Signed-off-by: NDamian Lukowski <damian@tvk.rwth-aachen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d22f7d3
    • J
      mac80211: Fix WMM driver queue configuration · f2176d72
      Juuso Oikarinen 提交于
      The WMM parameter configuration function (ieee80211_sta_wmm_params) only
      configures the WMM parameters to the driver is the wmm_last_param_set
      counter value is changed by the AP.
      
      The wmm_last_param_set is initialized to -1 on association in order to ensure
      the configuration is made to the driver at least once on association, but
      currently this initialization is done *after* the WMM parameter configuration
      function was called.
      
      This leads to unreliability in the driver getting properly configured on first
      association (depending on what counter value the AP happens to use.) When
      disassociating (the wmm default parameters are configured to the driver) and
      then reassociating, due to the above the WMM configuration is not set to the
      driver at all.
      
      On drivers without beacon filtering the problem is corrected by later beacons,
      but on drivers with beacon filtering the WMM will remain permanently incorrectly
      configured.
      
      Fix this by moving the initialization of wmm_last_param_set to -1 before
      ieee80211_sta_wmm_params is called on association.
      Signed-off-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f2176d72