* [PATCH] dma/idxd: fix failure to configure a device instance for DSA
@ 2024-06-28 5:34 Wenwu Ma
2024-06-28 9:27 ` Bruce Richardson
2024-06-28 9:54 ` [PATCH v2] " Wenwu Ma
0 siblings, 2 replies; 8+ messages in thread
From: Wenwu Ma @ 2024-06-28 5:34 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: songx.jiale, Wenwu Ma
In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
DPDK needs to write a correct value to this file when configuring a device
instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
configured, this patch fixes the issue.
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
---
drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index c0c833ade9..9ca4c4d76c 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
"priority": 1,
"max_batch_size": 1024,
"size": int(max_work_queues_size / nb_queues)}
- wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
+ if os.path.exists(SysfsDir(os.path.join(wq_dir.path, f"driver_name")).path):
+ wqcfg.update({"driver_name": "user"})
+ wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir.write_values(wqcfg)
# enable device and then queues
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dma/idxd: fix failure to configure a device instance for DSA
2024-06-28 5:34 [PATCH] dma/idxd: fix failure to configure a device instance for DSA Wenwu Ma
@ 2024-06-28 9:27 ` Bruce Richardson
2024-06-28 10:08 ` Ma, WenwuX
2024-06-28 9:54 ` [PATCH v2] " Wenwu Ma
1 sibling, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2024-06-28 9:27 UTC (permalink / raw)
To: Wenwu Ma; +Cc: dev, songx.jiale
On Fri, Jun 28, 2024 at 01:34:58PM +0800, Wenwu Ma wrote:
> In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
> DPDK needs to write a correct value to this file when configuring a device
> instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
> configured, this patch fixes the issue.
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
One comment inline below. With that addressed:
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
> index c0c833ade9..9ca4c4d76c 100755
> --- a/drivers/dma/idxd/dpdk_idxd_cfg.py
> +++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
> @@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
> "priority": 1,
> "max_batch_size": 1024,
> "size": int(max_work_queues_size / nb_queues)}
> - wqcfg.update(parse_wq_opts(args.wq_option))
> wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
> + if os.path.exists(SysfsDir(os.path.join(wq_dir.path, f"driver_name")).path):
I think this be simplified to remove the extra SysfsDir call as:
if os.path.exists(os.path.join(wq_dir.path,"driver_name")):
> + wqcfg.update({"driver_name": "user"})
> + wqcfg.update(parse_wq_opts(args.wq_option))
> wq_dir.write_values(wqcfg)
>
> # enable device and then queues
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] dma/idxd: fix failure to configure a device instance for DSA
2024-06-28 5:34 [PATCH] dma/idxd: fix failure to configure a device instance for DSA Wenwu Ma
2024-06-28 9:27 ` Bruce Richardson
@ 2024-06-28 9:54 ` Wenwu Ma
2024-06-28 10:25 ` Bruce Richardson
1 sibling, 1 reply; 8+ messages in thread
From: Wenwu Ma @ 2024-06-28 9:54 UTC (permalink / raw)
To: dev, bruce.richardson; +Cc: songx.jiale, Wenwu Ma
In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
DPDK needs to write a correct value to this file when configuring a device
instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
configured, this patch fixes the issue.
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
---
v2:
- refine the code
---
drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index c0c833ade9..5c9572b49d 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
"priority": 1,
"max_batch_size": 1024,
"size": int(max_work_queues_size / nb_queues)}
- wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
+ if os.path.exists(os.path.join(wq_dir.path, f"driver_name")):
+ wqcfg.update({"driver_name": "user"})
+ wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir.write_values(wqcfg)
# enable device and then queues
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] dma/idxd: fix failure to configure a device instance for DSA
2024-06-28 9:27 ` Bruce Richardson
@ 2024-06-28 10:08 ` Ma, WenwuX
0 siblings, 0 replies; 8+ messages in thread
From: Ma, WenwuX @ 2024-06-28 10:08 UTC (permalink / raw)
To: Richardson, Bruce; +Cc: dev, Jiale, SongX
hi
> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Friday, June 28, 2024 5:28 PM
> To: Ma, WenwuX <wenwux.ma@intel.com>
> Cc: dev@dpdk.org; Jiale, SongX <songx.jiale@intel.com>
> Subject: Re: [PATCH] dma/idxd: fix failure to configure a device instance for
> DSA
>
> On Fri, Jun 28, 2024 at 01:34:58PM +0800, Wenwu Ma wrote:
> > In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
> > DPDK needs to write a correct value to this file when configuring a
> > device instance using the dpdk_idxd_cfg.py script, otherwise it will
> > fail to be configured, this patch fixes the issue.
> >
> > Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> > ---
>
> One comment inline below. With that addressed:
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
> > drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py
> > b/drivers/dma/idxd/dpdk_idxd_cfg.py
> > index c0c833ade9..9ca4c4d76c 100755
> > --- a/drivers/dma/idxd/dpdk_idxd_cfg.py
> > +++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
> > @@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
> > "priority": 1,
> > "max_batch_size": 1024,
> > "size": int(max_work_queues_size / nb_queues)}
> > - wqcfg.update(parse_wq_opts(args.wq_option))
> > wq_dir = SysfsDir(os.path.join(dsa_dir.path,
> > f"wq{dsa_id}.{q}"))
> > + if os.path.exists(SysfsDir(os.path.join(wq_dir.path,
> f"driver_name")).path):
>
> I think this be simplified to remove the extra SysfsDir call as:
> if os.path.exists(os.path.join(wq_dir.path,"driver_name")):
Ok, thanks
>
> > + wqcfg.update({"driver_name": "user"})
> > + wqcfg.update(parse_wq_opts(args.wq_option))
> > wq_dir.write_values(wqcfg)
> >
> > # enable device and then queues
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] dma/idxd: fix failure to configure a device instance for DSA
2024-06-28 9:54 ` [PATCH v2] " Wenwu Ma
@ 2024-06-28 10:25 ` Bruce Richardson
2024-07-09 10:18 ` David Marchand
2024-07-09 11:14 ` David Marchand
0 siblings, 2 replies; 8+ messages in thread
From: Bruce Richardson @ 2024-06-28 10:25 UTC (permalink / raw)
To: Wenwu Ma; +Cc: dev, songx.jiale
On Fri, Jun 28, 2024 at 05:54:00PM +0800, Wenwu Ma wrote:
> In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
> DPDK needs to write a correct value to this file when configuring a device
> instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
> configured, this patch fixes the issue.
>
> Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] dma/idxd: fix failure to configure a device instance for DSA
2024-06-28 10:25 ` Bruce Richardson
@ 2024-07-09 10:18 ` David Marchand
2024-07-09 10:22 ` Bruce Richardson
2024-07-09 11:14 ` David Marchand
1 sibling, 1 reply; 8+ messages in thread
From: David Marchand @ 2024-07-09 10:18 UTC (permalink / raw)
To: Bruce Richardson, dev; +Cc: Wenwu Ma, songx.jiale
On Fri, Jun 28, 2024 at 12:26 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Jun 28, 2024 at 05:54:00PM +0800, Wenwu Ma wrote:
> > In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
> > DPDK needs to write a correct value to this file when configuring a device
> > instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
> > configured, this patch fixes the issue.
Pointing at the kernel version would be useful too.
I suppose this change is introduced with 7af1e0aceeb3 ("dmaengine:
idxd: add wq driver name support for accel-config user tool").
Can you confirm?
> >
> > Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
--
David Marchand
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] dma/idxd: fix failure to configure a device instance for DSA
2024-07-09 10:18 ` David Marchand
@ 2024-07-09 10:22 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2024-07-09 10:22 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Wenwu Ma, songx.jiale
On Tue, Jul 09, 2024 at 12:18:29PM +0200, David Marchand wrote:
> On Fri, Jun 28, 2024 at 12:26 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Fri, Jun 28, 2024 at 05:54:00PM +0800, Wenwu Ma wrote:
> > > In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
> > > DPDK needs to write a correct value to this file when configuring a device
> > > instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
> > > configured, this patch fixes the issue.
>
> Pointing at the kernel version would be useful too.
> I suppose this change is introduced with 7af1e0aceeb3 ("dmaengine:
> idxd: add wq driver name support for accel-config user tool").
>
> Can you confirm?
>
Looks correct to me, yes. That commit introduces a driver_name node in
sysfs.
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] dma/idxd: fix failure to configure a device instance for DSA
2024-06-28 10:25 ` Bruce Richardson
2024-07-09 10:18 ` David Marchand
@ 2024-07-09 11:14 ` David Marchand
1 sibling, 0 replies; 8+ messages in thread
From: David Marchand @ 2024-07-09 11:14 UTC (permalink / raw)
To: Wenwu Ma; +Cc: dev, songx.jiale, Bruce Richardson
On Fri, Jun 28, 2024 at 12:26 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Jun 28, 2024 at 05:54:00PM +0800, Wenwu Ma wrote:
> > In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs,
> > DPDK needs to write a correct value to this file when configuring a device
> > instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
> > configured, this patch fixes the issue.
> >
> > Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-07-09 11:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-28 5:34 [PATCH] dma/idxd: fix failure to configure a device instance for DSA Wenwu Ma
2024-06-28 9:27 ` Bruce Richardson
2024-06-28 10:08 ` Ma, WenwuX
2024-06-28 9:54 ` [PATCH v2] " Wenwu Ma
2024-06-28 10:25 ` Bruce Richardson
2024-07-09 10:18 ` David Marchand
2024-07-09 10:22 ` Bruce Richardson
2024-07-09 11:14 ` 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).