[dpdk-dev] [PATCH 06/12] eal: add channel for primary/secondary communication

Yuanhan Liu yliu at fridaylinux.org
Fri Sep 29 12:25:49 CEST 2017


On Fri, Sep 29, 2017 at 11:09:23AM +0100, Burakov, Anatoly wrote:
> 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.

I have no objection with /var/run. But HOME, no.

	--yliu


More information about the dev mailing list