]> 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)
commit4549d7dd9d16b0ec11a3b32dba50c656dabfb320
tree46cf3685026075732ecae76a573f70514cf75217
parent511dd4637690121d2e93f359659a3a97b67e8098
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: 0580802f43a7 ("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