diff options
author | Amritha Nambiar <amritha.nambiar@intel.com> | 2018-06-30 07:26:41 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-02 03:06:23 +0300 |
commit | 80d19669ecd34423e85ca04f2210b0e42a47cb16 (patch) | |
tree | db6eb66398a8ff0c5befd17f2d1056d83776b241 /include/linux/cpumask.h | |
parent | 1a84d7fdb5fc07b903678756f6f169d36de542b8 (diff) | |
download | linux-80d19669ecd34423e85ca04f2210b0e42a47cb16.tar.xz |
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; } |