From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mta113.f1.k8.com.br (mta113.f1.k8.com.br [187.73.32.185]) by dpdk.org (Postfix) with ESMTP id 80E4E2C5 for ; Sun, 19 Aug 2018 01:08:21 +0200 (CEST) X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-DKIM: OpenDKIM Filter v2.6.8 smtpz.f1.k8.com.br 0489080040 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digirati.com.br; s=default; t=1534633699; bh=p3Y0LhL9K9VdU6sMxBU0zgyX2udqDR8IgiH2JmFw0Z4=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=rV2kxNtdRwckvJDzOqOc1SjIEL/bV6ix50IO33BEYmswnSkPjSerUyDscJ1nt5Vwk CG5ZasaYLpxPITCGZZaijGn7gj3XAD3KkoCfMH2MZWRzlGp/hHdN0EkKoYIHRCpLue weHZcI/A4Lk0sKLH0/dmry9g9se3b9Wf5xmBlWJw= X-HN-R: bmRAYXJtLmNvbQ== X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: c3RlcGhlbkBuZXR3b3JrcGx1bWJlci5vcmc= X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: Y2hhcmxpZS50YWlAaW50ZWwuY29t X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: c2FtZWguZ29icmllbEBpbnRlbC5jb20= X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: a2VpdGgud2lsZXNAaW50ZWwuY29t X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: eWlwZW5nMS53YW5nQGludGVsLmNvbQ== X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: ZG91Y2V0dGVAYnUuZWR1 X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: ZGV2QGRwZGsub3Jn X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: cGFibG8uZGUubGFyYS5ndWFyY2hAaW50ZWwuY29t X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: YnJ1Y2UucmljaGFyZHNvbkBpbnRlbC5jb20= X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: cWlhb2JpbmZAYnUuZWR1 X-HN-S: bWljaGVsQGRpZ2lyYXRpLmNvbS5icg== X-HN-R: aG9ubmFwcGEubmFnYXJhaGFsbGlAYXJtLmNvbQ== 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 0489080040; Sat, 18 Aug 2018 23:08:13 +0000 (UTC) To: Honnappa Nagarahalli , "Fu, Qiaobin" , "Richardson, Bruce" , "De Lara Guarch, Pablo" Cc: "dev@dpdk.org" , "Doucette, Cody, Joseph" , "Wang, Yipeng1" , "Wiles, Keith" , "Gobriel, Sameh" , "Tai, Charlie" , Stephen Hemminger , nd References: <5e809298-ee0e-f03f-e83a-59b764e3a9b8@digirati.com.br> From: Michel Machado Organization: Digirati Internet LTDA. Message-ID: <12e971e0-41bd-2cd6-d80c-a7a486fd1046@digirati.com.br> Date: Sat, 18 Aug 2018 19:08:10 -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-Mailman-Approved-At: Tue, 21 Aug 2018 22:23:55 +0200 Subject: Re: [dpdk-dev] [PATCH v2] 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: Sat, 18 Aug 2018 23:08:22 -0000 On 08/17/2018 03:41 PM, Honnappa Nagarahalli wrote: > Can you elaborate more on using ' struct rte_conflict_iterator_state' as the argument for the API? > > If the API signature is changed to: rte_hash_iterate_conflict_entries (const struct rte_hash *h, void **key, void **data, const hash_sig_t sig, struct rte_conflict_iterator_state *state) - it will be inline with the existing APIs. Contents of 'state' must be initialized to 0 for the first call. This will also avoid creating 'rte_hash_iterator_conflict_entries_init' API. Testing `state' every time rte_hash_iterate_conflict_entries() is called to find out if it's the first call of the iterator will possibly add some small, but unnecessary, overhead on rte_hash_iterate_conflict_entries() and constraints on struct rte_conflict_iterator_state. Moreover, rte_hash_iterator_conflict_entries_init() enables one to easily add variations of the init function to initialize the state (e.g. using a key instead of a sig) and still use the exactly same iterator. [ ]'s Michel Machado