- cryptodev_config = 'vdev cryptodev_{0}_pmd,socket_id={1}'.\
- format(sw_pmd_type, str(socket_id))
- path = ['dpdk', cryptodev_config]
- self.add_config_item(self._nodeconfig, '', path)
-
- def add_dpdk_eth_bond_dev(self, ethbond_id, mode, xmit_policy, *slaves):
- """Add DPDK Eth_bond device configuration.
-
- :param ethbond_id: Eth_bond device ID.
- :param mode: Link bonding mode.
- :param xmit_policy: Transmission policy.
- :param slaves: PCI device(s) to be bonded (format xxxx:xx:xx.x).
- :type ethbond_id: str or int
- :type mode: str or int
- :type xmit_policy: str
- :type slaves: list
- """
- slaves_config = ',slave=' + \
- ',slave='.join(slave if pci_dev_check(slave) else ''
- for slave in slaves)
- ethbond_config = 'vdev eth_bond{id},mode={mode}{slaves},' \
- 'xmit_policy={xmit_pol}'.format(id=ethbond_id,
- mode=mode,
- slaves=slaves_config,
- xmit_pol=xmit_policy)
- path = ['dpdk', ethbond_config]
- self.add_config_item(self._nodeconfig, '', path)
+ cryptodev_config = f"vdev cryptodev_{sw_pmd_type}_pmd," \
+ f"socket_id={str(socket_id)}"
+ path = [u"dpdk", cryptodev_config]
+ self.add_config_item(self._nodeconfig, u"", path)