f.write(str(contents))
-def configure_dsa(dsa_id, queues):
+def configure_dsa(dsa_id, queues, prefix):
"Configure the DSA instance with appropriate number of queues"
dsa_dir = SysfsDir(f"/sys/bus/dsa/devices/dsa{dsa_id}")
drv_dir = SysfsDir("/sys/bus/dsa/drivers/dsa")
wq_dir.write_values({"group_id": q % nb_groups,
"type": "user",
"mode": "dedicated",
- "name": f"dpdk_wq{dsa_id}.{q}",
+ "name": f"{prefix}_wq{dsa_id}.{q}",
"priority": 1,
"size": int(max_tokens / nb_queues)})
arg_p.add_argument('dsa_id', type=int, help="DSA instance number")
arg_p.add_argument('-q', metavar='queues', type=int, default=255,
help="Number of queues to set up")
+ arg_p.add_argument('--name-prefix', metavar='prefix', dest='prefix',
+ default="dpdk",
+ help="Prefix for workqueue name to mark for DPDK use [default: 'dpdk']")
parsed_args = arg_p.parse_args(args[1:])
- configure_dsa(parsed_args.dsa_id, parsed_args.q)
+ configure_dsa(parsed_args.dsa_id, parsed_args.q, parsed_args.prefix)
if __name__ == "__main__":