DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Laatz <kevin.laatz@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, bruce.richardson@intel.com,
	konstantin.ananyev@intel.com, Kevin Laatz <kevin.laatz@intel.com>
Subject: [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation
Date: Fri, 16 Jul 2021 13:21:55 +0000	[thread overview]
Message-ID: <20210716132155.1498858-1-kevin.laatz@intel.com> (raw)

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 <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 drivers/raw/ioat/dpdk_idxd_cfg.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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}"})
-- 
2.25.1


             reply	other threads:[~2021-07-16 13:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 13:21 Kevin Laatz [this message]
2021-07-16 14:10 ` Ananyev, Konstantin
2021-07-16 14:25 ` Bruce Richardson
2021-07-20 13:50 ` [dpdk-dev] [dpdk-stable] " David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210716132155.1498858-1-kevin.laatz@intel.com \
    --to=kevin.laatz@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).