vhost: log virtio and vhost-user negotiated features

Having this info logged by default when analysing bug reports
has proved to be useful.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
This commit is contained in:
Maxime Coquelin 2019-06-20 22:07:12 +02:00 committed by Ferruh Yigit
parent 4b6d27431d
commit 906accb60b

View File

@ -284,6 +284,8 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
} else {
dev->vhost_hlen = sizeof(struct virtio_net_hdr);
}
RTE_LOG(INFO, VHOST_CONFIG,
"negotiated Virtio features: 0x%" PRIx64 "\n", dev->features);
VHOST_LOG_DEBUG(VHOST_CONFIG,
"(%d) mergeable RX buffers %s, virtio 1 %s\n",
dev->vid,
@ -1406,6 +1408,9 @@ vhost_user_set_protocol_features(struct virtio_net **pdev,
}
dev->protocol_features = protocol_features;
RTE_LOG(INFO, VHOST_CONFIG,
"negotiated Vhost-user protocol features: 0x%" PRIx64 "\n",
dev->protocol_features);
return RTE_VHOST_MSG_RESULT_OK;
}