From: Xin Long <lucien.xin@gmail.com> To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Neil Horman <nhorman@tuxdriver.com>, davem <davem@davemloft.net> Subject: Re: [PATCH net-next 0/3] sctp: add support for sk_reuseport Date: Sun, 21 Oct 2018 15:58:12 +0900 [thread overview] Message-ID: <CADvbK_fVP8jKS72=DfCpkT3C9VKHKhkY0zD0znCwiJzncpfLfA@mail.gmail.com> (raw) In-Reply-To: <cover.1540095102.git.lucien.xin@gmail.com> [-- Attachment #1: Type: text/plain, Size: 3812 bytes --] On Sun, Oct 21, 2018 at 1:43 PM Xin Long <lucien.xin@gmail.com> wrote: > > 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 Attached is the testcase based on sctp-tests.git. > > Xin Long (3): > sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint > sctp: add sock_reuseport for the sock in __sctp_hash_endpoint > sctp: process sk_reuseport in sctp_get_port_local > > include/net/sctp/sctp.h | 2 +- > include/net/sctp/structs.h | 6 ++- > net/core/sock_reuseport.c | 1 + > net/sctp/bind_addr.c | 28 ++++++++++ > net/sctp/input.c | 129 ++++++++++++++++++++++++++++++++------------- > net/sctp/socket.c | 49 +++++++++++------ > 6 files changed, 162 insertions(+), 53 deletions(-) > > -- > 2.1.0 > [-- Attachment #2: reuseport.tar.gz --] [-- Type: application/x-gzip, Size: 2501 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Xin Long <lucien.xin@gmail.com> To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Neil Horman <nhorman@tuxdriver.com>, davem <davem@davemloft.net> Subject: Re: [PATCH net-next 0/3] sctp: add support for sk_reuseport Date: Sun, 21 Oct 2018 06:58:12 +0000 [thread overview] Message-ID: <CADvbK_fVP8jKS72=DfCpkT3C9VKHKhkY0zD0znCwiJzncpfLfA@mail.gmail.com> (raw) In-Reply-To: <cover.1540095102.git.lucien.xin@gmail.com> [-- Attachment #1: Type: text/plain, Size: 3812 bytes --] On Sun, Oct 21, 2018 at 1:43 PM Xin Long <lucien.xin@gmail.com> wrote: > > 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 Attached is the testcase based on sctp-tests.git. > > Xin Long (3): > sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint > sctp: add sock_reuseport for the sock in __sctp_hash_endpoint > sctp: process sk_reuseport in sctp_get_port_local > > include/net/sctp/sctp.h | 2 +- > include/net/sctp/structs.h | 6 ++- > net/core/sock_reuseport.c | 1 + > net/sctp/bind_addr.c | 28 ++++++++++ > net/sctp/input.c | 129 ++++++++++++++++++++++++++++++++------------- > net/sctp/socket.c | 49 +++++++++++------ > 6 files changed, 162 insertions(+), 53 deletions(-) > > -- > 2.1.0 > [-- Attachment #2: reuseport.tar.gz --] [-- Type: application/x-gzip, Size: 2501 bytes --]
next prev parent reply other threads:[~2018-10-21 15:11 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-21 4:43 [PATCH net-next 0/3] sctp: add support for sk_reuseport Xin Long 2018-10-21 4:43 ` Xin Long 2018-10-21 4:43 ` [PATCH net-next 1/3] sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint Xin Long 2018-10-21 4:43 ` Xin Long 2018-10-21 4:43 ` [PATCH net-next 2/3] sctp: add sock_reuseport for the sock in __sctp_hash_endpoint Xin Long 2018-10-21 4:43 ` Xin Long 2018-10-21 4:43 ` [PATCH net-next 3/3] sctp: process sk_reuseport in sctp_get_port_local Xin Long 2018-10-21 4:43 ` Xin Long 2018-10-22 14:15 ` [PATCH net-next 2/3] sctp: add sock_reuseport for the sock in __sctp_hash_endpoint Marcelo Ricardo Leitner 2018-10-22 14:15 ` Marcelo Ricardo Leitner 2018-11-12 9:58 ` Xin Long 2018-11-12 9:58 ` Xin Long 2018-10-22 14:17 ` [PATCH net-next 1/3] sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint Marcelo Ricardo Leitner 2018-10-22 14:17 ` Marcelo Ricardo Leitner 2018-11-12 9:56 ` Xin Long 2018-11-12 9:56 ` Xin Long 2018-10-21 6:58 ` Xin Long [this message] 2018-10-21 6:58 ` [PATCH net-next 0/3] sctp: add support for sk_reuseport Xin Long 2018-10-22 11:40 ` Neil Horman 2018-10-22 11:40 ` Neil Horman 2018-10-22 14:20 ` Marcelo Ricardo Leitner 2018-10-22 14:20 ` Marcelo Ricardo Leitner -- strict thread matches above, loose matches on Subject: below -- 2018-03-05 12:44 [PATCH net-next 0/3] sctp: add support for some msg_control options from RFC6458 Xin Long 2018-03-05 12:44 ` Xin Long 2018-03-05 12:44 ` [PATCH net-next 1/3] sctp: add support for PR-SCTP Information for sendmsg Xin Long 2018-03-05 12:44 ` Xin Long 2018-03-05 12:44 ` [PATCH net-next 2/3] sctp: add support for SCTP_DSTADDRV4/6 " Xin Long 2018-03-05 12:44 ` Xin Long 2018-03-05 12:44 ` [PATCH net-next 3/3] sctp: add support for snd flag SCTP_SENDALL process in sendmsg Xin Long 2018-03-05 12:44 ` Xin Long 2018-03-06 12:22 ` Marcelo Ricardo Leitner 2018-03-06 12:22 ` Marcelo Ricardo Leitner 2018-03-05 23:39 ` [PATCH net-next 2/3] sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg Marcelo Ricardo Leitner 2018-03-05 23:39 ` Marcelo Ricardo Leitner 2018-03-06 7:03 ` Xin Long 2018-03-06 7:03 ` Xin Long 2018-03-06 12:21 ` Marcelo Ricardo Leitner 2018-03-06 12:21 ` Marcelo Ricardo Leitner 2018-03-06 12:22 ` Marcelo Ricardo Leitner 2018-03-06 12:22 ` Marcelo Ricardo Leitner 2018-03-06 12:22 ` [PATCH net-next 1/3] sctp: add support for PR-SCTP " Marcelo Ricardo Leitner 2018-03-06 12:22 ` Marcelo Ricardo Leitner 2018-03-05 23:52 ` [PATCH net-next 0/3] sctp: add support for some msg_control options from RFC6458 Marcelo Ricardo Leitner 2018-03-05 23:52 ` Marcelo Ricardo Leitner 2018-03-07 15:56 ` David Miller 2018-03-07 15:56 ` David Miller
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CADvbK_fVP8jKS72=DfCpkT3C9VKHKhkY0zD0znCwiJzncpfLfA@mail.gmail.com' \ --to=lucien.xin@gmail.com \ --cc=davem@davemloft.net \ --cc=linux-sctp@vger.kernel.org \ --cc=marcelo.leitner@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=nhorman@tuxdriver.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.