From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 116304C8B for ; Tue, 14 Aug 2018 12:13:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2018 03:13:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,237,1531810800"; d="scan'208";a="83232356" Received: from miacopin-mobl1.ger.corp.intel.com (HELO [10.252.22.171]) ([10.252.22.171]) by orsmga002.jf.intel.com with ESMTP; 14 Aug 2018 03:13:22 -0700 To: dev@dpdk.org Cc: thomas@monjalon.net, hemant.agrawal@nxp.com, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, stephen@networkplumber.org, nhorman@tuxdriver.com, david.marchand@6wind.com, gowrishankar.m@linux.vnet.ibm.com References: From: "Burakov, Anatoly" Message-ID: Date: Tue, 14 Aug 2018 11:13:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 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] [RFC 0/3] Make device mapping more reliable 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: , X-List-Received-Date: Tue, 14 Aug 2018 10:13:31 -0000 On 31-May-18 11:57 AM, Anatoly Burakov wrote: > Currently, memory for device maps is allocated ad-hoc, by calculating > end of VA space allocated for hugepages and crossing fingers in hopes that > those addresses will be free in primary and secondary processes. This leads > to situations such as this: > > EAL: Detected 88 lcore(s) > EAL: Detected 2 NUMA nodes > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_178323_8af2229603de4 > EAL: Probing VFIO support... > EAL: VFIO support initialized > EAL: PCI device 0000:81:00.0 on NUMA socket 1 > EAL: probe driver: 8086:1563 net_ixgbe > EAL: Cannot mmap device resource file /sys/bus/pci/devices/0000:81:00.0/resource0 to address: 0x7ff7f5800000 > EAL: Requested device 0000:81:00.0 cannot be used > EAL: Error - exiting with code: 1 > Cause: No Ethernet ports - bye > > As can be seen from the above log, secondary process has initialized > successfully, but device BAR mapping has failed, which resulted in missing ports > in the secondary process. > > This patchset is an attempt to fix this problem once and for all, by using > the same method we use for memory to do device mappings as well. That is, > by preallocating all of the device memory in advance, so that initialization > either succeeds and allows for device mappings, or it fails outright (whereas > currently we may be in an in-between kind of situation, where init has > succeeded but device mappings have failed). > > This change breaks the ABI, so it is not for this release. However, i'd like > to hear feedback on the approach and whether there are potential problems with > other buses/use cases that i didn't think of. > I would like to draw attention to the RFC, now that the release has gone out. We have a deprecation notice for ABI break due to external memory work, so we now have an opportunity to implement this for 18.11. -- Thanks, Anatoly