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)
commitdb5db1a00d0816207be3a0166fcb4f523eaf3b52
tree46cf3685026075732ecae76a573f70514cf75217
parentf76349cf41451c5c42a99f18a9163377e4b364ff
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: 2ddae773c93b ("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