From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 06/12] eal: add channel for primary/secondary communication Date: Fri, 29 Sep 2017 18:25:49 +0800 Message-ID: <20170929102549.GO2251@yliu-home> References: <1503654052-84730-1-git-send-email-jianfeng.tan@intel.com> <1503654052-84730-7-git-send-email-jianfeng.tan@intel.com> <20170927121947.GL2251@yliu-home> <20170929012437.GM2251@yliu-home> <42516fd9-ec53-043e-d24d-ba9fc04b085b@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: "Burakov, Anatoly" Return-path: Received: from mail-pg0-f54.google.com (mail-pg0-f54.google.com [74.125.83.54]) by dpdk.org (Postfix) with ESMTP id 807781B229 for ; Fri, 29 Sep 2017 12:28:09 +0200 (CEST) Received: by mail-pg0-f54.google.com with SMTP id 7so560185pgd.13 for ; Fri, 29 Sep 2017 03:28:09 -0700 (PDT) Content-Disposition: inline In-Reply-To: <42516fd9-ec53-043e-d24d-ba9fc04b085b@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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