aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VppConfigGenerator.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/VppConfigGenerator.py')
-rw-r--r--resources/libraries/python/VppConfigGenerator.py15
1 files changed, 8 insertions, 7 deletions
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()