rte_vhost: added error log in vhost_user_set_features
Since vhost_user_set_features failure is not handled in any way, a single error log has been added to at least to let the user know that something has gone wrong. Change-Id: Ifcf27320af75ba74347b742643b23e43b7c01149 Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/365807 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
0c471fd668
commit
b93a37a8fb
@ -176,8 +176,12 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features)
|
||||
uint64_t vhost_features = 0;
|
||||
|
||||
rte_vhost_driver_get_features(dev->ifname, &vhost_features);
|
||||
if (features & ~vhost_features)
|
||||
if (features & ~vhost_features) {
|
||||
RTE_LOG(ERR, VHOST_CONFIG,
|
||||
"(%d) received invalid negotiated features.\n",
|
||||
dev->vid);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((dev->flags & VIRTIO_DEV_RUNNING) && dev->features != features) {
|
||||
if (dev->notify_ops->features_changed)
|
||||
|
Loading…
Reference in New Issue
Block a user