1. 24 1月, 2014 3 次提交
    • V
      net: Correctly sync addresses from multiple sources to single device · 6ef7b8a2
      Vlad Yasevich 提交于
      When we have multiple devices attempting to sync the same address
      to a single destination, each device should be permitted to sync
      it once.  To accomplish this, pass the 'sync_cnt' of the source
      address when adding the addresss to the lower device.  'sync_cnt'
      tracks how many time a given address has been succefully synced.
      This way, we know that if the 'sync_cnt' passed in is 0, we should
      sync this address.
      
      Also, turn 'synced' member back into the counter as was originally
      done in
         commit 4543fbef.
         net: count hw_addr syncs so that unsync works properly.
      It tracks how many time a given address has been added via a
      'sync' operation.  For every successfull 'sync' the counter is
      incremented, and for ever 'unsync', the counter is decremented.
      This makes sure that the address will be properly removed from
      the the lower device when all the upper devices have removed it.
      Reported-by: NAndrey Dmitrov <andrey.dmitrov@oktetlabs.ru>
      CC: Andrey Dmitrov <andrey.dmitrov@oktetlabs.ru>
      CC: Alexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
      CC: Konstantin Ushakov <Konstantin.Ushakov@oktetlabs.ru>
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ef7b8a2
    • S
      net/udp_offload: Handle static checker complaints · a1d0cd8e
      Shlomo Pongratz 提交于
      Fixed few issues around using __rcu prefix and rcu_assign_pointer, also
      fixed a warning print to use ntohs(port) and not htons(port).
      
      net/ipv4/udp_offload.c:112:9: error: incompatible types in comparison expression (different address spaces)
      net/ipv4/udp_offload.c:113:9: error: incompatible types in comparison expression (different address spaces)
      net/ipv4/udp_offload.c:176:19: error: incompatible types in comparison expression (different address spaces)
      Signed-off-by: NShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1d0cd8e
    • C
      tcp: metrics: Handle v6/v4-mapped sockets in tcp-metrics · 3ad88cf7
      Christoph Paasch 提交于
      A socket may be v6/v4-mapped. In that case sk->sk_family is AF_INET6,
      but the IP being used is actually an IPv4-address.
      Current's tcp-metrics will thus represent it as an IPv6-address:
      
      root@server:~# ip tcp_metrics
      ::ffff:10.1.1.2 age 22.920sec rtt 18750us rttvar 15000us cwnd 10
      10.1.1.2 age 47.970sec rtt 16250us rttvar 10000us cwnd 10
      
      This patch modifies the tcp-metrics so that they are able to handle the
      v6/v4-mapped sockets correctly.
      Signed-off-by: NChristoph Paasch <christoph.paasch@uclouvain.be>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ad88cf7
  2. 23 1月, 2014 37 次提交