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 93E77A32A2 for ; Fri, 25 Oct 2019 11:06:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5BB021D453; Fri, 25 Oct 2019 11:06:00 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id BAE8B1D451 for ; Fri, 25 Oct 2019 11:05:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2019 02:05:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,228,1569308400"; d="scan'208";a="398708049" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.104]) ([10.237.220.104]) by fmsmga005.fm.intel.com with ESMTP; 25 Oct 2019 02:05:56 -0700 To: David Marchand Cc: dev , John McNamara , Marko Kovacevic , Bruce Richardson , Thomas Monjalon References: <26384fad6f9afcba9d3311d1bf73e76f4577225d.1563276298.git.anatoly.burakov@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Fri, 25 Oct 2019 10:05:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal/freebsd: add support for base virtaddr option 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 24-Oct-19 7:56 PM, David Marchand wrote: > On Thu, Oct 24, 2019 at 5:18 PM Anatoly Burakov > wrote: >> >> According to our docs, only Linuxapp supports base-virtaddr option. >> That is, strictly speaking, not true because most of the things >> that are attempting to respect base-virtaddr are in common files, >> so FreeBSD already *mostly* supports this option in practice. >> >> This commit fixes the remaining bits to explicitly support >> base-virtaddr option, and moves the arg parsing from EAL to common >> options parsing code. Documentation is also updated to reflect >> that all platforms now support base-virtaddr. >> >> Signed-off-by: Anatoly Burakov >> Reviewed-by: David Marchand >> --- >> >> Notes: >> v2: >> - Harmonize FreeBSD reattach implementation with Linux >> >> doc/guides/linux_gsg/eal_args.include.rst | 6 +++ >> doc/guides/linux_gsg/linux_eal_parameters.rst | 6 --- >> doc/guides/rel_notes/release_19_11.rst | 5 +++ >> lib/librte_eal/common/eal_common_options.c | 38 ++++++++++++++++++ > > I was about to apply it, and I realised that the usage() in Linux > still references the --base-virtaddr option but it was not moved to > the common code. > What do you think of this hunk? > > diff --git a/lib/librte_eal/common/eal_common_options.c > b/lib/librte_eal/common/eal_common_options.c > index 1cdbd35..020f36e 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -1692,6 +1692,7 @@ static int xdigit2val(unsigned char c) > " --"OPT_NO_PCI" Disable PCI\n" > " --"OPT_NO_HPET" Disable HPET\n" > " --"OPT_NO_SHCONF" No shared config (mmap'd files)\n" > + " --"OPT_BASE_VIRTADDR" Base virtual address\n" > "\n", RTE_MAX_LCORE); > rte_option_usage(); > } > diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c > index ef5dafa..c0aac21 100644 > --- a/lib/librte_eal/linux/eal/eal.c > +++ b/lib/librte_eal/linux/eal/eal.c > @@ -539,7 +539,6 @@ enum rte_proc_type_t > " --"OPT_SOCKET_LIMIT" Limit memory allocation on > sockets (comma separated values)\n" > " --"OPT_HUGE_DIR" Directory where hugetlbfs > is mounted\n" > " --"OPT_FILE_PREFIX" Prefix for hugepage filenames\n" > - " --"OPT_BASE_VIRTADDR" Base virtual address\n" > " --"OPT_CREATE_UIO_DEV" Create /dev/uioX (usually > done by hotplug)\n" > " --"OPT_VFIO_INTR" Interrupt mode for VFIO > (legacy|msi|msix)\n" > " --"OPT_LEGACY_MEM" Legacy memory mode (no > dynamic allocation, contiguous segments)\n" > > Should be OK, i think. The whitespace seems to be slightly off, but otherwise, looks good. -- Thanks, Anatoly