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

Function get_dpdk_runtime_dir

dpdk/usertools/dpdk-telemetry-client.py:135–144  ·  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

133
134
135def get_dpdk_runtime_dir(fp):
136 """ Using the same logic as in DPDK's EAL, get the DPDK runtime directory
137 based on the file-prefix and user """
138 run_dir = os.environ.get('RUNTIME_DIRECTORY')
139 if not run_dir:
140 if (os.getuid() == 0):
141 run_dir = '/var/run'
142 else:
143 run_dir = os.environ.get('XDG_RUNTIME_DIR', '/tmp')
144 return os.path.join(run_dir, 'dpdk', fp)
145
146
147if __name__ == "__main__":

Callers 1

setRunpathMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected