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 A8902A046B for ; Thu, 9 Jan 2020 14:52:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7228E1DD9E; Thu, 9 Jan 2020 14:52:55 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id DA8561DD9E; Thu, 9 Jan 2020 14:52:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 05:52:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,413,1571727600"; d="scan'208";a="396096208" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.107]) ([10.237.220.107]) by orsmga005.jf.intel.com with ESMTP; 09 Jan 2020 05:52:42 -0800 To: Olivier Matz , dev@dpdk.org Cc: Andrew Rybchenko , stable@dpdk.org References: <20200109132720.15664-1-olivier.matz@6wind.com> From: "Burakov, Anatoly" Message-ID: <8b59b3c9-ac1a-f448-e38d-063a6cb8ba7a@intel.com> Date: Thu, 9 Jan 2020 13:52:41 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200109132720.15664-1-olivier.matz@6wind.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] mempool: fix mempool virt populate with small chunks X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 09-Jan-20 1:27 PM, Olivier Matz wrote: > To populate a mempool with a virtual area, the mempool code calls > rte_mempool_populate_iova() for each iova-contiguous area. It happens > (rarely) that this area is too small to store one object. In this case, > rte_mempool_populate_iova() returns an error, which is forwarded by > rte_mempool_populate_virt(). > > This case should not throw an error in > rte_mempool_populate_virt(). Instead, the area that is too small should > just be ignored. > > To fix this issue, change the return value of > rte_mempool_populate_iova() to -ENOBUFS when no object can be populated, > so it can be ignored by the caller. As this would be an API change, add > a compat wrapper to keep the current API unchanged. The wrapper will be > removed for 20.11. > > Fixes: 354788b60cfd ("mempool: allow populating with unaligned virtual area") > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz > --- > The approach fixes the issue on my end, so Tested-by: Anatoly Burakov > Is there a simple way to ensure that we won't forget to remove the > wrapper for 20.11? Anatoly suggested me to use versioned symbols, but > it's not clear to me how. > Yes, i'd like to do better than "ah shur we won't forget pinky swear". Can't we do this with ABI versioning? E.g. rte_populate_iova_v20() ... returns EINVAL rte_populate_iova_v21() ... returns ENOBUFS I'm pretty sure, even if it doesn't break, it will still be more likely to not be forgotten because there's almost a guarantee that someone will grep for symbol versioning macros across the codebase around 20.11 timeframe. -- Thanks, Anatoly