Skip to content

Commit

Permalink
dma/idxd: fix setup with Ubuntu 24.04
Browse files Browse the repository at this point in the history
[ upstream commit d569af3 ]

In Ubuntu 24.04 and with Linux kernel >= v6.7, DSA's workqueue has a
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.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7af1e0aceeb3
Signed-off-by: Wenwu Ma <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
  • Loading branch information
wenwumax authored and kevintraynor committed Aug 30, 2024
1 parent 1459c42 commit c1ddc9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/dma/idxd/dpdk_idxd_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1ddc9a

Please sign in to comment.