From patchwork Wed Oct 18 15:03:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Dumitrescu X-Patchwork-Id: 30543 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B76881B21B; Wed, 18 Oct 2017 17:04:53 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BDE941B1B0 for ; Wed, 18 Oct 2017 17:04:14 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2017 08:04:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,397,1503385200"; d="scan'208";a="139673092" Received: from silpixa00382658.ir.intel.com ([10.237.223.29]) by orsmga004.jf.intel.com with ESMTP; 18 Oct 2017 08:04:12 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Cc: thomas@monjalon.net Date: Wed, 18 Oct 2017 16:03:32 +0100 Message-Id: <1508339034-171115-16-git-send-email-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508339034-171115-1-git-send-email-cristian.dumitrescu@intel.com> References: <1507634341-72277-2-git-send-email-cristian.dumitrescu@intel.com> <1508339034-171115-1-git-send-email-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH v3 15/18] librte_table: cosmetic enhancements in api file 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Consolidated hash tables into functional groups. Minor changes in comments. Signed-off-by: Cristian Dumitrescu --- lib/librte_table/rte_table_hash.h | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/lib/librte_table/rte_table_hash.h b/lib/librte_table/rte_table_hash.h index 3c53d6a..081464c 100755 --- a/lib/librte_table/rte_table_hash.h +++ b/lib/librte_table/rte_table_hash.h @@ -45,8 +45,6 @@ extern "C" { * These tables use the exact match criterion to uniquely associate data to * lookup keys. * - * Use-cases: Flow classification table, Address Resolution Protocol (ARP) table - * * Hash table types: * 1. Entry add strategy on bucket full: * a. Least Recently Used (LRU): One of the existing keys in the bucket is @@ -59,7 +57,7 @@ extern "C" { * to the bucket, it also becomes the new MRU key. When a key needs to * be picked and dropped, the most likely candidate for drop, i.e. the * current LRU key, is always picked. The LRU logic requires maintaining - * specific data structures per each bucket. + * specific data structures per each bucket. Use-cases: flow cache, etc. * b. Extendible bucket (ext): The bucket is extended with space for 4 more * keys. This is done by allocating additional memory at table init time, * which is used to create a pool of free keys (the size of this pool is @@ -73,20 +71,8 @@ extern "C" { * first group of 4 keys, the search continues beyond the first group of * 4 keys, potentially until all keys in this bucket are examined. The * extendible bucket logic requires maintaining specific data structures - * per table and per each bucket. - * 2. Key signature computation: - * a. Pre-computed key signature: The key lookup operation is split between - * two CPU cores. The first CPU core (typically the CPU core performing - * packet RX) extracts the key from the input packet, computes the key - * signature and saves both the key and the key signature in the packet - * buffer as packet meta-data. The second CPU core reads both the key and - * the key signature from the packet meta-data and performs the bucket - * search step of the key lookup operation. - * b. Key signature computed on lookup (do-sig): The same CPU core reads - * the key from the packet meta-data, uses it to compute the key - * signature and also performs the bucket search step of the key lookup - * operation. - * 3. Key size: + * per table and per each bucket. Use-cases: flow table, etc. + * 2. Key size: * a. Configurable key size * b. Single key size (8-byte, 16-byte or 32-byte key size) * @@ -129,22 +115,20 @@ struct rte_table_hash_params { uint64_t seed; }; +/** Extendible bucket hash table operations */ extern struct rte_table_ops rte_table_hash_ext_ops; +extern struct rte_table_ops rte_table_hash_key8_ext_ops; +extern struct rte_table_ops rte_table_hash_key16_ext_ops; +extern struct rte_table_ops rte_table_hash_key32_ext_ops; +/** LRU hash table operations */ extern struct rte_table_ops rte_table_hash_lru_ops; extern struct rte_table_ops rte_table_hash_key8_lru_ops; - -extern struct rte_table_ops rte_table_hash_key8_ext_ops; - extern struct rte_table_ops rte_table_hash_key16_lru_ops; - -extern struct rte_table_ops rte_table_hash_key16_ext_ops; - extern struct rte_table_ops rte_table_hash_key32_lru_ops; -extern struct rte_table_ops rte_table_hash_key32_ext_ops; - +/** Cuckoo hash table operations */ extern struct rte_table_ops rte_table_hash_cuckoo_ops; #ifdef __cplusplus