<div dir="ltr"><div><b>Note:  Changed subject line from /run/dpdk/powermanager -> /run/dpdk/powermonitor</b></div><div><br></div><div dir="ltr">Hi All,<div><br></div><div>Apologies for the delay.</div><div><br></div><div>So, I am following the above thread and below are what I understand are the changes that are needed :</div><div><br></div><div><ol><li>I see that rte_eal_get_runtime_dir() is RTE_EXPORTED_SYMBOL.  I will verify that channel_manager has access to this symbol.</li><li>Upon successful creation of /run/dpdk, I can mkdir CHANNEL_MGR_SOCKET_PATH (/var/run/dpdk/powermonitor) and opendir() that for subsequent processing.</li><li>Fixup the documentation to reflect correct powermonitor path</li></ol><div>Please let me know if I am missing anything or if I misinterpreting any part of the email exchange.</div></div><div><br></div><div>Thanks for all your help and support.</div><div><br></div><div>-Sudheendra G Sampath</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, May 29, 2026 at 9:01 AM Bruce Richardson <<a href="mailto:bruce.richardson@intel.com">bruce.richardson@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, May 29, 2026 at 08:23:24AM -0700, Stephen Hemminger wrote:<br>
> On Fri, 29 May 2026 09:01:34 +0100<br>
> Bruce Richardson <<a href="mailto:bruce.richardson@intel.com" target="_blank">bruce.richardson@intel.com</a>> wrote:<br>
> <br>
> > On Thu, May 28, 2026 at 07:04:48PM +0000, Sudheendra Sampath wrote:<br>
> > > This patch for bug 1832 will do the following:<br>
> > > 1.  If /run/dpdk is not present, it will create it first with and<br>
> > >     then create powermanager directory underneath it.<br>
> > > 2.  If /run/dpdk is present, it will verify it is actually a directory<br>
> > >     before creating subdirectory, powermanager.<br>
> > >   <br>
> > I would suggest using $XDG_RUNTIME_DIR for the directory path, rather than<br>
> > hardcoding it by default. If XDG_RUNTIME_DIR is not set, then maybe<br>
> > consider using /run/dpdk. However, rather than /run/dpdk, I'd suggest using<br>
> > the normal runtime dir path on most distros as the default:<br>
> > /run/user/<uid>.<br>
> > <br>
> > /Bruce<br>
> <br>
> The login in EAL is a little more detailed.<br>
> The choice is from systemd conventions which follows filesystem hierarchy.<br>
> <br>
> <br>
> int eal_create_runtime_dir(void)<br>
> {<br>
>       const char *directory;<br>
>       char run_dir[PATH_MAX];<br>
>       char tmp[PATH_MAX];<br>
>       int ret;<br>
> <br>
>       /* from RuntimeDirectory= see systemd.exec */<br>
>       directory = getenv("RUNTIME_DIRECTORY");<br>
>       if (directory == NULL) {<br>
>               /*<br>
>                * Used standard convention defined in<br>
>                * XDG Base Directory Specification and<br>
>                * Filesystem Hierarchy Standard.<br>
>                */<br>
>               if (getuid() == 0)<br>
>                       directory = "/var/run";<br>
>               else<br>
>                       directory = getenv("XDG_RUNTIME_DIR") ? : "/tmp";<br>
>       }<br>
> <br>
>       /* create DPDK subdirectory under runtime dir */<br>
>       ret = snprintf(tmp, sizeof(tmp), "%s/dpdk", directory);<br>
>       if (ret < 0 || ret == sizeof(tmp)) {<br>
>               EAL_LOG(ERR, "Error creating DPDK runtime path name");<br>
>               return -1;<br>
>       }<br>
> <br>
>       /* create prefix-specific subdirectory under DPDK runtime dir */<br>
>       ret = snprintf(run_dir, sizeof(run_dir), "%s/%s",<br>
>                       tmp, eal_get_hugefile_prefix());<br>
>       if (ret < 0 || ret == sizeof(run_dir)) {<br>
>               EAL_LOG(ERR, "Error creating prefix-specific runtime path name");<br>
>               return -1;<br>
>       }<br>
> <br>
>       /* create the path if it doesn't exist. no "mkdir -p" here, so do it<br>
>        * step by step.<br>
>        */<br>
>       ret = mkdir(tmp, 0700);<br>
>       if (ret < 0 && errno != EEXIST) {<br>
>               EAL_LOG(ERR, "Error creating '%s': %s",<br>
>                       tmp, strerror(errno));<br>
>               return -1;<br>
>       }<br>
> <br>
>       ret = mkdir(run_dir, 0700);<br>
>       if (ret < 0 && errno != EEXIST) {<br>
>               EAL_LOG(ERR, "Error creating '%s': %s",<br>
>                       run_dir, strerror(errno));<br>
>               return -1;<br>
>       }<br>
<br>
Yes. Can the power manager call the rte_eal_get_runtime_dir() API and use<br>
that as a basis for its working directory? Save duplicating all this logic.<br>
<br>
/Bruce<br>
</blockquote></div></div>