aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VppConfigGenerator.py
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-08-10 09:40:33 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-08-11 11:17:04 +0000
commit0202f7d927dbaf40235e0f6d573f69e66a6427b2 (patch)
tree631714dfd3f322e631f1dcc9402e38a3724e4a40 /resources/libraries/python/VppConfigGenerator.py
parent4f4177abee17e177978b4dd96c2c578aa8d57925 (diff)
feat(core): QAT initialization refactor
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: Idc91da55ab0b5c6b8eb53e8b4ce4da18a1ae891c
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()