vhost: explicitly set VRING_USED_F_NO_NOTIFY
We used to call a dpdk function to do it, but using a function for something that simple doesn't make sense. The function also does its internal queue lookup by vid and queue number, which could potentially fail, return an error and technically require SPDK to handle it. The function makes some sense for vhost-net applications which don't touch vrings directly but rely on rte_vhost's API for enqueueing/dequeuing mbufs. SPDK touches DPDK's rings directly for the entire I/O handling, so it might just as well for initialization. This serves as cleanup. Change-Id: Ifb44fa22ea5fc3633aa85f075aa1a5cd02f5423c Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466745 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
556e4d7054
commit
f94be73dc9
@ -1195,12 +1195,8 @@ start_device(int vid)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Disable notifications. */
|
||||
if (rte_vhost_enable_guest_notification(vid, i, 0) != 0) {
|
||||
SPDK_ERRLOG("vhost device %d: Failed to disable guest notification on queue %"PRIu16"\n", vid, i);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Disable I/O submission notifications, we'll be polling. */
|
||||
q->vring.used->flags = VRING_USED_F_NO_NOTIFY;
|
||||
vsession->max_queues = i + 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user