From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yliu@fridaylinux.org>
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 <dev@dpdk.org>; Fri, 29 Sep 2017 12:28:09 +0200 (CEST)
Received: by mail-pg0-f54.google.com with SMTP id 7so560185pgd.13
 for <dev@dpdk.org>; Fri, 29 Sep 2017 03:28:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=fridaylinux-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to:user-agent;
 bh=OCiiMQ9HvLL5EJl6Au8JUxPXd6sbTwrq7Ykv/g+HOlU=;
 b=aF67B3jq907t3FFzsD6csqX0HF/DjlhpKLhYYNSOi+vOZsi8OhpNImw2lj5YGa/XRu
 QcaLSyotSsRM3WL4Z3CKYgDyz0iiHIdRMmeGuhKdHYnccW4M8G0Gd9VTJC3XwA0LN0ea
 Fx/cOaw81cRgtdZWvo7HlKaPa4ZRAE/dwQsRJLskgMrz8zMovKwGiUuI63JuQdsjFp/1
 Awpl4h2Bkz5RXZv1ZGGaj0yOlxBlxUbkPsRllSsttS5SGSr4er/MvL2uT/zor5CUKFzY
 0/5pa5MSDkwnShZ4zHw7y3A0O4bA9Bm+A4U6ty5pXf8NgrHXY8ImLO/lzZQ0/k65ABv5
 6duw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:in-reply-to:user-agent;
 bh=OCiiMQ9HvLL5EJl6Au8JUxPXd6sbTwrq7Ykv/g+HOlU=;
 b=csdLizgk9+HazJ97yKN9gQvs9Nkyk0kEd6Wh93s6XDTjJhP+KyZ2H2+NFoTMu+WiVD
 tlDeNU1P2Br6zLsGOXD6TdwmqpaF65dIELBGcWqRZxof23YWLRiyXKfK10EAZM5M9msl
 ilfG96fEq+fvgGoCsChmd8H25WdY1fSgsPTICIZKHd2n+3FfgOUtx0qngBHagmhAxMcq
 3YBCQvAtHsC+wGrJ/IqVmHNtKMnGCbtgo/xzJhNb7/fsWjZyS4i/FiskBsd4Vm8uJc3Z
 i650BACqMjU2giWAOMSPJ9KO498RINOaioWke5XSUC/BKbft4wW6TK1gFq6Vap3tzxHO
 GJNw==
X-Gm-Message-State: AHPjjUh4XDRKrr3GCEWJNxxafVnSRfKRstGI0QAEtTZVmU7/vlNzmZhG
 PDdLluQmpvU+frR6LVYcBcSvM6NPL/k=
X-Google-Smtp-Source: AOwi7QAfQS2vTsoOgINSkT/nAaVgmSxemwkgE43RZy5Jk4ZAA8WLyiQHucXpUTVlzWydWD7duVrwZg==
X-Received: by 10.84.215.22 with SMTP id k22mr6372310pli.284.1506680888473;
 Fri, 29 Sep 2017 03:28:08 -0700 (PDT)
Received: from yliu-home ([45.63.61.64])
 by smtp.gmail.com with ESMTPSA id j68sm6493572pfa.93.2017.09.29.03.28.05
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Fri, 29 Sep 2017 03:28:07 -0700 (PDT)
Date: Fri, 29 Sep 2017 18:25:49 +0800
From: Yuanhan Liu <yliu@fridaylinux.org>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: dev@dpdk.org
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>
 <ED26CBA2FAD1BF48A8719AEF02201E36512F9A52@SHSMSX103.ccr.corp.intel.com>
 <20170929012437.GM2251@yliu-home>
 <42516fd9-ec53-043e-d24d-ba9fc04b085b@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <42516fd9-ec53-043e-d24d-ba9fc04b085b@intel.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
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:28:10 -0000

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