net: Allow setting sock flow hash without a sock
authorTom Herbert <therbert@google.com>
Sun, 22 Dec 2013 10:54:31 +0000 (18:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2013 18:31:34 +0000 (13:31 -0500)
commitfe47755852d1f299b55a6e6594bb6e082ac103d4
treec7b7afa5b89a92f602ec9d278d4d8d78a84039c1
parent84a6a0acad145fb9bc11dcb60f6d064072f0cc1c
net: Allow setting sock flow hash without a sock

This patch adds sock_rps_record_flow_hash and sock_rps_reset_flow_hash
which take a hash value as an argument and sets the sock_flow_table
accordingly.  This allows the table to be populated in cases where flow
is being tracked outside of a sock structure.

sock_rps_record_flow and sock_rps_reset_flow call this function
where the hash is taken from sk_rxhash.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h