lib, vhost: check the numbers of reqs
Change-Id: I567b9a330aa284f08dd16993686200dd1dd7990f Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
3e8ae4674b
commit
2abea9da4e
@ -562,6 +562,8 @@ process_requestq(struct spdk_vhost_scsi_ctrlr *vdev, struct vhost_virtqueue *vq)
|
||||
int result;
|
||||
|
||||
reqs_cnt = vq_avail_ring_get(vq, reqs, RTE_DIM(reqs));
|
||||
assert(reqs_cnt <= 32);
|
||||
|
||||
for (i = 0; i < reqs_cnt; i++) {
|
||||
task = spdk_vhost_task_get(&vdev->task_cnt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user