Hi Conor,
>-----Original Message-----
>From: Walsh, Conor <[email protected]>
>Sent: Tuesday 5 October 2021 16:00
>To: Power, Ciara <[email protected]>; Richardson, Bruce
><[email protected]>
>Cc: [email protected]; Walsh, Conor <[email protected]>
>Subject: [PATCH] usertools/telemetry: add listing of available file prefixes
>
>This patch adds the option --list (-l) to dpdk-telemetry.py which will print
>all of the
>available dpdk file-prefixes that have telemetry enabled.
>The prefixes will also be printed if the user passes an incorrect prefix in
>the --file-
>prefix (-f) option.
>
>Depends-on: series-19390 ("improve telemetry support with in-memory mode")
>
>Signed-off-by: Conor Walsh <[email protected]>
<snip>
>+
>+def list_fp():
>+ """ List all available file-prefixes to user """
>+ print("Valid file-prefixes:\n")
Nit: I think it might be cleaner to move this down to just before the file
prefixes print out, so it doesn't print out when no apps are available.
>+ path = get_dpdk_runtime_dir('')
>+
>+ sockets = glob.glob(os.path.join(path, "*", SOCKET_NAME + "*"))
>+ prefixes = []
>+ if not sockets:
>+ print("\tNo DPDK apps with telemetry enabled available")
>+ for s in sockets:
>+ prefixes.append(os.path.relpath(os.path.dirname(s), start=path))
>+ for p in sorted(set(prefixes)):
>+ print(p)
>+ print_socket_options(p, glob.glob(os.path.join(path, p,
>+ SOCKET_NAME +
>+ "*")))
<snip>
Asides from that one small comment,
Acked-by: Ciara Power <[email protected]>
Thanks!