From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH 06/12] eal: add channel for primary/secondary communication Date: Fri, 29 Sep 2017 11:09:23 +0100 Message-ID: <42516fd9-ec53-043e-d24d-ba9fc04b085b@intel.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: dev@dpdk.org Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id AE57E1B217 for ; Fri, 29 Sep 2017 12:09:26 +0200 (CEST) In-Reply-To: <20170929012437.GM2251@yliu-home> Content-Language: en-US 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 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