MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_dpdk_runtime_dir

Function get_dpdk_runtime_dir

dpdk/usertools/dpdk-telemetry.py:76–85  ·  view source on GitHub ↗

Using the same logic as in DPDK's EAL, get the DPDK runtime directory based on the file-prefix and user

(fp)

Source from the content-addressed store, hash-verified

74
75
76def get_dpdk_runtime_dir(fp):
77 """ Using the same logic as in DPDK's EAL, get the DPDK runtime directory
78 based on the file-prefix and user """
79 run_dir = os.environ.get('RUNTIME_DIRECTORY')
80 if not run_dir:
81 if (os.getuid() == 0):
82 run_dir = '/var/run'
83 else:
84 run_dir = os.environ.get('XDG_RUNTIME_DIR', '/tmp')
85 return os.path.join(run_dir, 'dpdk', fp)
86
87
88def list_fp():

Callers 2

list_fpFunction · 0.70
dpdk-telemetry.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected