1. Oct 23, 2012
    • Joachim Eastwood's avatar
      net/macb: fix truncate warnings · 95ebcea6
      Joachim Eastwood authored
      
      
      When building macb on x86_64 the following warnings show up:
        drivers/net/ethernet/cadence/macb.c: In function macb_interrupt:
        drivers/net/ethernet/cadence/macb.c:556:4: warning: large integer implicitly truncated to unsigned type [-Woverflow]
        drivers/net/ethernet/cadence/macb.c: In function macb_reset_hw:
        drivers/net/ethernet/cadence/macb.c:792:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
        drivers/net/ethernet/cadence/macb.c:793:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
        drivers/net/ethernet/cadence/macb.c:796:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
      
      Use -1 insted of ~0UL, as done in other places in the driver,
      to silence these warnings.
      
      Signed-off-by: default avatarJoachim Eastwood <manabian@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      95ebcea6
    • Nicolas Dichtel's avatar
      ipv6: add support of equal cost multipath (ECMP) · 51ebd318
      Nicolas Dichtel authored
      
      
      Each nexthop is added like a single route in the routing table. All routes
      that have the same metric/weight and destination but not the same gateway
      are considering as ECMP routes. They are linked together, through a list called
      rt6i_siblings.
      
      ECMP routes can be added in one shot, with RTA_MULTIPATH attribute or one after
      the other (in both case, the flag NLM_F_EXCL should not be set).
      
      The patch is based on a previous work from
      Luc Saillard <luc.saillard@6wind.com>.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51ebd318
    • Eric Dumazet's avatar
      ipv4: 16 slots in initial fib_info hash table · d94ce9b2
      Eric Dumazet authored
      
      
      A small host typically needs ~10 fib_info structures, so create initial
      hash table with 16 slots instead of only one. This removes potential
      false sharing and reallocs/rehashes (1->2->4->8->16)
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d94ce9b2
    • Eric Dumazet's avatar
      tcp: speedup SIOCINQ ioctl · 0e71c55c
      Eric Dumazet authored
      
      
      SIOCINQ can use the lock_sock_fast() version to avoid double acquisition
      of socket lock.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e71c55c
    • Eric Dumazet's avatar
      tcp: RFC 5961 5.2 Blind Data Injection Attack Mitigation · 354e4aa3
      Eric Dumazet authored
      
      
      RFC 5961 5.2 [Blind Data Injection Attack].[Mitigation]
      
        All TCP stacks MAY implement the following mitigation.  TCP stacks
        that implement this mitigation MUST add an additional input check to
        any incoming segment.  The ACK value is considered acceptable only if
        it is in the range of ((SND.UNA - MAX.SND.WND) <= SEG.ACK <=
        SND.NXT).  All incoming segments whose ACK value doesn't satisfy the
        above condition MUST be discarded and an ACK sent back.
      
      Move tcp_send_challenge_ack() before tcp_ack() to avoid a forward
      declaration.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Jerry Chu <hkchu@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      354e4aa3
  2. Oct 22, 2012
  3. Oct 20, 2012