diff options
author | Amritha Nambiar <amritha.nambiar@intel.com> | 2018-06-29 21:26:41 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-02 09:06:23 +0900 |
commit | 80d19669ecd34423e85ca04f2210b0e42a47cb16 (patch) | |
tree | db6eb66398a8ff0c5befd17f2d1056d83776b241 /include/linux/cpumask.h | |
parent | 1a84d7fdb5fc07b903678756f6f169d36de542b8 (diff) | |
download | linux-stable-80d19669ecd34423e85ca04f2210b0e42a47cb16.tar.gz linux-stable-80d19669ecd34423e85ca04f2210b0e42a47cb16.tar.bz2 linux-stable-80d19669ecd34423e85ca04f2210b0e42a47cb16.zip |
net: Refactor XPS for CPUs and Rx queues
Refactor XPS code to support Tx queue selection based on
CPU(s) map or Rx queue(s) map.
Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r-- | include/linux/cpumask.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index bf53d893ad02..57f20a0a7794 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -115,12 +115,17 @@ extern struct cpumask __cpu_active_mask; #define cpu_active(cpu) ((cpu) == 0) #endif -/* verify cpu argument to cpumask_* operators */ -static inline unsigned int cpumask_check(unsigned int cpu) +static inline void cpu_max_bits_warn(unsigned int cpu, unsigned int bits) { #ifdef CONFIG_DEBUG_PER_CPU_MAPS - WARN_ON_ONCE(cpu >= nr_cpumask_bits); + WARN_ON_ONCE(cpu >= bits); #endif /* CONFIG_DEBUG_PER_CPU_MAPS */ +} + +/* verify cpu argument to cpumask_* operators */ +static inline unsigned int cpumask_check(unsigned int cpu) +{ + cpu_max_bits_warn(cpu, nr_cpumask_bits); return cpu; } |