On 29-Sep-17 2:24 AM, Yuanhan Liu wrote:
On Thu, Sep 28, 2017 at 01:50:20PM +0000, Tan, Jianfeng wrote:
+/** Path of primary/secondary communication unix socket file. */
+#define PRIMARY_SECONDARY_UNIX_PATH_FMT "%s/.%s_unix"
+static inline const char *
+eal_primary_secondary_unix_path(void)
+{
+       static char buffer[PATH_MAX]; /* static so auto-zeroed */
+       const char *directory = default_config_dir;
+       const char *home_dir = getenv("HOME");

It's not a good practice to generate such file at HOME dir. User would
be surprised to find it at HOME dir. In the worst case, user might delete
it.

This way is the legacy way in DPDK, for example the config path. So I think we 
should fix that in another patch.

Yes, I think so.

        --yliu


The more common way is to put it to tmp dir, like "/tmp".

Thanks,
Jianfeng


The way VFIO does it is, if we have permissions, we put the socket file in /var/run (which i also think is a better place for a socket than /tmp). If we don't, we fall back to HOME.

--
Thanks,
Anatoly

Reply via email to