[dpdk-dev] [PATCH] usertools/telemetry: add listing of available file prefixes
Power, Ciara
ciara.power at intel.com
Thu Oct 7 17:47:18 CEST 2021
Hi Conor,
>-----Original Message-----
>From: Walsh, Conor <conor.walsh at intel.com>
>Sent: Tuesday 5 October 2021 16:00
>To: Power, Ciara <ciara.power at intel.com>; Richardson, Bruce
><bruce.richardson at intel.com>
>Cc: dev at dpdk.org; Walsh, Conor <conor.walsh at intel.com>
>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 <conor.walsh at intel.com>
<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 <ciara.power at intel.com>
Thanks!
More information about the dev
mailing list