On Mon, 2017-07-10 at 10:17 +0300, Sagi Grimberg wrote: > +int blk_mq_rdma_map_queues(struct blk_mq_tag_set *set, > + struct ib_device *dev, int first_vec) > +{ > + const struct cpumask *mask; > + unsigned int queue, cpu; > + > + if (set->nr_hw_queues > dev->num_comp_vectors) > + goto fallback; Should this perhaps have been "if (first_vec + set->nr_hw_queues > dev->num_comp_vectors)"? Additionally, since the return value of ib_get_vector_affinity() is tested inside the loop, can this test be left out? > + > + for (queue = 0; queue < set->nr_hw_queues; queue++) { > + mask = ib_get_vector_affinity(dev, first_vec + queue); > + if (!mask) > + goto fallback; > + > + for_each_cpu(cpu, mask) > + set->mq_map[cpu] = queue; > + } > + > + return 0; > +fallback: > + return blk_mq_map_queues(set); If you have to repost this patch, please insert a blank line above the "fallback" label. Thanks, Bart.-- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html