From: Dariusz Stojaczyk Date: Fri, 16 Jun 2017 14:32:05 +0000 (+0200) Subject: vhost: log error for badly negotiated features X-Git-Tag: spdx-start~2990 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=058e2d294bf9f726488644bf56f0db2c58c11532;p=dpdk.git vhost: log error for badly negotiated 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. Signed-off-by: Dariusz Stojaczyk Acked-by: Yuanhan Liu --- diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index e90b44c172..ad2e8d3802 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -168,8 +168,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)