def _get_virtio_queue_sizes(self, host): """Returns rx/tx queue sizes configured or (None, None) Based on tx/rx queue sizes configured on host (nova.conf). The methods check whether the versions of libvirt and QEMU are corrects. """ # TODO(sahid): For vhostuser interface this function is called # from get_base_config and also from the method reponsible to # configure vhostuser interface meaning that the logs can be # duplicated. In future we want to rewrite get_base_config. rx, tx = CONF.libvirt.rx_queue_size, CONF.libvirt.tx_queue_size if rx and not host.has_min_version( MIN_LIBVIRT_RX_QUEUE_SIZE, MIN_QEMU_RX_QUEUE_SIZE): LOG.warning('Setting RX queue size requires libvirt %s and QEMU ' '%s version or greater.', libvirt_utils.version_to_string( MIN_LIBVIRT_RX_QUEUE_SIZE), libvirt_utils.version_to_string( MIN_QEMU_RX_QUEUE_SIZE)) rx = None if tx and not host.has_min_version( MIN_LIBVIRT_TX_QUEUE_SIZE, MIN_QEMU_TX_QUEUE_SIZE): LOG.warning('Setting TX queue size requires libvirt %s and QEMU ' '%s version or greater.', libvirt_utils.version_to_string( MIN_LIBVIRT_TX_QUEUE_SIZE), libvirt_utils.version_to_string( MIN_QEMU_TX_QUEUE_SIZE)) tx = None return rx, tx
def _get_virtio_queue_sizes(self, host): """Returns rx/tx queue sizes configured or (None, None) Based on tx/rx queue sizes configured on host (nova.conf). The methods check whether the versions of libvirt and QEMU are corrects. """ # TODO(sahid): For vhostuser interface this function is called # from get_base_config and also from the method reponsible to # configure vhostuser interface meaning that the logs can be # duplicated. In future we want to rewrite get_base_config. rx, tx = CONF.libvirt.rx_queue_size, CONF.libvirt.tx_queue_size if rx and not host.has_min_version( MIN_LIBVIRT_RX_QUEUE_SIZE, MIN_QEMU_RX_QUEUE_SIZE): LOG.warning('Setting RX queue size requires libvirt %s and QEMU ' '%s version or greater.', libvirt_utils.version_to_string( MIN_LIBVIRT_RX_QUEUE_SIZE), libvirt_utils.version_to_string( MIN_QEMU_RX_QUEUE_SIZE)) rx = None if tx and not host.has_min_version( MIN_LIBVIRT_TX_QUEUE_SIZE, MIN_QEMU_TX_QUEUE_SIZE): LOG.warning('Setting TX queue size requires libvirt %s and QEMU ' '%s version or greater.', libvirt_utils.version_to_string( MIN_LIBVIRT_TX_QUEUE_SIZE), libvirt_utils.version_to_string( MIN_QEMU_TX_QUEUE_SIZE)) tx = None return rx, tx
def version_to_string(version): return libvirt_utils.version_to_string(version)
def version_to_string(version): return libvirt_utils.version_to_string(version)