From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 99BBC11C5 for ; Thu, 9 Jul 2015 10:12:26 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 09 Jul 2015 01:12:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,438,1432623600"; d="scan'208";a="761109781" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by orsmga002.jf.intel.com with SMTP; 09 Jul 2015 01:12:24 -0700 Received: by (sSMTP sendmail emulation); Thu, 09 Jul 2015 09:12:23 +0025 Date: Thu, 9 Jul 2015 09:12:23 +0100 From: Bruce Richardson To: Matthew Hall Message-ID: <20150709081222.GB8408@bricha3-MOBL3> References: <1436354854-30700-1-git-send-email-pablo.de.lara.guarch@intel.com> <1436354854-30700-2-git-send-email-pablo.de.lara.guarch@intel.com> <20150708132142.GB5708@bricha3-MOBL3> <20150708165703.GA2551@mhcomputing.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150708165703.GA2551@mhcomputing.net> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] hash: move rte_hash structure to C file and make it internal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 08:12:27 -0000 On Wed, Jul 08, 2015 at 09:57:03AM -0700, Matthew Hall wrote: > On Wed, Jul 08, 2015 at 02:21:42PM +0100, Bruce Richardson wrote: > > Irrespective of whether or not we change the underlying hash table implementation > > this looks a good change to me. The rte_hash structure should not be used directly > > by any applications - the APIs all take pointers to the structure, > > so there should be no ABI breakage from this, I think. > > > > Therefore: > > > > Acked-by: Bruce Richardson > > Hi guys, > > There are places where this will be annoying on the app side. > > A lot of rte_hash, rte_lpm*, rte_table, etc. don't provide methods to iterate > whole structures with a callback function that includes the current structure > node, and a user-data pointer. > > This can make it real unpleasant when you want to walk through the structure > and free a bunch of items it points to and so forth. > > So if you're going to obfuscate things by censoring the structure contents > then we'd really like to be sure they have a full set of CRUD operations and > iteration support so one could manage the nodes individually and in bulk. > > Matthew. Thanks for the feedback Matthew. Can you suggest a function prototype for such a walk operation that would make it useful for you. While we can keep the hash structure public, I'd prefer if we could avoid it, as it makes making changes hard due to ABI issues. /Bruce