Thread (135 messages) 135 messages, 4 authors, 2017-04-05

Re: [PATCH v3 06/22] vhost: introduce API to fetch negotiated features

From: Yuanhan Liu <hidden>
Date: 2017-03-31 08:54:24

On Fri, Mar 31, 2017 at 09:45:11AM +0200, Maxime Coquelin wrote:
quoted
+uint64_t
+rte_vhost_get_negotiated_features(int vid)
+{
+	struct virtio_net *dev;
+
+	dev = get_device(vid);
+	if (!dev)
+		return 0;
It's unlikely to happen with net devices, but as this series is about
generalizing the use of this lib, couldn't we have cases where the
negotiated features is 0?
Yes, I think so.
If so, shouldn't be preferable the caller passes features pointer as
argument?
I thought of that. The reason I did that is to keep the semantics with
rte_vhost_driver_get_feature(path). But you are right, we don't have
to follow that. More importantly, we may also need change the return
value of rte_vhost_driver_get_features(path): which could also fail
if 'path' is not found.

	--yliu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help