diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2016-04-12 23:11:31 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-15 03:40:24 +0200 |
commit | 486bdee0134cf21c3714ded809d5933d2b8dfb81 (patch) | |
tree | b22d8924cc7cfdf4126dc5466c844ea69bb60e0e /net/sctp/socket.c | |
parent | net: validate_xmit_skb() changes (diff) | |
download | linux-486bdee0134cf21c3714ded809d5933d2b8dfb81.tar.xz linux-486bdee0134cf21c3714ded809d5933d2b8dfb81.zip |
sctp: add support for RPS and RFS
This patch adds what's missing to properly support RPS and RFS on SCTP,
as some of it is already implemented in common calls.
Having support for RPS and RFS allows better scaling specially because
not all NICs support hashing SCTP headers.
Save the hash right when we dequeue a skb from inqueue so we do it only
once per skb instead of per chunk. New sockets will then inherit the
hash through sctp_copy_sock().
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/sctp/socket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 878d28eda1a6..36697f85ce48 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -6430,6 +6430,8 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait) poll_wait(file, sk_sleep(sk), wait); + sock_rps_record_flow(sk); + /* A TCP-style listening socket becomes readable when the accept queue * is not empty. */ @@ -7186,6 +7188,7 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk, newsk->sk_lingertime = sk->sk_lingertime; newsk->sk_rcvtimeo = sk->sk_rcvtimeo; newsk->sk_sndtimeo = sk->sk_sndtimeo; + newsk->sk_rxhash = sk->sk_rxhash; newinet = inet_sk(newsk); |