From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <anatoly.burakov@intel.com>
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 by dpdk.org (Postfix) with ESMTP id AE57E1B217
 for <dev@dpdk.org>; Fri, 29 Sep 2017 12:09:26 +0200 (CEST)
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
 by orsmga105.jf.intel.com with ESMTP; 29 Sep 2017 03:09:25 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.42,452,1500966000"; d="scan'208";a="156932978"
Received: from aburakov-mobl2.ger.corp.intel.com (HELO [10.252.17.97])
 ([10.252.17.97])
 by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2017 03:09:24 -0700
To: dev@dpdk.org
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>
 <ED26CBA2FAD1BF48A8719AEF02201E36512F9A52@SHSMSX103.ccr.corp.intel.com>
 <20170929012437.GM2251@yliu-home>
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Message-ID: <42516fd9-ec53-043e-d24d-ba9fc04b085b@intel.com>
Date: Fri, 29 Sep 2017 11:09:23 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <20170929012437.GM2251@yliu-home>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH 06/12] eal: add channel for primary/secondary
 communication
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 29 Sep 2017 10:09:27 -0000

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