DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation
@ 2021-07-16 13:21 Kevin Laatz
  2021-07-16 14:10 ` Ananyev, Konstantin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kevin Laatz @ 2021-07-16 13:21 UTC (permalink / raw)
  To: dev; +Cc: stable, bruce.richardson, konstantin.ananyev, Kevin Laatz

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation
  2021-07-16 13:21 [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation Kevin Laatz
@ 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
  2 siblings, 0 replies; 4+ messages in thread
From: Ananyev, Konstantin @ 2021-07-16 14:10 UTC (permalink / raw)
  To: Laatz, Kevin, dev; +Cc: stable, Richardson, Bruce


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

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation
  2021-07-16 13:21 [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation Kevin Laatz
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2021-07-16 14:25 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: dev, stable, konstantin.ananyev

On Fri, Jul 16, 2021 at 01:21:55PM +0000, Kevin Laatz wrote:
> 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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] raw/ioat: fix config script queue size calculation
  2021-07-16 13:21 [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation Kevin Laatz
  2021-07-16 14:10 ` Ananyev, Konstantin
  2021-07-16 14:25 ` Bruce Richardson
@ 2021-07-20 13:50 ` David Marchand
  2 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2021-07-20 13:50 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: dev, dpdk stable, Bruce Richardson, Ananyev, Konstantin

On Fri, Jul 16, 2021 at 3:22 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
>
> 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>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-20 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 13:21 [dpdk-dev] [PATCH] raw/ioat: fix config script queue size calculation Kevin Laatz
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

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).