1. 03 Mar, 2014 7 commits
  2. 02 Mar, 2014 1 commit
    • Veaceslav Falico's avatar
      bonding: send arp requests even if there's no route to them · 28572760
      Veaceslav Falico authored
      Currently we're only sending arp requests if we have a route to the target
      (and, thus, can find out the source ip address).
      
      There are some use cases, however, where we don't want/need to set an ip
      address (or set up a specific route) for bonding to use arp monitoring *for
      traffic generation*. We can easily send arp probes (arp requests with src
      ip == 0) to generate arp broadcast responses from the target ip and use
      them for determining if the target is up.
      
      This, obviously, won't work with arp validation - because we don't have the
      ip address set and, thus, will filter out the responses. So in that case -
      print a warning.
      
      CC: François CACHEREUL <f.cachereul@alphalink.fr>
      CC: Zhenjie Chen <zhchen@redhat.com>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      28572760
  3. 28 Feb, 2014 19 commits
  4. 27 Feb, 2014 7 commits
    • Bjørn Mork's avatar
      ipv6: addrconf: silence sparse endianness warnings · bc861959
      Bjørn Mork authored
      Avoid the following sparse __CHECK_ENDIAN__ warnings:
      
       include/net/addrconf.h:318:25: warning: restricted __be64 degrades to integer
       include/net/addrconf.h:318:70: warning: restricted __be64 degrades to integer
       include/net/addrconf.h:330:25: warning: restricted __be64 degrades to integer
       include/net/addrconf.h:330:70: warning: restricted __be64 degrades to integer
       include/net/addrconf.h:347:25: warning: restricted __be64 degrades to integer
       include/net/addrconf.h:348:26: warning: restricted __be64 degrades to integer
       include/net/addrconf.h:349:18: warning: restricted __be64 degrades to integer
      
      The warnings are false but they make it harder to spot real
      bugs.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc861959
    • Duan Jiong's avatar
      neigh: directly goto out after setting nud_state to NUD_FAILED · 5e2c21dc
      Duan Jiong authored
      Because those following if conditions will not be matched.
      Signed-off-by: default avatarDuan Jiong <duanj.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e2c21dc
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next · 8e1f40ec
      David S. Miller authored
      Steffen Klassert says:
      
      ====================
      This is the rework of the IPsec virtual tunnel interface
      for ipv4 to support inter address family tunneling and
      namespace crossing. The only change to the last RFC version
      is a compile fix for an odd configuration where CONFIG_XFRM
      is set but CONFIG_INET is not set.
      
      1) Add and use a IPsec protocol multiplexer.
      
      2) Add xfrm_tunnel_skb_cb to the skb common buffer
         to store a receive callback there.
      
      3) Make vti work with i_key set by not including the i_key
         when comupting the hash for the tunnel lookup in case of
         vti tunnels.
      
      4) Update ip_vti to use it's own receive hook.
      
      5) Remove xfrm_tunnel_notifier, this is replaced by the IPsec
         protocol multiplexer.
      
      6) We need to be protocol family indepenent, so use the on xfrm_lookup
         returned dst_entry instead of the ipv4 rtable in vti_tunnel_xmit().
      
      7) Add support for inter address family tunneling.
      
      8) Check if the tunnel endpoints of the xfrm state and the vti interface
         are matching and return an error otherwise.
      
      8) Enable namespace crossing tor vti devices.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e1f40ec
    • David S. Miller's avatar
      Merge branch 'kdoc' · e1fbf260
      David S. Miller authored
      Luis R. Rodriguez says:
      
      ====================
      net: start kdoc'ifying net_device
      
      While working on extending some functionality I felt restricted
      with the amount of documentation I can add. Part of this is that
      the existing style on the header files don't let me be verbose.
      This starts addressing that by using kdoc for the net_device
      flags, and as Ben noted, the priv_flags can be moved out from
      UAPI.
      
      Luis R. Rodriguez (2):
        net: kdoc struct net_device flags and priv_flags
        net: move net_device priv_flags out from UAPI
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1fbf260
    • Luis R. Rodriguez's avatar
      net: move net_device priv_flags out from UAPI · 7aa98047
      Luis R. Rodriguez authored
      These are private to userspace, and they're unstable
      anyway and can be shuffled at will (see 080e4130)
      so any userspace application relying on them is on crack.
      
      Test compiled with allyesconfig.
      
      mcgrof@drvbp1 /pub/mem/mcgrof/net-next (git::master)$ make allyesconfig
      mcgrof@drvbp1 /pub/mem/mcgrof/net-next (git::master)$ time make -j 20
      ...
        BUILD   arch/x86/boot/bzImage
      Setup is 16992 bytes (padded to 17408 bytes).
      System is 56153 kB
      CRC 721d2751
      Kernel: arch/x86/boot/bzImage is ready  (#1)
      real    19m35.744s
      user    280m37.984s
      sys     27m54.104s
      
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7aa98047
    • Luis R. Rodriguez's avatar
      net: kdoc struct net_device flags and priv_flags · 589f5816
      Luis R. Rodriguez authored
      We have documentation for these flags but they're scattered
      all over the place. #defines don't allow documentation to be
      written easily so to help to start bringing some documentation
      together use the enums kdoc practice but keep the defines to
      allow userspace to be able to #ifdef them.
      
      I've verified the same values are assigned before and after
      with a simple userspace test program [0] and checksumming the
      output.
      
      [0] http://drvbp1.linux-foundation.org/~mcgrof/kdoc/netdev_flags/
      
      mcgrof@gnat ~/tmp $ ./check-flags | sha1sum
      0ec5b6b1840aa3bb9ce464e61c564820871c92c3  -
      
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      589f5816
    • Arnd Bergmann's avatar
      atm: nicstar: remove interruptible_sleep_on_timeout · 118ce7ab
      Arnd Bergmann authored
      We are trying to finally kill off interruptible_sleep_on_timeout.
      the two uses in the nicstar driver can be trivially replaced
      with wait_event_interruptible_lock_irq_timeout, which prevents the
      wake-up race and is able to check the buffer state with scq->lock
      held.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      118ce7ab
  5. 26 Feb, 2014 6 commits
    • Eric Dumazet's avatar
      tcp: switch rtt estimations to usec resolution · 740b0f18
      Eric Dumazet authored
      Upcoming congestion controls for TCP require usec resolution for RTT
      estimations. Millisecond resolution is simply not enough these days.
      
      FQ/pacing in DC environments also require this change for finer control
      and removal of bimodal behavior due to the current hack in
      tcp_update_pacing_rate() for 'small rtt'
      
      TCP_CONG_RTT_STAMP is no longer needed.
      
      As Julian Anastasov pointed out, we need to keep user compatibility :
      tcp_metrics used to export RTT and RTTVAR in msec resolution,
      so we added RTT_US and RTTVAR_US. An iproute2 patch is needed
      to use the new attributes if provided by the kernel.
      
      In this example ss command displays a srtt of 32 usecs (10Gbit link)
      
      lpk51:~# ./ss -i dst lpk52
      Netid  State      Recv-Q Send-Q   Local Address:Port       Peer
      Address:Port
      tcp    ESTAB      0      1         10.246.11.51:42959
      10.246.11.52:64614
               cubic wscale:6,6 rto:201 rtt:0.032/0.001 ato:40 mss:1448
      cwnd:10 send
      3620.0Mbps pacing_rate 7240.0Mbps unacked:1 rcv_rtt:993 rcv_space:29559
      
      Updated iproute2 ip command displays :
      
      lpk51:~# ./ip tcp_metrics | grep 10.246.11.52
      10.246.11.52 age 561.914sec cwnd 10 rtt 274us rttvar 213us source
      10.246.11.51
      
      Old binary displays :
      
      lpk51:~# ip tcp_metrics | grep 10.246.11.52
      10.246.11.52 age 561.914sec cwnd 10 rtt 250us rttvar 125us source
      10.246.11.51
      
      With help from Julian Anastasov, Stephen Hemminger and Yuchung Cheng
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Larry Brakmo <brakmo@google.com>
      Cc: Julian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      740b0f18
    • Eric Dumazet's avatar
      net: add skb_mstamp infrastructure · 363ec392
      Eric Dumazet authored
      ktime_get() is too expensive on some cases, and we'd like to get
      usec resolution timestamps in TCP stack.
      
      This patch adds a light weight facility using a combination of
      local_clock() and jiffies samples.
      
      Instead of :
      
              u64 t0, t1;
      
              t0 = ktime_get();
              // stuff
              t1 = ktime_get();
              delta_us = ktime_us_delta(t1, t0);
      
      use :
              struct skb_mstamp t0, t1;
      
              skb_mstamp_get(&t0);
              // stuff
              skb_mstamp_get(&t1);
              delta_us = skb_mstamp_us_delta(&t1, &t0);
      
      Note : local_clock() might have a (bounded) drift between cpus.
      
      Do not use this infra in place of ktime_get() without understanding the
      issues.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Larry Brakmo <brakmo@google.com>
      Cc: Julian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      363ec392
    • Ben Dooks's avatar
      phy: micrel: add of configuration for LED mode · 20d8435a
      Ben Dooks authored
      Add support for the led-mode property for the following PHYs
      which have a single LED mode configuration value.
      
      KSZ8001 and KSZ8041 which both use register 0x1e bits 15,14 and
      KSZ8021, KSZ8031 and KSZ8051 which use register 0x1f bits 5,4
      to control the LED configuration.
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20d8435a
    • Arnd Bergmann's avatar
      isdn: fix multiple sleep_on races · 94fcf696
      Arnd Bergmann authored
      The isdn core code uses a couple of wait queues with
      interruptible_sleep_on, which is racy and about to get
      removed from the kernel. Fortunately, we know for each case
      what we are waiting for, so they can all be converted to
      the better wait_event_interruptible interface.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94fcf696
    • Arnd Bergmann's avatar
      isdn: divert, hysdn: fix interruptible_sleep_on race · c11da83b
      Arnd Bergmann authored
      These two drivers use identical code for their procfs status
      file handling, which contains a small race against status
      data becoming available while reading the file.
      
      This uses wait_event_interruptible instead to fix this
      particular race and eventually get rid of all sleep_on
      instances. There seems to be another race involving
      multiple concurrent readers of the same procfs file, which
      I don't try to fix here.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c11da83b
    • Arnd Bergmann's avatar
      isdn: hisax/elsa: fix sleep_on race in elsa FSM · c728cc88
      Arnd Bergmann authored
      The state machine code in the elsa driver uses interruptible_sleep_on
      to wait for state changes, which is racy. A closer look at the possible
      states reveals that it is always used to wait for getting back into
      ARCOFI_NOP, so we can use wait_event_interruptible instead.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c728cc88