Browse Source

Use vhost user client mode, instead of server

When doing the port binding, we need to tell libvirt to be the
vhostuser server so that OVS can connect to the socket as a client.
OVS being the "server" is also deprecated behavior.

Without this change, libvirt and OVS also end up disagreeing about
where the socket lives when booting a VM and using DPDK.

Change-Id: I09a4c31d65ed5daa6e2d5cbf9235343d139bdc77
tags/6.0.0.0rc1
Terry Wilson 2 months ago
parent
commit
5cbfbe6782

+ 1
- 1
networking_ovn/ml2/mech_driver.py View File

@@ -139,7 +139,7 @@ class OVNMechanismDriver(api.MechanismDriver):
139 139
             portbindings.VIF_TYPE_VHOST_USER: {
140 140
                 portbindings.CAP_PORT_FILTER: False,
141 141
                 portbindings.VHOST_USER_MODE:
142
-                portbindings.VHOST_USER_MODE_CLIENT,
142
+                portbindings.VHOST_USER_MODE_SERVER,
143 143
                 portbindings.VHOST_USER_OVS_PLUG: True
144 144
             }
145 145
         }

+ 3
- 2
networking_ovn/tests/functional/test_mech_driver.py View File

@@ -25,6 +25,7 @@ class TestPortBinding(base.TestOVNFunctionalBase):
25 25
         self.ovs_host = 'ovs-host'
26 26
         self.dpdk_host = 'dpdk-host'
27 27
         self.invalid_dpdk_host = 'invalid-host'
28
+        self.vhu_mode = 'server'
28 29
         self.add_fake_chassis(self.ovs_host)
29 30
         self.add_fake_chassis(
30 31
             self.dpdk_host,
@@ -85,7 +86,7 @@ class TestPortBinding(base.TestOVNFunctionalBase):
85 86
 
86 87
         port_id = self._create_or_update_port(hostname=self.dpdk_host)
87 88
         expected_vif_details = {'port_filter': False,
88
-                                'vhostuser_mode': 'client',
89
+                                'vhostuser_mode': self.vhu_mode,
89 90
                                 'vhostuser_ovs_plug': True}
90 91
         expected_vif_details['vhostuser_socket'] = (
91 92
             utils.ovn_vhu_sockpath(cfg.CONF.ovn.vhost_sock_dir, port_id))
@@ -107,7 +108,7 @@ class TestPortBinding(base.TestOVNFunctionalBase):
107 108
         port_id = self._create_or_update_port(port_id=port_id,
108 109
                                               hostname=self.dpdk_host)
109 110
         expected_vif_details = {'port_filter': False,
110
-                                'vhostuser_mode': 'client',
111
+                                'vhostuser_mode': self.vhu_mode,
111 112
                                 'vhostuser_ovs_plug': True}
112 113
         expected_vif_details['vhostuser_socket'] = (
113 114
             utils.ovn_vhu_sockpath(cfg.CONF.ovn.vhost_sock_dir, port_id))

Loading…
Cancel
Save