Skip to content

Commit 15e082a

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "vif: Remove dead minimum libvirt checks"
2 parents 11cb42f + fea589c commit 15e082a

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

nova/tests/unit/virt/libvirt/test_vif.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ def test_virtio_vhost_queue_sizes_vnic_type_virtio_forwarder(
737737
@mock.patch.object(host.Host, "has_min_version", return_value=False)
738738
def test_virtio_vhost_queue_sizes_nover(self, has_min_version):
739739
_, _, conf = self._test_virtio_config_queue_sizes()
740-
self.assertIsNone(conf.vhost_rx_queue_size)
740+
self.assertEqual(512, conf.vhost_rx_queue_size)
741741
self.assertIsNone(conf.vhost_tx_queue_size)
742742

743743
@mock.patch.object(host.Host, "has_min_version", return_value=True)
@@ -753,7 +753,7 @@ def test_virtio_vhostuser_osvif_queue_sizes_ver_err(self, has_min_version):
753753
hostimpl, v, conf = self._test_virtio_config_queue_sizes()
754754
v._set_config_VIFVHostUser(self.instance, self.os_vif_vhostuser,
755755
conf, hostimpl)
756-
self.assertIsNone(conf.vhost_rx_queue_size)
756+
self.assertEqual(512, conf.vhost_rx_queue_size)
757757
self.assertIsNone(conf.vhost_tx_queue_size)
758758

759759
def test_multiple_nics(self):
@@ -1178,23 +1178,6 @@ def test_hw_veb_driver_macvtap(self, ver_mock, mock_get_ifname):
11781178
vlan_want = self.vif_hw_veb["details"]["vlan"]
11791179
self.assertEqual(int(vlan), vlan_want)
11801180

1181-
@mock.patch.object(pci_utils, 'get_ifname_by_pci_address',
1182-
return_value='eth1')
1183-
@mock.patch.object(host.Host, "has_min_version", return_value=False)
1184-
def test_hw_veb_driver_macvtap_pre_vlan_support(self, ver_mock,
1185-
mock_get_ifname):
1186-
d = vif.LibvirtGenericVIFDriver()
1187-
xml = self._get_instance_xml(
1188-
d, self.vif_hw_veb_macvtap,
1189-
has_min_libvirt_version=ver_mock.return_value)
1190-
node = self._get_node(xml)
1191-
self.assertEqual(node.get("type"), "direct")
1192-
self._assertTypeEquals(node, "direct", "source",
1193-
"dev", "eth1")
1194-
self._assertTypeEquals(node, "direct", "source",
1195-
"mode", "passthrough")
1196-
self._assertMacEquals(node, self.vif_hw_veb_macvtap)
1197-
11981181
def test_driver_macvtap_vlan(self):
11991182
d = vif.LibvirtGenericVIFDriver()
12001183
xml = self._get_instance_xml(d, self.vif_macvtap_vlan)

nova/virt/libvirt/vif.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@
5555
MIN_LIBVIRT_INTERFACE_MTU = (3, 3, 0)
5656
MIN_QEMU_INTERFACE_MTU = (2, 9, 0)
5757

58-
# virtio-net.rx_queue_size support
59-
MIN_LIBVIRT_RX_QUEUE_SIZE = (2, 3, 0)
60-
MIN_QEMU_RX_QUEUE_SIZE = (2, 7, 0)
6158
# virtio-net.tx_queue_size support
6259
MIN_LIBVIRT_TX_QUEUE_SIZE = (3, 7, 0)
6360
MIN_QEMU_TX_QUEUE_SIZE = (2, 10, 0)
@@ -447,15 +444,6 @@ def _get_virtio_queue_sizes(self, host):
447444
# configure vhostuser interface meaning that the logs can be
448445
# duplicated. In future we want to rewrite get_base_config.
449446
rx, tx = CONF.libvirt.rx_queue_size, CONF.libvirt.tx_queue_size
450-
if rx and not host.has_min_version(
451-
MIN_LIBVIRT_RX_QUEUE_SIZE, MIN_QEMU_RX_QUEUE_SIZE):
452-
LOG.warning('Setting RX queue size requires libvirt %s and QEMU '
453-
'%s version or greater.',
454-
libvirt_utils.version_to_string(
455-
MIN_LIBVIRT_RX_QUEUE_SIZE),
456-
libvirt_utils.version_to_string(
457-
MIN_QEMU_RX_QUEUE_SIZE))
458-
rx = None
459447
if tx and not host.has_min_version(
460448
MIN_LIBVIRT_TX_QUEUE_SIZE, MIN_QEMU_TX_QUEUE_SIZE):
461449
LOG.warning('Setting TX queue size requires libvirt %s and QEMU '

0 commit comments

Comments
 (0)