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 C3018A04C0; Fri, 25 Sep 2020 17:27:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F1531E99B; Fri, 25 Sep 2020 17:27:03 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E2AB91D15C for ; Fri, 25 Sep 2020 17:27:00 +0200 (CEST) IronPort-SDR: LeAw9kHcN7rDRJJwI70FKY7XG6ChtxB5qypXiSg049ADytNoKmcWIgLtbVLdq/E5+7HAXiDcGB UoP2ANdCGUWg== X-IronPort-AV: E=McAfee;i="6000,8403,9755"; a="158910173" X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="158910173" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 08:26:58 -0700 IronPort-SDR: EDM/RVjLN6i9ghDU6YZbwm8yunTY/AXjvp8hLuOPwlxc/EL8ODlYx9fCfEYKVfNATJu+MWIr3J 4mD38qq5/BJg== X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="336738288" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.213.219.62]) ([10.213.219.62]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 08:26:57 -0700 To: Sarosh Arif , l.wojciechow@partner.samsung.com Cc: dev@dpdk.org References: <20200415064238.24012-1-sarosh.arif@emumba.com> <20200908102204.727240-1-sarosh.arif@emumba.com> From: David Hunt Message-ID: Date: Fri, 25 Sep 2020 16:26:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200908102204.727240-1-sarosh.arif@emumba.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-dev] [v3 PATCH] test_distributor: prevent memory leakages from the pool 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 8/9/2020 11:22 AM, Sarosh Arif wrote: > rte_mempool_get_bulk is used to get bufs/many_bufs from the pool, > but at some locations when test fails the bufs/many_bufs are > not returned back to the pool. > Due to this, multiple executions of distributor_autotest gives the > following error message: Error getting mbufs from pool. > To resolve this issue rte_mempool_put_bulk is used whenever the test > fails and returns. > > Signed-off-by: Sarosh Arif > --- > v2: > remove double freeing of mbufs > v3: > resubmit to run the tests again > --- > } --snip-- Looks good to me. Even though I could not repeat the conditions to cause one of these errors, the additons make sense. In my testing, I did add in several rte_mempool_avail_count() checks to see if there were leakages, and all the mempool counts were stable, but that was due to the fixes in the patch set from Lukasz : http://patches.dpdk.org/project/dpdk/list/?series=12442 However, if there are situations where packets are not returned from workers, this should clean them up nicely before returning. Reviewed-by: David Hunt