Mustafa Ismail
9cd9842c46
RDMA/irdma: Cap MSIX used to online CPUs + 1
The irdma driver can use a maximum number of msix vectors equal
to num_online_cpus() + 1 and the kernel warning stack below is shown
if that number is exceeded.
The kernel throws a warning as the driver tries to update the affinity
hint with a CPU mask greater than the max CPU IDs. Fix this by capping
the MSIX vectors to num_online_cpus() + 1.
WARNING: CPU: 7 PID: 23655 at include/linux/cpumask.h:106 irdma_cfg_ceq_vector+0x34c/0x3f0 [irdma]
RIP: 0010:irdma_cfg_ceq_vector+0x34c/0x3f0 [irdma]
Call Trace:
irdma_rt_init_hw+0xa62/0x1290 [irdma]
? irdma_alloc_local_mac_entry+0x1a0/0x1a0 [irdma]
? __is_kernel_percpu_address+0x63/0x310
? rcu_read_lock_held_common+0xe/0xb0
? irdma_lan_unregister_qset+0x280/0x280 [irdma]
? irdma_request_reset+0x80/0x80 [irdma]
? ice_get_qos_params+0x84/0x390 [ice]
irdma_probe+0xa40/0xfc0 [irdma]
? rcu_read_lock_bh_held+0xd0/0xd0
? irdma_remove+0x140/0x140 [irdma]
? rcu_read_lock_sched_held+0x62/0xe0
? down_write+0x187/0x3d0
? auxiliary_match_id+0xf0/0x1a0
? irdma_remove+0x140/0x140 [irdma]
auxiliary_bus_probe+0xa6/0x100
__driver_probe_device+0x4a4/0xd50
? __device_attach_driver+0x2c0/0x2c0
driver_probe_device+0x4a/0x110
__driver_attach+0x1aa/0x350
bus_for_each_dev+0x11d/0x1b0
? subsys_dev_iter_init+0xe0/0xe0
bus_add_driver+0x3b1/0x610
driver_register+0x18e/0x410
? 0xffffffffc0b88000
irdma_init_module+0x50/0xaa [irdma]
do_one_initcall+0x103/0x5f0
? perf_trace_initcall_level+0x420/0x420
? do_init_module+0x4e/0x700
? __kasan_kmalloc+0x7d/0xa0
? kmem_cache_alloc_trace+0x188/0x2b0
? kasan_unpoison+0x21/0x50
do_init_module+0x1d1/0x700
load_module+0x3867/0x5260
? layout_and_allocate+0x3990/0x3990
? rcu_read_lock_held_common+0xe/0xb0
? rcu_read_lock_sched_held+0x62/0xe0
? rcu_read_lock_bh_held+0xd0/0xd0
? __vmalloc_node_range+0x46b/0x890
? lock_release+0x5c8/0xba0
? alloc_vm_area+0x120/0x120
? selinux_kernel_module_from_file+0x2a5/0x300
? __inode_security_revalidate+0xf0/0xf0
? __do_sys_init_module+0x1db/0x260
__do_sys_init_module+0x1db/0x260
? load_module+0x5260/0x5260
? do_syscall_64+0x22/0x450
do_syscall_64+0xa5/0x450
entry_SYSCALL_64_after_hwframe+0x66/0xdb
Fixes: 44d9e52977 ("RDMA/irdma: Implement device initialization definitions")
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
Link: https://lore.kernel.org/r/20230207201938.1329-1-sindhu.devale@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2023-02-08 10:28:13 +02:00
..
2022-12-16 13:04:15 -06:00
2022-12-30 10:47:25 -08:00
2022-12-13 15:22:14 -08:00
2022-12-27 11:06:57 +09:00
2022-12-25 13:38:09 -08:00
2022-12-19 12:33:32 -06:00
2023-01-06 13:12:42 -08:00
2022-12-25 13:38:09 -08:00
2022-12-16 03:49:24 -08:00
2023-01-06 14:25:19 -08:00
2022-12-13 13:46:07 -08:00
2022-12-12 12:52:02 -08:00
2022-12-12 16:39:38 -08:00
2022-12-19 07:13:33 -06:00
2023-01-06 11:14:11 -08:00
2022-12-08 13:03:47 -08:00
2022-12-05 21:57:20 +09:00
2022-12-19 08:54:17 -06:00
2023-01-03 08:32:12 +01:00
2022-12-12 15:40:03 +01:00
2022-12-16 03:49:24 -08:00
2022-12-21 09:37:14 -08:00
2022-12-16 03:49:24 -08:00
2023-01-02 13:01:14 +01:00
2023-01-06 10:16:49 +01:00
2022-12-25 13:38:09 -08:00
2022-12-13 15:47:48 -08:00
2022-12-13 13:09:38 -08:00
2022-12-15 14:47:10 -08:00
2022-12-11 21:25:58 +01:00
2022-12-16 03:49:24 -08:00
2023-02-08 10:28:13 +02:00
2022-12-25 13:38:09 -08:00
2022-12-19 08:34:39 -06:00
2022-12-14 15:23:49 -08:00
2022-12-25 13:38:09 -08:00
2022-12-25 13:38:09 -08:00
2022-12-21 09:31:18 -08:00
2023-01-04 09:05:23 -07:00
2022-12-25 13:38:09 -08:00
2022-12-13 15:22:14 -08:00
2022-12-09 10:29:58 +01:00
2022-12-21 09:19:24 -08:00
2022-12-23 12:00:24 -08:00
2022-12-13 13:41:26 -08:00
2022-12-13 12:32:07 -08:00
2023-01-15 12:23:10 +02:00
2022-12-25 13:38:09 -08:00
2022-12-02 23:52:32 -08:00
2023-01-06 13:12:42 -08:00
2022-12-16 03:49:24 -08:00
2023-01-04 21:31:59 -06:00
2022-12-17 23:19:38 +01:00
2022-12-19 08:40:58 -06:00
2022-12-25 13:38:09 -08:00
2022-12-14 15:23:49 -08:00
2022-12-19 08:40:58 -06:00
2022-12-13 13:03:06 -08:00
2022-12-16 03:22:53 -08:00
2022-12-17 08:39:31 -06:00
2022-12-13 15:47:48 -08:00
2022-12-21 09:41:28 -08:00
2022-12-11 19:30:20 -08:00
2022-12-23 14:38:00 -08:00
2022-12-07 11:20:55 -07:00
2022-12-21 09:19:24 -08:00
2023-01-06 13:12:42 -08:00
2022-12-25 13:38:09 -08:00
2022-12-19 16:07:59 -06:00
2022-12-19 08:47:33 -06:00
2022-12-23 14:44:08 -08:00
2022-12-25 13:38:09 -08:00
2022-12-14 08:58:51 -08:00
2022-12-12 10:17:08 -08:00
2022-12-30 19:48:37 +01:00
2022-12-25 13:38:09 -08:00
2022-12-14 08:58:51 -08:00
2023-01-06 16:32:10 +01:00
2022-12-28 05:28:11 -05:00
2022-12-16 03:54:54 -08:00
2022-12-28 05:28:11 -05:00
2023-01-05 11:43:27 +01:00
2022-12-16 03:49:24 -08:00
2022-12-28 05:28:11 -05:00
2022-12-17 08:34:01 -06:00
2022-12-13 11:59:58 -08:00