mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
virtio: Make vp_set_vq_affinity() take a mask.
Make vp_set_vq_affinity() take a cpumask instead of taking a single CPU. If there are fewer queues than cores, queue affinity should be able to map to multiple cores. Link: https://patchwork.ozlabs.org/patch/948149/ Suggested-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Caleb Raitto <caraitto@google.com> Acked-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
07624df1c9
commit
19e226e8cc
@@ -146,7 +146,7 @@ static void virtcrypto_clean_affinity(struct virtio_crypto *vi, long hcpu)
|
||||
|
||||
if (vi->affinity_hint_set) {
|
||||
for (i = 0; i < vi->max_data_queues; i++)
|
||||
virtqueue_set_affinity(vi->data_vq[i].vq, -1);
|
||||
virtqueue_set_affinity(vi->data_vq[i].vq, NULL);
|
||||
|
||||
vi->affinity_hint_set = false;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ static void virtcrypto_set_affinity(struct virtio_crypto *vcrypto)
|
||||
*
|
||||
*/
|
||||
for_each_online_cpu(cpu) {
|
||||
virtqueue_set_affinity(vcrypto->data_vq[i].vq, cpu);
|
||||
virtqueue_set_affinity(vcrypto->data_vq[i].vq, cpumask_of(cpu));
|
||||
if (++i >= vcrypto->max_data_queues)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user