[v2] dma/idxd: fix failure to configure a device instance for DSA
Checks
Commit Message
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(-)
Comments
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>
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>
>
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
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.
@@ -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