1. 23 10月, 2012 5 次提交
    • J
      net/macb: fix truncate warnings · 95ebcea6
      Joachim Eastwood 提交于
      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: NJoachim Eastwood <manabian@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95ebcea6
    • N
      ipv6: add support of equal cost multipath (ECMP) · 51ebd318
      Nicolas Dichtel 提交于
      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: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51ebd318
    • E
      ipv4: 16 slots in initial fib_info hash table · d94ce9b2
      Eric Dumazet 提交于
      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: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d94ce9b2
    • E
      tcp: speedup SIOCINQ ioctl · 0e71c55c
      Eric Dumazet 提交于
      SIOCINQ can use the lock_sock_fast() version to avoid double acquisition
      of socket lock.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e71c55c
    • E
      tcp: RFC 5961 5.2 Blind Data Injection Attack Mitigation · 354e4aa3
      Eric Dumazet 提交于
      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: NEric 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: NDavid S. Miller <davem@davemloft.net>
      354e4aa3
  2. 22 10月, 2012 20 次提交
  3. 20 10月, 2012 15 次提交