net: Enable Tx queue selection based on Rx queues
This patch adds support to pick Tx queue based on the Rx queue(s) map configuration set by the admin through the sysfs attribute for each Tx queue. If the user configuration for receive queue(s) map does not apply, then the Tx queue selection falls back to CPU(s) map based selection and finally to hashing. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c6345ce7d3
commit
fc9bab24e9
@@ -1730,6 +1730,16 @@ static inline void sk_rx_queue_clear(struct sock *sk)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XPS
|
||||
static inline int sk_rx_queue_get(const struct sock *sk)
|
||||
{
|
||||
if (sk && sk->sk_rx_queue_mapping != NO_QUEUE_MAPPING)
|
||||
return sk->sk_rx_queue_mapping;
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void sk_set_socket(struct sock *sk, struct socket *sock)
|
||||
{
|
||||
sk_tx_queue_clear(sk);
|
||||
|
Reference in New Issue
Block a user