From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A41DA0A0F; Mon, 5 Jul 2021 16:12:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F8A2411C7; Mon, 5 Jul 2021 16:12:09 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 15C524003C for ; Mon, 5 Jul 2021 16:12:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625494327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T13pbycyZRSBbBi2mbutRfkaF4ccNNCtHB430okzpaw=; b=JTwe9jOaD22epydrgjl+WF0ZSDoSHqMj44XdyCykIB3b1ekTpiNLplS3csEtU+bjdeTyTb F+qI3GYueMXEtkntm0MlB54tX0eDghK2kNngEeONiob+x8kORa8E4VF7CVWlmExZ9JomxZ IARsjUYaUQBbo64zj/Q2W5dgLygzK3Q= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-250-FEKOvjYmNm6xLgNDTE4FPQ-1; Mon, 05 Jul 2021 10:12:06 -0400 X-MC-Unique: FEKOvjYmNm6xLgNDTE4FPQ-1 Received: by mail-vs1-f69.google.com with SMTP id b26-20020a67f85a0000b029028ad8073dc0so378638vsp.12 for ; Mon, 05 Jul 2021 07:12:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T13pbycyZRSBbBi2mbutRfkaF4ccNNCtHB430okzpaw=; b=V0KoOSwXdqeK+uPp0VEba3PZfEqb6qUBpJVLXUPDJtY/arjp2wc23mDwSdSkdpXq8Y 7mJe6U28P9aAyOpDv1ieh7j7bZXVFjBmswrBynBj7oMKMFy2ek0THq1XDEZ5In0tbaou zoO3vvN7vpbx2GUFFDFx7tLBRa90wtNGrvaJF2WWF9ujnR0SSmeDzqI+A2jFhMo/QpI5 Xtq0hGKmX3gQ8F4rcKtSaH7nE7Iz0ar8KZ6t6oMTu3M28agpjDuO79+HqDUTHUjtv2uK OsLEosvM5vIPfkR7DXBC5DddIIzqoZaNnKNNsASfeOxj+DPvbz/i0fomx1r8su6sV9ks nTTA== X-Gm-Message-State: AOAM533r5jlEm1xdRLYjN3X65WZPWmXhVVOhuOmuRBVh8uFdwylwmTBl nXO0XakN4IaKRMM8yFJTxsdZPQXpjnoIam2OeL1ca16ag8nZZWJysTJrFeVU3B2NOEvm4OkRUMh qm5B3INF1RIimNg89Q0s= X-Received: by 2002:a67:f3d1:: with SMTP id j17mr2141546vsn.18.1625494325949; Mon, 05 Jul 2021 07:12:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDz3DzJpVF83ffOXblTeVkXgmoN+iIrkwTYSOfi73IYLD4tyXiAS1MZJLRyyff5hbxHGVMUmjrDURG18uwKHE= X-Received: by 2002:a67:f3d1:: with SMTP id j17mr2141524vsn.18.1625494325780; Mon, 05 Jul 2021 07:12:05 -0700 (PDT) MIME-Version: 1.0 References: <20210701093456.43426-1-bruce.richardson@intel.com> <20210702125554.606364-1-bruce.richardson@intel.com> In-Reply-To: <20210702125554.606364-1-bruce.richardson@intel.com> From: David Marchand Date: Mon, 5 Jul 2021 16:11:54 +0200 Message-ID: To: Bruce Richardson Cc: dev , =?UTF-8?Q?Morten_Br=C3=B8rup?= Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: create runtime dir even when shared data is not used X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list 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, Jul 2, 2021 at 2:56 PM Bruce Richardson wrote: > > When multi-process is not wanted and DPDK is run with the "no-shconf" > flag, the telemetry library still needs a runtime directory to place the > unix socket for telemetry connections. Therefore, rather than not > creating the directory when this flag is set, we can change the code to > attempt the creation anyway, but not error out if it fails. If it > succeeds, then telemetry will be available, but if it fails, the rest of > DPDK will run without telemetry. This ensures that the "in-memory" flag > will allow DPDK to run even if the whole filesystem is read-only, for > example. > > Signed-off-by: Bruce Richardson > --- > V2: add a warning for the no-shconf case, rather than skipping it silently. > > lib/eal/linux/eal.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c > index ba19fc6347..ccb7535619 100644 > --- a/lib/eal/linux/eal.c > +++ b/lib/eal/linux/eal.c > @@ -838,12 +838,14 @@ eal_parse_args(int argc, char **argv) > } > } > > - /* create runtime data directory */ > - if (internal_conf->no_shconf == 0 && > - eal_create_runtime_dir() < 0) { > - RTE_LOG(ERR, EAL, "Cannot create runtime directory\n"); > - ret = -1; > - goto out; > + /* create runtime data directory. In no_shconf mode, skip any errors */ > + if (eal_create_runtime_dir() < 0) { > + if (internal_conf->no_shconf == 0) { > + RTE_LOG(ERR, EAL, "Cannot create runtime directory\n"); > + ret = -1; > + goto out; > + } else > + RTE_LOG(WARNING, EAL, "No DPDK runtime directory created\n"); > } > > if (eal_adjust_config(internal_conf) != 0) { > -- > 2.30.2 > Should this change be applied to FreeBSD too? Reviewed-by: David Marchand -- David Marchand