aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2024-02-07 15:38:51 +0100
committerPeter Mikus <peter.mikus@protonmail.ch>2024-02-13 08:55:12 +0000
commitd209b65c6f7d53d8f338d0a8d7d8a996a378b520 (patch)
tree6b083a5a8bb7ddb43d8772596f4b855ac25f3386
parentad24106d404908295629b8e107963e24192569a4 (diff)
feat(core): QAT RXQ allocation
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch> Change-Id: I78501f08b29a202c0e1129b79af6a63299e8ee36 (cherry picked from commit 1948fa0b1a1e67a13fc17207146d8ad57d001774)
-rw-r--r--resources/libraries/python/VppConfigGenerator.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index 0628e8ee47..e0205abd55 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -253,18 +253,22 @@ class VppConfigGenerator:
path = [u"dpdk", f"dev {device}"]
self.add_config_item(self._nodeconfig, u"", path)
- def add_dpdk_cryptodev(self, count):
+ def add_dpdk_cryptodev(self, count, num_rx_queues=1):
"""Add DPDK Crypto PCI device configuration.
:param count: Number of HW crypto devices to add.
+ :param num_rx_queues: Number of RX queues per QAT interface.
:type count: int
+ :type num_rx_queues: int
"""
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)
+ numvfs = device["numvfs"]
+ computed = f"{(i+1)//numvfs}.{(i+1)%numvfs}"
+ addr = re.sub(r"\d.\d$", computed, device["pci_address"])
+ path = ["dpdk", f"dev {addr}", "num-rx-queues"]
+ self.add_config_item(self._nodeconfig, num_rx_queues, path)
self.add_dpdk_uio_driver("vfio-pci")
def add_dpdk_sw_cryptodev(self, sw_pmd_type, socket_id, count):