1. 13 Nov, 2018 1 commit
  2. 12 Nov, 2018 6 commits
    • David S. Miller's avatar
      Merge branch 'sctp-add-support-for-sk_reuseport' · 261501d9
      David S. Miller authored
      Xin Long says:
      
      ====================
      sctp: add support for sk_reuseport
      
      sctp sk_reuseport allows multiple socks to listen on the same port and
      addresses, as long as these socks have the same uid. This works pretty
      much as TCP/UDP does, the only difference is that sctp is multi-homing
      and all the bind_addrs in these socks will have to completely matched,
      otherwise listen() will return err.
      
      The below is when 5 sockets are listening on 172.16.254.254:6400 on a
      server, 26 sockets on a client connect to 172.16.254.254:6400 and each
      may be processed by a different socket on the server which is selected
      by hash(lport, pport, paddr) in reuseport_select_sock():
      
       # ss --sctp -nn
         State      Recv-Q Send-Q        Local Address:Port     Peer Address:Port
         LISTEN     0      10           172.16.254.254:6400                *:*
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.2.1:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.2.4:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.3.3:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.3.4:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.5.2:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.5.3:1234
         LISTEN     0      10           172.16.254.254:6400                *:*
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.1.3:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.1.4:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.3.2:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.4.1:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.4.2:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.4.3:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.4.4:1234
         LISTEN     0      10           172.16.254.254:6400                *:*
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.1.2:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.3.5:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.4.5:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400   172.16.253.253:1234
         LISTEN     0      10           172.16.254.254:6400                *:*
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.2.2:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.2.3:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.5.4:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.5.5:1234
         LISTEN     0      10           172.16.254.254:6400                *:*
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.1.1:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.1.5:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.2.5:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.3.1:1234
         `- ESTAB   0      0       172.16.254.254%eth1:6400       172.16.5.1:1234
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      261501d9
    • Xin Long's avatar
      sctp: process sk_reuseport in sctp_get_port_local · 6ba84574
      Xin Long authored
      When socks' sk_reuseport is set, the same port and address are allowed
      to be bound into these socks who have the same uid.
      
      Note that the difference from sk_reuse is that it allows multiple socks
      to listen on the same port and address.
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ba84574
    • Xin Long's avatar
      sctp: add sock_reuseport for the sock in __sctp_hash_endpoint · 76c6d988
      Xin Long authored
      This is a part of sk_reuseport support for sctp. It defines a helper
      sctp_bind_addrs_check() to check if the bind_addrs in two socks are
      matched. It will add sock_reuseport if they are completely matched,
      and return err if they are partly matched, and alloc sock_reuseport
      if all socks are not matched at all.
      
      It will work until sk_reuseport support is added in
      sctp_get_port_local() in the next patch.
      
      v1->v2:
        - use 'laddr->valid && laddr2->valid' check instead as Marcelo
          pointed in sctp_bind_addrs_check().
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76c6d988
    • Xin Long's avatar
      sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint · 532ae2f1
      Xin Long authored
      This is a part of sk_reuseport support for sctp, and it selects a
      sock by the hashkey of lport, paddr and dport by default. It will
      work until sk_reuseport support is added in sctp_get_port_local()
      in the next patch.
      
      v1->v2:
        - define lport as __be16 instead of __be32 as Marcelo pointed in
          __sctp_rcv_lookup_endpoint().
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      532ae2f1
    • YueHaibing's avatar
      net: phy: marvell: remove set but not used variable 'pause' · 30beabb3
      YueHaibing authored
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/net/phy/marvell.c: In function 'm88e1510_config_init':
      drivers/net/phy/marvell.c:850:7: warning:
       variable 'pause' set but not used [-Wunused-but-set-variable]
      
      It not used any more after commit 3c1bcc86 ("net: ethernet: Convert phydev
      advertize and supported from u32 to link mode")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30beabb3
    • David S. Miller's avatar
  3. 11 Nov, 2018 33 commits