From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id A846B2C5A for ; Tue, 19 Apr 2016 21:41:57 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id e201so26309026wme.0 for ; Tue, 19 Apr 2016 12:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=mrbqI3pl/INenMIPT02Ahzh6ePjKbtFS7N9P5e7SsSw=; b=khZ84KPpxPWGrzZeKHAiubYl6jvyEAQzFRAC7L9f6ML3MiRuMzVGZib196IOwpg0nk 4l2HnOfpZJZ4KJy4ysZCQ0TcoPzpGu48QAJbKS/H8SI3b1bDxv5GeZK4zwpGL3YpeS2k eKuDp4GbDAI62ykTvBXn9NMKe0OGNKFl8FoBnSy7QBOXUUGLJtVky+7EzEscgqwOnzIM z7uXsLaw9K1SX7RwMaQYFJqSMUFSiLRXli+PdnnDdHw2PIiSeITKiXqhkTvlPs3VyTEd f5Bgo5SrdCYYAQb715DoWxdFIdAdly0t7B9jiL6AYNknWtXHZg9M9DcFCw1k2nfDXtpg jQJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mrbqI3pl/INenMIPT02Ahzh6ePjKbtFS7N9P5e7SsSw=; b=Yfu/6R3+QpjLaYW+UNwFXmwHFu2fa/Wh2ywFKJo1Lq2FZ5JrbCvRJChvUfbaH/9U7p jtHbwDKUeRCr80xi0JfmroEHB3M47pwwnf6wBdJbf4PdJCtQfQ8RjjEzKfI5kQBVwwwt bzWSnnZr/veiNtik6mBwMPfWZyvyKAUmy5rMjGrVK6269aSi9SQw2KAN/X8kgytjzaUT jZZ7RQYr09pbItbAZMcc4wANJhdVsK571m/RZAIHtJ+BQlaHyBMCcW6yyJ8yqT892S6A gwFx7CqdSCpmW35tiGRg/RAQQN4GlNObixbtJX6RA/Um9CRy5TsC3U/8qA7j330TRTWy omBg== X-Gm-Message-State: AOPr4FWE4sCRyaRJM8hTQFZLBjg/1PP8LP9zZH+AUHEkSfV2N+9qjg6IMiMQ+G+i8SUq9lTz X-Received: by 10.194.19.197 with SMTP id h5mr4737806wje.139.1461094917408; Tue, 19 Apr 2016 12:41:57 -0700 (PDT) Received: from XPS13.localdomain (guy78-1-82-235-116-147.fbx.proxad.net. [82.235.116.147]) by smtp.gmail.com with ESMTPSA id u3sm5837063wmg.15.2016.04.19.12.41.55 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Apr 2016 12:41:56 -0700 (PDT) From: Thomas Monjalon To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org Date: Tue, 19 Apr 2016 21:41:44 +0200 Message-Id: <1461094904-28118-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] hash: remove aliases for bulk lookup 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: Tue, 19 Apr 2016 19:41:57 -0000 The function rte_hash_lookup_multi() was renamed rte_hash_lookup_bulk() in DPDK 1.4 and was kept as an undocumented alias. Signed-off-by: Thomas Monjalon --- app/test/test_hash.c | 4 ++-- doc/guides/sample_app_ug/l3_forward.rst | 2 +- examples/l3fwd/l3fwd_em_hlm_sse.h | 4 ++-- examples/performance-thread/l3fwd-thread/main.c | 4 ++-- lib/librte_hash/rte_hash.h | 2 -- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/test/test_hash.c b/app/test/test_hash.c index adbdb4a..61fc0a0 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -486,7 +486,7 @@ static int test_five_keys(void) for(i = 0; i < 5; i++) key_array[i] = &keys[i]; - ret = rte_hash_lookup_multi(handle, &key_array[0], 5, (int32_t *)pos); + ret = rte_hash_lookup_bulk(handle, &key_array[0], 5, (int32_t *)pos); if(ret == 0) for(i = 0; i < 5; i++) { print_key_info("Lkp", key_array[i], pos[i]); @@ -527,7 +527,7 @@ static int test_five_keys(void) } /* Lookup multi */ - ret = rte_hash_lookup_multi(handle, &key_array[0], 5, (int32_t *)pos); + ret = rte_hash_lookup_bulk(handle, &key_array[0], 5, (int32_t *)pos); if (ret == 0) for (i = 0; i < 5; i++) { print_key_info("Lkp", key_array[i], pos[i]); diff --git a/doc/guides/sample_app_ug/l3_forward.rst b/doc/guides/sample_app_ug/l3_forward.rst index 3e070d0..491f99d 100644 --- a/doc/guides/sample_app_ug/l3_forward.rst +++ b/doc/guides/sample_app_ug/l3_forward.rst @@ -324,7 +324,7 @@ The key code snippet of simple_ipv4_fwd_4pkts() is shown below: const void *key_array[4] = {&key[0], &key[1], &key[2],&key[3]}; - rte_hash_lookup_multi(qconf->ipv4_lookup_struct, &key_array[0], 4, ret); + rte_hash_lookup_bulk(qconf->ipv4_lookup_struct, &key_array[0], 4, ret); dst_port[0] = (ret[0] < 0)? portid:ipv4_l3fwd_out_if[ret[0]]; dst_port[1] = (ret[1] < 0)? portid:ipv4_l3fwd_out_if[ret[1]]; diff --git a/examples/l3fwd/l3fwd_em_hlm_sse.h b/examples/l3fwd/l3fwd_em_hlm_sse.h index 5001c72..7714a20 100644 --- a/examples/l3fwd/l3fwd_em_hlm_sse.h +++ b/examples/l3fwd/l3fwd_em_hlm_sse.h @@ -81,7 +81,7 @@ em_get_dst_port_ipv4x8(struct lcore_conf *qconf, struct rte_mbuf *m[8], const void *key_array[8] = {&key[0], &key[1], &key[2], &key[3], &key[4], &key[5], &key[6], &key[7]}; - rte_hash_lookup_multi(qconf->ipv4_lookup_struct, &key_array[0], 8, ret); + rte_hash_lookup_bulk(qconf->ipv4_lookup_struct, &key_array[0], 8, ret); dst_port[0] = (uint8_t) ((ret[0] < 0) ? portid : ipv4_l3fwd_out_if[ret[0]]); @@ -179,7 +179,7 @@ em_get_dst_port_ipv6x8(struct lcore_conf *qconf, struct rte_mbuf *m[8], const void *key_array[8] = {&key[0], &key[1], &key[2], &key[3], &key[4], &key[5], &key[6], &key[7]}; - rte_hash_lookup_multi(qconf->ipv6_lookup_struct, &key_array[0], 8, ret); + rte_hash_lookup_bulk(qconf->ipv6_lookup_struct, &key_array[0], 8, ret); dst_port[0] = (uint8_t) ((ret[0] < 0) ? portid : ipv6_l3fwd_out_if[ret[0]]); diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 15c0a4d..cb9a82e 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -996,7 +996,7 @@ simple_ipv4_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid) const void *key_array[8] = {&key[0], &key[1], &key[2], &key[3], &key[4], &key[5], &key[6], &key[7]}; - rte_hash_lookup_multi(RTE_PER_LCORE(lcore_conf)->ipv4_lookup_struct, + rte_hash_lookup_bulk(RTE_PER_LCORE(lcore_conf)->ipv4_lookup_struct, &key_array[0], 8, ret); dst_port[0] = (uint8_t) ((ret[0] < 0) ? portid : ipv4_l3fwd_out_if[ret[0]]); dst_port[1] = (uint8_t) ((ret[1] < 0) ? portid : ipv4_l3fwd_out_if[ret[1]]); @@ -1150,7 +1150,7 @@ simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint8_t portid) const void *key_array[8] = {&key[0], &key[1], &key[2], &key[3], &key[4], &key[5], &key[6], &key[7]}; - rte_hash_lookup_multi(RTE_PER_LCORE(lcore_conf)->ipv6_lookup_struct, + rte_hash_lookup_bulk(RTE_PER_LCORE(lcore_conf)->ipv6_lookup_struct, &key_array[0], 4, ret); dst_port[0] = (uint8_t) ((ret[0] < 0) ? portid : ipv6_l3fwd_out_if[ret[0]]); dst_port[1] = (uint8_t) ((ret[1] < 0) ? portid : ipv6_l3fwd_out_if[ret[1]]); diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index ae00b65..724315a 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -362,8 +362,6 @@ rte_hash_lookup_with_hash(const struct rte_hash *h, hash_sig_t rte_hash_hash(const struct rte_hash *h, const void *key); -#define rte_hash_lookup_multi rte_hash_lookup_bulk -#define rte_hash_lookup_multi_data rte_hash_lookup_bulk_data /** * Find multiple keys in the hash table. * This operation is multi-thread safe. -- 2.7.0