From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2743A32A2 for ; Thu, 24 Oct 2019 21:00:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 91ADC1EBE3; Thu, 24 Oct 2019 21:00:09 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 5A8981C2A3 for ; Thu, 24 Oct 2019 21:00:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571943607; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IXkc0riLniTPlXXkNpEB6wnOQ3pjUbfbPvgxKaBLewk=; b=WXnR84Z/urAGdxcycrzn5uBh2OuCNBGay076sC3csClhtzZfmFafC5V2LAKJ2/kiV21u4b lHnY2MMRSqlg4jVKG4Zt7p7181GlhinRmRJbzuJD/YsO9brY/Ko668Zmi8ds+hh59gWONH dtTSd88S980dTL1//cBKNgCgHF4EPcA= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-108-CzQaMIwbO6GBxTj6c2w8Qw-1; Thu, 24 Oct 2019 15:00:06 -0400 Received: by mail-vk1-f198.google.com with SMTP id r128so11131298vke.17 for ; Thu, 24 Oct 2019 12:00: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=4Kx3ZTeIbMcsiecRy86b6GeSgOC63EHDuIkKifFZipE=; b=Fs1KkfHsy5vL+fu56Mt7IwAwcRh2AdrMOiaLm6b+lMyheZitoJnjioQwgX7MxoqpRv Xml2UL4Hmoc5qwVWnsN80jkzsQFm5XOpk0WQGoxjCZD1gTCtdASpw0PnZBdvFLVdtB0d DNhEWufqKw5slYINicL2/8H8dRIiUTrPGVh0p3u7vWArUO3ULvtTCIJsx40tpHkcavXY WbkG/EQ2pXaxnlmNatBC3Mj3T/a9nPG4Gq2ZZXTlwxEspAhclI1gm8x246HD6b7duhsF dId9ThhXMdBbKMa75nTf0oKGmG6xjJuszlykqJEQnLYDe7TtS51XJ8bIGW3w85L+UC/s r2fw== X-Gm-Message-State: APjAAAV4YjYaqar9TSeE4Y1XSnVQo79uoqGD1NxapVlkX/bW3eg871CR z5cl+YUG+CjWiHRYNPNAGX9uWgj3KyUE/8CjWrdbNeGFK9j1fSSf3LRBjNN/97v4vCH0955fyKA vT2Y8JsjouS9xm81/fDo= X-Received: by 2002:a67:fc49:: with SMTP id p9mr9750438vsq.198.1571943605510; Thu, 24 Oct 2019 12:00:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzW3iJ3/O6DkUXwCA5AxpDiHwONNBHm5JeCqZrpN2ZXa/p1NqSLXvXTLbYMcZMDfhicaBFM/iLSEHG0g2OjOOE= X-Received: by 2002:a67:fc49:: with SMTP id p9mr9750410vsq.198.1571943605031; Thu, 24 Oct 2019 12:00:05 -0700 (PDT) MIME-Version: 1.0 References: <26384fad6f9afcba9d3311d1bf73e76f4577225d.1563276298.git.anatoly.burakov@intel.com> <41c41b7a73cea7f574bc709e1fb1cd4eed4c72e3.1571930271.git.anatoly.burakov@intel.com> In-Reply-To: <41c41b7a73cea7f574bc709e1fb1cd4eed4c72e3.1571930271.git.anatoly.burakov@intel.com> From: David Marchand Date: Thu, 24 Oct 2019 20:59:54 +0200 Message-ID: To: Anatoly Burakov Cc: dev , Bruce Richardson , Thomas Monjalon X-MC-Unique: CzQaMIwbO6GBxTj6c2w8Qw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 2/2] eal: use define instead of raw flag name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Thu, Oct 24, 2019 at 5:18 PM Anatoly Burakov wrote: > > We are using '--base-virtaddr' in a few places. We have a define for that= , > so use it instead. > > Signed-off-by: Anatoly Burakov > --- > lib/librte_eal/freebsd/eal/eal.c | 3 ++- > lib/librte_eal/freebsd/eal/eal_memory.c | 5 ++++- > lib/librte_eal/linux/eal/eal.c | 4 ++-- > lib/librte_eal/linux/eal/eal_memory.c | 3 ++- > 4 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/ea= l/eal.c > index c7e1264205..14e1713294 100644 > --- a/lib/librte_eal/freebsd/eal/eal.c > +++ b/lib/librte_eal/freebsd/eal/eal.c > @@ -345,7 +345,8 @@ rte_eal_config_reattach(void) > if (mem_config !=3D MAP_FAILED) { > /* errno is stale, don't use */ > RTE_LOG(ERR, EAL, "Cannot mmap memory for rte_con= fig at [%p], got [%p]" > - " - please use '--base-virtaddr= ' option\n", > + " - please use '--" OPT_BASE_VI= RTADDR > + "' option\n", > rte_mem_cfg_addr, mem_config); > munmap(mem_config, sizeof(struct rte_mem_config))= ; > return -1; > diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/fre= ebsd/eal/eal_memory.c > index cd31827c2b..a637127d5e 100644 > --- a/lib/librte_eal/freebsd/eal/eal_memory.c > +++ b/lib/librte_eal/freebsd/eal/eal_memory.c > @@ -14,6 +14,8 @@ > #include > #include > #include > + > +#include "eal_options.h" > #include "eal_private.h" > #include "eal_internal_cfg.h" > #include "eal_filesystem.h" > @@ -367,7 +369,8 @@ alloc_va_space(struct rte_memseg_list *msl) > addr =3D eal_get_virtual_area(msl->base_va, &mem_sz, page_sz, 0, = flags); > if (addr =3D=3D NULL) { > if (rte_errno =3D=3D EADDRNOTAVAIL) > - RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [= %p] - please use '--base-virtaddr' option\n", > + RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [= %p] - " > + "please use '--" OPT_BASE_VIRTADDR "' opt= ion\n", > (unsigned long long)mem_sz, msl->base_va)= ; > else > RTE_LOG(ERR, EAL, "Cannot reserve memory\n"); > diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/ea= l.c > index ef5dafa94f..13ffabd470 100644 > --- a/lib/librte_eal/linux/eal/eal.c > +++ b/lib/librte_eal/linux/eal/eal.c > @@ -435,8 +435,8 @@ rte_eal_config_reattach(void) > if (mem_config !=3D MAP_FAILED) { > /* errno is stale, don't use */ > RTE_LOG(ERR, EAL, "Cannot mmap memory for rte_con= fig at [%p], got [%p]" > - " - please use '--base-virtaddr' option\n= ", > - rte_mem_cfg_addr, mem_config); > + " - please use '--" OPT_BASE_VIRTADDR > + "' option\n", rte_mem_cfg_addr, mem_confi= g); > munmap(mem_config, sizeof(struct rte_mem_config))= ; > return -1; > } > diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux= /eal/eal_memory.c > index 8f62c343d6..197c67ac4b 100644 > --- a/lib/librte_eal/linux/eal/eal_memory.c > +++ b/lib/librte_eal/linux/eal/eal_memory.c > @@ -832,7 +832,8 @@ alloc_va_space(struct rte_memseg_list *msl) > addr =3D eal_get_virtual_area(msl->base_va, &mem_sz, page_sz, 0, = flags); > if (addr =3D=3D NULL) { > if (rte_errno =3D=3D EADDRNOTAVAIL) > - RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [= %p] - please use '--base-virtaddr' option\n", > + RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [= %p] - " > + "please use '--" OPT_BASE_VIRTADDR "' opt= ion\n", > (unsigned long long)mem_sz, msl->base_va)= ; > else > RTE_LOG(ERR, EAL, "Cannot reserve memory\n"); > -- > 2.17.1 Reviewed-by: David Marchand --=20 David Marchand