All of lore.kernel.org
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Wang, Yipeng1" <yipeng1.wang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"Tai, Charlie" <charlie.tai@intel.com>,
	"Gobriel, Sameh" <sameh.gobriel@intel.com>,
	"Mcnamara, John" <john.mcnamara@intel.com>
Subject: Re: [PATCH v5 2/7] member: implement HT mode
Date: Tue, 3 Oct 2017 08:47:34 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CC2950D@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1507005102-43821-3-git-send-email-yipeng1.wang@intel.com>

Hi Yipeng,

> -----Original Message-----
> From: Wang, Yipeng1
> Sent: Tuesday, October 3, 2017 5:32 AM
> To: dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: thomas@monjalon.net; Tai, Charlie <charlie.tai@intel.com>; Gobriel,
> Sameh <sameh.gobriel@intel.com>; Mcnamara, John
> <john.mcnamara@intel.com>; Wang, Yipeng1 <yipeng1.wang@intel.com>
> Subject: [PATCH v5 2/7] member: implement HT mode
> 
> One of the set-summary structures is hash-table based set-summary
> (HTSS). One example is cuckoo filter [1].
> 
> Comparing to a traditional hash table, HTSS has a much more compact
> structure. For each element, only one signature and its corresponding set ID
> is stored. No key comparison is required during lookup. For the table
> structure, there are multiple entries in each bucket, and the table is
> composed of many buckets.
> 
> Two modes are supported for HTSS, "cache" and "none-cache" modes.
> The non-cache mode is similar to the cuckoo filter [1].
> When a bucket is full, one entry will be evicted to its alternative bucket to
> make space for the new key. The table could be full and then no more keys
> could be inserted. This mode has false-positive rate but no false-negative.
> Multiple entries with same signature could stay in the same bucket.
> 
> The "cache" mode does not evict key to its alternative bucket when a
> bucket is full, an existing key will be evicted out of the table like a cache.
> Thus, the table will never reject keys when it is full. Another property is in
> each bucket, there cannot be multiple entries with same signature. The
> mode could have both false-positive and false-negative probability.
> 
> This patch adds the implementation of HTSS.
> 
> [1] B Fan, D G Andersen and M Kaminsky, “Cuckoo Filter: Practically Better
> Than Bloom,” in Conference on emerging Networking Experiments and
> Technologies, 2014.
> 
> Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
...

Just a comment below. The rest looks fine to me (and thanks for the explanations
in the v4 patch, all clear), so keep my "Reviewed-by" in next version.

Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

> +++ b/lib/librte_member/rte_member_ht.c

...

> +/* Search bucket for entry with tmp_sig and update set_id */ static
> +inline int update_entry_search(uint32_t bucket_id, member_sig_t
> +tmp_sig,
> +		struct member_ht_bucket *buckets,
> +		member_set_t set_id)
> +{
> +	int32_t i;

"i" cannot take negative values, so use uint32_t
(same in "search_bucket_single" and "search_bucket_multi").

> +
> +	for (i = 0; i < RTE_MEMBER_BUCKET_ENTRIES; i++) {
> +		if (buckets[bucket_id].sigs[i] == tmp_sig) {
> +			buckets[bucket_id].sets[i] = set_id;
> +			return 1;
> +		}
> +	}
> +	return 0;
> +}
> +


  reply	other threads:[~2017-10-03  8:47 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22  0:19 [PATCH 0/7] Add Membership Library Yipeng Wang
2017-08-22  0:19 ` [PATCH 1/7] member: implement main API Yipeng Wang
2017-08-22  3:59   ` Stephen Hemminger
2017-08-22 10:02   ` Luca Boccassi
2017-08-24  9:35     ` Ferruh Yigit
2017-08-24  9:55       ` Luca Boccassi
2017-08-24 10:32         ` Ferruh Yigit
2017-09-02 12:55           ` Luca Boccassi
2017-09-02 23:49             ` Luca Boccassi
2017-08-24 18:38     ` Wang, Yipeng1
2017-09-02 12:54       ` Luca Boccassi
2017-08-22  0:19 ` [PATCH 2/7] member: implement HT mode Yipeng Wang
2017-08-22  0:19 ` [PATCH 3/7] member: implement vBF mode Yipeng Wang
2017-08-22  0:19 ` [PATCH 4/7] member: add AVX for HT mode Yipeng Wang
2017-08-22  0:19 ` [PATCH 5/7] member: enable the library Yipeng Wang
2017-08-22  0:19 ` [PATCH 6/7] test/member: add functional and perf tests Yipeng Wang
2017-08-22  0:19 ` [PATCH 7/7] doc: add membership documentation Yipeng Wang
2017-08-22  4:01 ` [PATCH 0/7] Add Membership Library Stephen Hemminger
2017-08-23  2:58   ` Wang, Yipeng1
2017-09-02  1:24 ` [PATCH v2 " Yipeng Wang
2017-09-02  1:24   ` [PATCH v2 1/7] member: implement main API Yipeng Wang
2017-09-02  1:24   ` [PATCH v2 2/7] member: implement HT mode Yipeng Wang
2017-09-02  1:24   ` [PATCH v2 3/7] member: implement vBF mode Yipeng Wang
2017-09-02  1:24   ` [PATCH v2 4/7] member: add AVX for HT mode Yipeng Wang
2017-09-02  1:24   ` [PATCH v2 5/7] member: enable the library Yipeng Wang
2017-09-02  1:24   ` [PATCH v2 6/7] test/member: add functional and perf tests Yipeng Wang
2017-09-02  1:24   ` [PATCH v2 7/7] doc: add membership documentation Yipeng Wang
2017-09-04 13:19     ` Mcnamara, John
2017-09-05 23:59   ` [PATCH v3 0/7] Add Membership Library Yipeng Wang
2017-09-05 23:59     ` [PATCH v3 1/7] member: implement main API Yipeng Wang
2017-09-22 10:47       ` Thomas Monjalon
2017-09-25 14:15       ` De Lara Guarch, Pablo
2017-09-05 23:59     ` [PATCH v3 2/7] member: implement HT mode Yipeng Wang
2017-09-05 23:59     ` [PATCH v3 3/7] member: implement vBF mode Yipeng Wang
2017-09-05 23:59     ` [PATCH v3 4/7] member: add AVX for HT mode Yipeng Wang
2017-09-05 23:59     ` [PATCH v3 5/7] member: enable the library Yipeng Wang
2017-09-22 10:48       ` Thomas Monjalon
2017-09-05 23:59     ` [PATCH v3 6/7] test/member: add functional and perf tests Yipeng Wang
2017-09-05 23:59     ` [PATCH v3 7/7] doc: add membership documentation Yipeng Wang
2017-09-18 18:42       ` Mcnamara, John
2017-09-25 12:30       ` De Lara Guarch, Pablo
2017-09-27 17:40     ` [PATCH v4 0/7] Add Membership Library Yipeng Wang
2017-09-27 17:40       ` [PATCH v4 1/7] member: implement main API Yipeng Wang
2017-10-02 10:04         ` De Lara Guarch, Pablo
2017-09-27 17:40       ` [PATCH v4 2/7] member: implement HT mode Yipeng Wang
2017-10-02 13:30         ` De Lara Guarch, Pablo
2017-10-03  1:18           ` Wang, Yipeng1
2017-09-27 17:40       ` [PATCH v4 3/7] member: implement vBF mode Yipeng Wang
2017-10-02 15:44         ` De Lara Guarch, Pablo
2017-10-03  1:24           ` Wang, Yipeng1
2017-09-27 17:40       ` [PATCH v4 4/7] member: add AVX for HT mode Yipeng Wang
2017-09-27 17:40       ` [PATCH v4 5/7] member: enable the library Yipeng Wang
2017-10-02 15:47         ` De Lara Guarch, Pablo
2017-09-27 17:40       ` [PATCH v4 6/7] test/member: add functional and perf tests Yipeng Wang
2017-10-02 16:20         ` De Lara Guarch, Pablo
2017-09-27 17:40       ` [PATCH v4 7/7] doc: add membership documentation Yipeng Wang
2017-10-03  4:31       ` [PATCH v5 0/7] Add Membership Library Yipeng Wang
2017-10-03  4:31         ` [PATCH v5 1/7] member: implement main API Yipeng Wang
2017-10-03  8:42           ` De Lara Guarch, Pablo
2017-10-03  4:31         ` [PATCH v5 2/7] member: implement HT mode Yipeng Wang
2017-10-03  8:47           ` De Lara Guarch, Pablo [this message]
2017-10-03  4:31         ` [PATCH v5 3/7] member: implement vBF mode Yipeng Wang
2017-10-03  8:50           ` De Lara Guarch, Pablo
2017-10-03  4:31         ` [PATCH v5 4/7] member: add AVX for HT mode Yipeng Wang
2017-10-03  9:01           ` De Lara Guarch, Pablo
2017-10-03  4:31         ` [PATCH v5 5/7] member: enable the library Yipeng Wang
2017-10-03  9:04           ` De Lara Guarch, Pablo
2017-10-03  4:31         ` [PATCH v5 6/7] test/member: add functional and perf tests Yipeng Wang
2017-10-03  9:07           ` De Lara Guarch, Pablo
2017-10-03  4:31         ` [PATCH v5 7/7] doc: add membership documentation Yipeng Wang
2017-10-03  9:08           ` De Lara Guarch, Pablo
2017-10-04  3:12         ` [PATCH v6 0/7] Add Membership Library Yipeng Wang
2017-10-04  3:12           ` [PATCH v6 1/7] member: implement main API Yipeng Wang
2017-10-04  3:12           ` [PATCH v6 2/7] member: implement HT mode Yipeng Wang
2017-10-04  3:12           ` [PATCH v6 3/7] member: implement vBF mode Yipeng Wang
2017-10-04  3:12           ` [PATCH v6 4/7] member: add AVX for HT mode Yipeng Wang
2017-10-04  3:12           ` [PATCH v6 5/7] member: enable the library Yipeng Wang
2017-10-04  3:12           ` [PATCH v6 6/7] test/member: add functional and perf tests Yipeng Wang
2017-10-04  3:12           ` [PATCH v6 7/7] doc: add membership documentation Yipeng Wang
2017-10-04 13:44             ` Mcnamara, John
2017-10-08 22:14           ` [PATCH v6 0/7] Add Membership Library Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E115CCD9D858EF4F90C690B0DCB4D8976CC2950D@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=charlie.tai@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=sameh.gobriel@intel.com \
    --cc=thomas@monjalon.net \
    --cc=yipeng1.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.