From: Kevin Laatz Date: Fri, 16 Jul 2021 13:21:55 +0000 (+0000) Subject: raw/ioat: fix config script queue size calculation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9cf9ac48b116e371e25e1daca33636e9cdc07db8;p=dpdk.git raw/ioat: fix config script queue size calculation The queue size calculation is currently based on "max_tokens" rather than "max_work_queues_size". This is resulting in the queue size being incorrectly configured when using the script to configure devices bound to the IDXD kernel driver. This patch fixes this miscalculation so devices are configured with appropriate queue size. Fixes: 01863b9d2354 ("raw/ioat: include example configuration script") Cc: stable@dpdk.org Reported-by: Konstantin Ananyev Signed-off-by: Kevin Laatz Acked-by: Konstantin Ananyev Acked-by: Bruce Richardson --- diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py index 83ef4817db..fcc27822ef 100755 --- a/drivers/raw/ioat/dpdk_idxd_cfg.py +++ b/drivers/raw/ioat/dpdk_idxd_cfg.py @@ -63,7 +63,7 @@ def configure_dsa(dsa_id, queues, prefix): max_groups = dsa_dir.read_int("max_groups") max_engines = dsa_dir.read_int("max_engines") max_queues = dsa_dir.read_int("max_work_queues") - max_tokens = dsa_dir.read_int("max_tokens") + max_work_queues_size = dsa_dir.read_int("max_work_queues_size") nb_queues = min(queues, max_queues) if queues > nb_queues: @@ -82,7 +82,7 @@ def configure_dsa(dsa_id, queues, prefix): "mode": "dedicated", "name": f"{prefix}_wq{dsa_id}.{q}", "priority": 1, - "size": int(max_tokens / nb_queues)}) + "size": int(max_work_queues_size / nb_queues)}) # enable device and then queues drv_dir.write_values({"bind": f"dsa{dsa_id}"})