Thread (25 messages) 25 messages, 4 authors, 2016-08-29

Re: [PATCH 7/7] vhost: simplify features set/get

From: Maxime Coquelin <hidden>
Date: 2016-08-24 08:12:00


On 08/18/2016 10:48 AM, Yuanhan Liu wrote:
quoted hunk ↗ jump to hunk
No need to use a pointer to store/retrieve features.

Signed-off-by: Yuanhan Liu <redacted>
---
 lib/librte_vhost/vhost_user.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index ef4a0c1..eee99e9 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -155,23 +155,22 @@ vhost_user_reset_owner(struct virtio_net *dev)
 /*
  * The features that we support are requested.
  */
-static int
-vhost_user_get_features(uint64_t *pu)
+static uint64_t
+vhost_user_get_features(void)
 {
-	*pu = VHOST_FEATURES;
-	return 0;
+	return VHOST_FEATURES;
 }
This is not the topic of this series, but I wonder if it
could make sense to be able to override supported features
at device init time.

It may not match with the orignal purpose of supported features,
but could be useful at least for testing without recompilation.

For this patch:
Reviewed-by: Maxime Coquelin <redacted>

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