]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/ifcvf: fix the calculation of queuepair
authorAngus Chen <angus.chen@jaguarmicro.com>
Fri, 23 Sep 2022 09:10:13 +0000 (17:10 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 27 Sep 2022 22:30:48 +0000 (18:30 -0400)
commita58d1a1765401ef1cc32d8f00c67e6827359c4c0
tree46cf3685026075732ecae76a573f70514cf75217
parent5a5ae5f5aed33a514aa100fbb7d7c965c5759443
vdpa/ifcvf: fix the calculation of queuepair

The q_pair_id to address a queue pair in the lm bar should be
calculated by queue_id / 2 rather than queue_id / nr_vring.

Fixes: 7438f982a443 ("vDPA/ifcvf: detect and use the onboard number of queues directly")
Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Zhu Lingshan <lingshan.zhu@intel.com>
Message-Id: <20220923091013.191-1-angus.chen@jaguarmicro.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/ifcvf/ifcvf_base.c