rte_vhost_driver_register accepts a 'mode' flag which sets server(0) or
client(1) mode. vHost devices are registered in 'server' mode (0) when
initially created. Before this patch the flags provided to this
function were the device's 'vhost_driver_flags' which hadn't been set
yet when the register function is called but happen to be zero. Provide
an explicit flag instead for better practice.

Fixes: ("c1ff66ac80b5: netdev-dpdk: vHost client mode and reconnect")
Signed-off-by: Ciara Loftus <ciara.lof...@intel.com>
---
 lib/netdev-dpdk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index e5f2cdd..32853ce 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -918,7 +918,7 @@ netdev_dpdk_vhost_construct(struct netdev *netdev)
              vhost_sock_dir, name);
 
     err = rte_vhost_driver_register(dev->vhost_server_id,
-                                    dev->vhost_driver_flags);
+                                    ~RTE_VHOST_USER_CLIENT);
     if (err) {
         VLOG_ERR("vhost-user socket device setup failure for socket %s\n",
                  dev->vhost_server_id);
-- 
2.4.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to