From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mta123.f1.k8.com.br (mta123.f1.k8.com.br [187.73.32.199]) by dpdk.org (Postfix) with ESMTP id 22D1E231E for ; Tue, 4 Sep 2018 21:07:49 +0200 (CEST) Received: from [192.168.1.4] (pool-173-48-214-200.bstnma.fios.verizon.net [173.48.214.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtpz.f1.k8.com.br (Postfix) with ESMTPSA id 224A96025C; Tue, 4 Sep 2018 19:07:40 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.6.8 smtpz.f1.k8.com.br 224A96025C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digirati.com.br; s=default; t=1536088066; bh=sIe0lcGSJFK+7Yb8zgg3OwqXnbABwFoBL3IdjR/AGss=; h=Subject:To:From:Date:Feedback-ID; b=ZJ54VUo162CCl6K9mQPm+QKGzaigfnVXmfd2lhgoBTugkGWKMeD+Q7yKDfILz+3kA 6pisIZZOQafzAbdzAtqRy/Pjhic2/PGUDmE1vh6lzlvbyAWa1EHMNmiM4i5Bq2WFRH 1f9LNMMTaQlnu+VpywHXZfPHpGB6E+i6NME0RlHI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=k8.com.br; s=default; t=1536088066; bh=sIe0lcGSJFK+7Yb8zgg3OwqXnbABwFoBL3IdjR/AGss=; h=Subject:To:From:Date:Feedback-ID; b=dVt75couUfo/0mFdCNy9Eni7vsb7O26mP57u381I1xm+DPdfcN4iiIcUq/a3AOHAo LUkMcXCDsOUwDg3NgVp/7YjeOaf8XpxHaxOPp0VFZq3aWvZOwzybnm1S/bWBv+GRuK ZMTgJ6eEo2NVHRogAeRzKQbiEE38J/1QXLuKx/pk= To: "Wang, Yipeng1" , Qiaobin Fu , "Richardson, Bruce" , "De Lara Guarch, Pablo" Cc: "dev@dpdk.org" , "doucette@bu.edu" , "Wiles, Keith" , "Gobriel, Sameh" , "Tai, Charlie" , "stephen@networkplumber.org" , "nd@arm.com" , "honnappa.nagarahalli@arm.com" References: <20180831165101.20026-1-qiaobinf@bu.edu> From: Michel Machado Organization: Digirati Internet LTDA. Message-ID: Date: Tue, 4 Sep 2018 15:07:37 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; 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 X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: aG9ubmFwcGEubmFnYXJhaGFsbGlAYXJtLmNvbSxuZEBhcm0uY29tLHN0ZXBoZW5AbmV0d29ya3BsdW1iZXIub3JnLGNoYXJsaWUudGFpQGludGVsLmNvbSxzYW1laC5nb2JyaWVsQGludGVsLmNvbSxrZWl0aC53aWxlc0BpbnRlbC5jb20sZG91Y2V0dGVAYnUuZWR1LGRldkBkcGRrLm9yZyxwYWJsby5kZS5sYXJhLmd1YXJjaEBpbnRlbC5jb20sYnJ1Y2UucmljaGFyZHNvbkBpbnRlbC5jb20scWlhb2JpbmZAYnUuZWR1LHlpcGVuZzEud2FuZ0BpbnRlbC5jb20= Feedback-ID: MjAxODA5MDQ=:bWljaGVsQGRpZ2lyYXRpLmNvbS5icg==:ZGlnaXJhdGkuY29tLmJy:k8networks X-Mailman-Approved-At: Thu, 06 Sep 2018 15:08:09 +0200 Subject: Re: [dpdk-dev] [PATCH v3] hash table: add an iterator over conflicting entries 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, 04 Sep 2018 19:07:49 -0000 Hi Yipeng, On 09/04/2018 02:55 PM, Wang, Yipeng1 wrote: > Do we need both of the state and istate struct? struct rte_hash_iterator_state seems not doing much. > How about we only have one "state" struct and just not expose the internals to the public API, similar to the > rte_hash struct or rte_member_setsum struct. > And in _init function use rte_malloc to allocate the state and add a _free function to free it. The purpose of have struct state is to enable applications to allocate iterator states on their execution stack or embedding iterator states in larger structs to avoid an extra malloc()/free(). Do you foresee that the upcoming new underlying algorithm of hash tables will need to dynamically allocate iterator states? [ ]'s Michel Machado