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

Reply via email to