This source file includes following definitions.
- blk_mq_rdma_map_queues
1
2
3
4
5 #include <linux/blk-mq.h>
6 #include <linux/blk-mq-rdma.h>
7 #include <rdma/ib_verbs.h>
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 int blk_mq_rdma_map_queues(struct blk_mq_queue_map *map,
25 struct ib_device *dev, int first_vec)
26 {
27 const struct cpumask *mask;
28 unsigned int queue, cpu;
29
30 for (queue = 0; queue < map->nr_queues; queue++) {
31 mask = ib_get_vector_affinity(dev, first_vec + queue);
32 if (!mask)
33 goto fallback;
34
35 for_each_cpu(cpu, mask)
36 map->mq_map[cpu] = map->queue_offset + queue;
37 }
38
39 return 0;
40
41 fallback:
42 return blk_mq_map_queues(map);
43 }
44 EXPORT_SYMBOL_GPL(blk_mq_rdma_map_queues);