From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 7B31B7CE1 for ; Thu, 12 Oct 2017 10:32:55 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2017 01:32:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,365,1503385200"; d="scan'208";a="162277397" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.37]) by fmsmga006.fm.intel.com with SMTP; 12 Oct 2017 01:32:52 -0700 Received: by (sSMTP sendmail emulation); Thu, 12 Oct 2017 09:32:51 +0100 Date: Thu, 12 Oct 2017 09:32:51 +0100 From: Bruce Richardson To: Pavan Nikhilesh Cc: reshma.pattan@intel.com, dev@dpdk.org Message-ID: <20171012083251.GB44304@bricha3-MOBL3.ger.corp.intel.com> References: <1505228764-9738-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1505228764-9738-1-git-send-email-pbhagavatula@caviumnetworks.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out 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: Thu, 12 Oct 2017 08:32:55 -0000 On Tue, Sep 12, 2017 at 08:36:03PM +0530, Pavan Nikhilesh wrote: > The ready buffers should be set to NULL when drained else it might > result in double free (mempool put) when rte_reorder_free is called. > > Fixes: b70b56032bff ("reorder: new library") > > Signed-off-by: Pavan Nikhilesh --- > lib/librte_reorder/rte_reorder.c | 1 + 1 file changed, 1 insertion(+) > Rather than having an addition write for each entry going through the reorder library, it should be possible to change free function so that it only frees entries based on the index values. In fact, a better solution to having reorder_free just blindly free the mbufs would be to have reorder_free hand them back to the application, or allow reorder_free to fail if the reorder buffer is non-empty. Making such a change would be an ABI break, though. /Bruce