]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: use inet_recvmsg to support sctp RFS well
authorXin Long <lucien.xin@gmail.com>
Fri, 22 Jul 2016 13:25:42 +0000 (21:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2016 17:56:28 +0000 (10:56 -0700)
commitd02c2f7d87430732bfaf2eddba1827ec24a27f21
tree68f4fb3a713924e01bdca572dc61aa338a00adea
parent77ca1dfdbabc67d6ec551030b48bc805f93a6178
sctp: use inet_recvmsg to support sctp RFS well

Commit bf9cea8be162 ("sctp: add support for RPS and RFS")
saves skb->hash into sk->sk_rxhash so that the inet_* can
record it to flow table.

But sctp uses sock_common_recvmsg as .recvmsg instead
of inet_recvmsg, sock_common_recvmsg doesn't invoke
sock_rps_record_flow to record the flow. It may cause
that the receiver has no chances to record the flow if
it doesn't send msg or poll the socket.

So this patch fixes it by using inet_recvmsg as .recvmsg
in sctp.

Fixes: bf9cea8be162 ("sctp: add support for RPS and RFS")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/ipv6.c
net/sctp/protocol.c