X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;h=0628e8ee4757282324cb5d91c5e9f690d3b12c06;hb=e2c0d2e1481f899ba82a3892694a04a127668b2b;hp=a57d24cde5787e5f223158874b0150f8209679ee;hpb=772f4202ff7b79da6ce3f230adf496279c009b28;p=csit.git diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index a57d24cde5..0628e8ee47 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -259,12 +259,13 @@ class VppConfigGenerator: :param count: Number of HW crypto devices to add. :type count: int """ - cryptodev = Topology.get_cryptodev(self._node) - for i in range(count): - cryptodev_config = re.sub(r"\d.\d$", f"1.{str(i)}", cryptodev) - path = [u"dpdk", f"dev {cryptodev_config}"] - self.add_config_item(self._nodeconfig, u"", path) - self.add_dpdk_uio_driver(u"vfio-pci") + cryptodevs = Topology.get_cryptodev(self._node) + for device in cryptodevs.values(): + for i in range(int(count/len(cryptodevs))): + addr = re.sub(r"\d.\d$", f"0.{i+1}", device["pci_address"]) + path = ["dpdk", f"dev {addr}"] + self.add_config_item(self._nodeconfig, "", path) + self.add_dpdk_uio_driver("vfio-pci") def add_dpdk_sw_cryptodev(self, sw_pmd_type, socket_id, count): """Add DPDK SW Crypto device configuration. @@ -740,4 +741,4 @@ class VppInitConfig: ) vpp_config.add_ip6_hash_buckets(2000000) vpp_config.add_ip6_heap_size("4G") - vpp_config.apply_config() \ No newline at end of file + vpp_config.apply_config()