From patchwork Thu Nov 1 23:25:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 149996 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1392851ljp; Thu, 1 Nov 2018 16:25:48 -0700 (PDT) X-Google-Smtp-Source: AJdET5dE3CW1qMeio+KoK5yQ65IJWom2as/sJD+oV3HEuNuVTV5PTsZukUR1qrYn+4ciepONBwBQ X-Received: by 2002:adf:f290:: with SMTP id k16-v6mr8362095wro.108.1541114748785; Thu, 01 Nov 2018 16:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541114748; cv=none; d=google.com; s=arc-20160816; b=zwDnZZrulCxEj/5jUt5cljMiEpN/l1mpAEtCFT/7efb6bfIvkroumymWGmQapwNWJW 35En+cnelwFAtulc2I2Rn0LW+UQB+iyXwz+cONhXhXNjM+9mZEVvFTMKmveqrNnr5DEo A6i761hl2+koGhHtmabKEm2m1iTyIgYGz/3WjrmvYtULyGmxO8+xGpBsV04LMwVVtqKa bNLzScPSgMkKpHgiy6bvlI0vWyZVCvEVy3SNkmVCxMNevW2wCu4+Mr7IriDVwwM6ICQb BoG1SpYfOer5VEEDcr8jSMXSsK8uWwJFtlH0vU1Hb1+koDvxkNUSRr0tJTnxvISVTxi1 gRGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=d1BZY6NFUnqXeVPuVXzd/cjBYu4W3skskF0xCgy/fps=; b=OfWFzQYoognyZrK4nSpWn9tuJhhUKuBhGTpYgztH96aRd6jAL8UNkfaM3rsxi0+a1u 40JQADCljd0mx3nI3Zt6ey34rquunGmXPOGFPErHv0Bi1fDq9lTwWw+AQLnw7w6XwlqB OT/VzE+q8jOM8BXUYXY6I7xkawKAfSYgY5yWh5738KWkwHbjJUtOtx3RwUuIOV6fkxsi Luk8pM8wcxtK3RsFOdqDnyNUVk92pQ6ZBQ8xKaUbhZtpzSXy/oR3u3lpJoiJLdqXx7uK KY48ESJ5BLH0ZGpEL5X2nSj6ClpKxB2YZrJdAHbtQg6CmZPe65vo7eJ4q9ZZhj2Ko3VA 4v0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id l133-v6si15505245wmf.75.2018.11.01.16.25.48; Thu, 01 Nov 2018 16:25:48 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 328AB1B3A3; Fri, 2 Nov 2018 00:25:48 +0100 (CET) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 636A51B3A3 for ; Fri, 2 Nov 2018 00:25:46 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ABAF91596; Thu, 1 Nov 2018 16:25:45 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3AB6E3F718; Thu, 1 Nov 2018 16:25:45 -0700 (PDT) From: Honnappa Nagarahalli To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, gavin.hu@arm.com, dharmik.thakkar@arm.com, nd@arm.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, Honnappa Nagarahalli Date: Thu, 1 Nov 2018 18:25:19 -0500 Message-Id: <20181101232522.702-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181101232522.702-1-honnappa.nagarahalli@arm.com> References: <20181101045454.632-2-honnappa.nagarahalli@arm.com> <20181101232522.702-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 1/4] hash: prepare for deprecation of flags 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" Lock ellision and read/write concurreny flags need to be deprecated. Create the new version of the function and fix checkpatch issues. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu --- lib/librte_hash/rte_cuckoo_hash.c | 329 ++++++++++++++++++++++++++++++ lib/librte_hash/rte_hash.h | 2 + 2 files changed, 331 insertions(+) -- 2.17.1 diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index 5ddcccd87..ec3b519ba 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -447,6 +447,335 @@ rte_hash_create(const struct rte_hash_parameters *params) return NULL; } +struct rte_hash * +rte_hash_create_v1811(const struct rte_hash_parameters *params) +{ + struct rte_hash *h = NULL; + struct rte_tailq_entry *te = NULL; + struct rte_hash_list *hash_list; + struct rte_ring *r = NULL; + struct rte_ring *r_ext = NULL; + char hash_name[RTE_HASH_NAMESIZE]; + void *k = NULL; + void *buckets = NULL; + void *buckets_ext = NULL; + char ring_name[RTE_RING_NAMESIZE]; + char ext_ring_name[RTE_RING_NAMESIZE]; + unsigned num_key_slots; + unsigned i; + unsigned int hw_trans_mem_support = 0, use_local_cache = 0; + unsigned int ext_table_support = 0; + unsigned int readwrite_concur_support = 0; + unsigned int writer_takes_lock = 0; + unsigned int no_free_on_del = 0; + uint32_t *tbl_chng_cnt = NULL; + unsigned int readwrite_concur_lf_support = 0; + + rte_hash_function default_hash_func = (rte_hash_function)rte_jhash; + + hash_list = RTE_TAILQ_CAST(rte_hash_tailq.head, rte_hash_list); + + if (params == NULL) { + RTE_LOG(ERR, HASH, "%s: no parameters\n", __func__); + return NULL; + } + + /* Check for valid parameters */ + if ((params->entries > RTE_HASH_ENTRIES_MAX) || + (params->entries < RTE_HASH_BUCKET_ENTRIES) || + (params->key_len == 0)) { + rte_errno = EINVAL; + RTE_LOG(ERR, HASH, "%s: invalid parameters\n", __func__); + return NULL; + } + + /* Validate correct usage of extra options */ + if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY) && + (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF)) { + rte_errno = EINVAL; + RTE_LOG(ERR, HASH, "rte_hash_create: choose rw concurrency or " + "rw concurrency lock free\n"); + return NULL; + } + + if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) && + (params->extra_flag & RTE_HASH_EXTRA_FLAGS_EXT_TABLE)) { + rte_errno = EINVAL; + RTE_LOG(ERR, HASH, "%s: extendable bucket feature not supported with rw concurrency lock free\n", __func__); + return NULL; + } + + /* Check extra flags field to check extra options. */ + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT) + hw_trans_mem_support = 1; + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD) { + use_local_cache = 1; + writer_takes_lock = 1; + } + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY) { + readwrite_concur_support = 1; + writer_takes_lock = 1; + } + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_EXT_TABLE) + ext_table_support = 1; + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_NO_FREE_ON_DEL) + no_free_on_del = 1; + + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) { + readwrite_concur_lf_support = 1; + /* Enable not freeing internal memory/index on delete */ + no_free_on_del = 1; + } + + /* Store all keys and leave the first entry as a dummy entry + * for lookup_bulk. + */ + if (use_local_cache) + /* + * Increase number of slots by total number of indices + * that can be stored in the lcore caches + * except for the first cache + */ + num_key_slots = params->entries + (RTE_MAX_LCORE - 1) * + (LCORE_CACHE_SIZE - 1) + 1; + else + num_key_slots = params->entries + 1; + + snprintf(ring_name, sizeof(ring_name), "HT_%s", params->name); + /* Create ring (Dummy slot index is not enqueued) */ + r = rte_ring_create(ring_name, rte_align32pow2(num_key_slots), + params->socket_id, 0); + if (r == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err; + } + + const uint32_t num_buckets = rte_align32pow2(params->entries) / + RTE_HASH_BUCKET_ENTRIES; + + /* Create ring for extendable buckets. */ + if (ext_table_support) { + snprintf(ext_ring_name, sizeof(ext_ring_name), "HT_EXT_%s", + params->name); + r_ext = rte_ring_create(ext_ring_name, + rte_align32pow2(num_buckets + 1), + params->socket_id, 0); + + if (r_ext == NULL) { + RTE_LOG(ERR, HASH, "ext buckets memory allocation " + "failed\n"); + goto err; + } + } + + snprintf(hash_name, sizeof(hash_name), "HT_%s", params->name); + + rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); + + /* guarantee there's no existing: this is normally already checked + * by ring creation above. + */ + TAILQ_FOREACH(te, hash_list, next) { + h = (struct rte_hash *) te->data; + if (strncmp(params->name, h->name, RTE_HASH_NAMESIZE) == 0) + break; + } + h = NULL; + if (te != NULL) { + rte_errno = EEXIST; + te = NULL; + goto err_unlock; + } + + te = rte_zmalloc("HASH_TAILQ_ENTRY", sizeof(*te), 0); + if (te == NULL) { + RTE_LOG(ERR, HASH, "tailq entry allocation failed\n"); + goto err_unlock; + } + + h = (struct rte_hash *)rte_zmalloc_socket(hash_name, + sizeof(struct rte_hash), + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (h == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err_unlock; + } + + buckets = rte_zmalloc_socket(NULL, + num_buckets * sizeof(struct rte_hash_bucket), + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (buckets == NULL) { + RTE_LOG(ERR, HASH, "buckets memory allocation failed\n"); + goto err_unlock; + } + + /* Allocate same number of extendable buckets */ + if (ext_table_support) { + buckets_ext = rte_zmalloc_socket(NULL, + num_buckets * sizeof(struct rte_hash_bucket), + RTE_CACHE_LINE_SIZE, params->socket_id); + if (buckets_ext == NULL) { + RTE_LOG(ERR, HASH, "ext buckets memory allocation " + "failed\n"); + goto err_unlock; + } + /* Populate ext bkt ring. We reserve 0 similar to the + * key-data slot, just in case in future we want to + * use bucket index for the linked list and 0 means NULL + * for next bucket + */ + for (i = 1; i <= num_buckets; i++) + rte_ring_sp_enqueue(r_ext, (void *)((uintptr_t) i)); + } + + const uint32_t key_entry_size = + RTE_ALIGN(sizeof(struct rte_hash_key) + params->key_len, + KEY_ALIGNMENT); + const uint64_t key_tbl_size = (uint64_t) key_entry_size * num_key_slots; + + k = rte_zmalloc_socket(NULL, key_tbl_size, + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (k == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err_unlock; + } + + tbl_chng_cnt = rte_zmalloc_socket(NULL, sizeof(uint32_t), + RTE_CACHE_LINE_SIZE, params->socket_id); + + if (tbl_chng_cnt == NULL) { + RTE_LOG(ERR, HASH, "memory allocation failed\n"); + goto err_unlock; + } + +/* + * If x86 architecture is used, select appropriate compare function, + * which may use x86 intrinsics, otherwise use memcmp + */ +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) + /* Select function to compare keys */ + switch (params->key_len) { + case 16: + h->cmp_jump_table_idx = KEY_16_BYTES; + break; + case 32: + h->cmp_jump_table_idx = KEY_32_BYTES; + break; + case 48: + h->cmp_jump_table_idx = KEY_48_BYTES; + break; + case 64: + h->cmp_jump_table_idx = KEY_64_BYTES; + break; + case 80: + h->cmp_jump_table_idx = KEY_80_BYTES; + break; + case 96: + h->cmp_jump_table_idx = KEY_96_BYTES; + break; + case 112: + h->cmp_jump_table_idx = KEY_112_BYTES; + break; + case 128: + h->cmp_jump_table_idx = KEY_128_BYTES; + break; + default: + /* If key is not multiple of 16, use generic memcmp */ + h->cmp_jump_table_idx = KEY_OTHER_BYTES; + } +#else + h->cmp_jump_table_idx = KEY_OTHER_BYTES; +#endif + + if (use_local_cache) { + h->local_free_slots = rte_zmalloc_socket(NULL, + sizeof(struct lcore_cache) * RTE_MAX_LCORE, + RTE_CACHE_LINE_SIZE, params->socket_id); + } + + /* Default hash function */ +#if defined(RTE_ARCH_X86) + default_hash_func = (rte_hash_function)rte_hash_crc; +#elif defined(RTE_ARCH_ARM64) + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32)) + default_hash_func = (rte_hash_function)rte_hash_crc; +#endif + /* Setup hash context */ + snprintf(h->name, sizeof(h->name), "%s", params->name); + h->entries = params->entries; + h->key_len = params->key_len; + h->key_entry_size = key_entry_size; + h->hash_func_init_val = params->hash_func_init_val; + + h->num_buckets = num_buckets; + h->bucket_bitmask = h->num_buckets - 1; + h->buckets = buckets; + h->buckets_ext = buckets_ext; + h->free_ext_bkts = r_ext; + h->hash_func = (params->hash_func == NULL) ? + default_hash_func : params->hash_func; + h->key_store = k; + h->free_slots = r; + h->tbl_chng_cnt = tbl_chng_cnt; + *h->tbl_chng_cnt = 0; + h->hw_trans_mem_support = hw_trans_mem_support; + h->use_local_cache = use_local_cache; + h->readwrite_concur_support = readwrite_concur_support; + h->ext_table_support = ext_table_support; + h->writer_takes_lock = writer_takes_lock; + h->no_free_on_del = no_free_on_del; + h->readwrite_concur_lf_support = readwrite_concur_lf_support; + +#if defined(RTE_ARCH_X86) + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE2)) + h->sig_cmp_fn = RTE_HASH_COMPARE_SSE; + else +#endif + h->sig_cmp_fn = RTE_HASH_COMPARE_SCALAR; + + /* Writer threads need to take the lock when: + * 1) RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY is enabled OR + * 2) RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD is enabled + */ + if (h->writer_takes_lock) { + h->readwrite_lock = rte_malloc(NULL, sizeof(rte_rwlock_t), + RTE_CACHE_LINE_SIZE); + if (h->readwrite_lock == NULL) + goto err_unlock; + + rte_rwlock_init(h->readwrite_lock); + } + + /* Populate free slots ring. Entry zero is reserved for key misses. */ + for (i = 1; i < num_key_slots; i++) + rte_ring_sp_enqueue(r, (void *)((uintptr_t) i)); + + te->data = (void *) h; + TAILQ_INSERT_TAIL(hash_list, te, next); + rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + + return h; +err_unlock: + rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); +err: + rte_ring_free(r); + rte_ring_free(r_ext); + rte_free(te); + rte_free(h); + rte_free(buckets); + rte_free(buckets_ext); + rte_free(k); + rte_free(tbl_chng_cnt); + return NULL; +} + void rte_hash_free(struct rte_hash *h) { diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index c93d1a137..f049b9dd0 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -105,6 +105,8 @@ struct rte_hash; */ struct rte_hash * rte_hash_create(const struct rte_hash_parameters *params); +struct rte_hash * +rte_hash_create_v1811(const struct rte_hash_parameters *params); /** * Set a new hash compare function other than the default one. From patchwork Thu Nov 1 23:25:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 149997 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1392963ljp; Thu, 1 Nov 2018 16:25:56 -0700 (PDT) X-Google-Smtp-Source: AJdET5du4WgoZYf6+/+ZnchxcFN/9GLJ5EbWscf2kCgjksCjHqabDdOryNrzTVoCZQr7we+IGS6L X-Received: by 2002:adf:84c1:: with SMTP id 59-v6mr8810357wrg.144.1541114756886; Thu, 01 Nov 2018 16:25:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541114756; cv=none; d=google.com; s=arc-20160816; b=S1m8/GlnoNUZEGzPoC+mpCP2nZBgOSWKO6/alFP8hFaEGSUk9yCm7oqaBNINVKwpha +dBTEVu7TB3ysv5Li6biou0puJEUDrEkzf26ysRNoQzftVUPffyi4TfTNvsyFbPqpP4E wzRedZeXY13i73/yTHE8Yn4QXUrLiWdPu2WY2E+8c94rLkzAyEkaInzumKCRrM3PHm5n oHLW9VWqHor9xNLOIKzXHZrFUkuZcS9zwVkfnS5eW1LeBK52PmC7be2wqD/yTlD9FHd8 5eld3/1vXe3Cj72KRbOY9ZeIautQYGvXc8vAMf/IpKHRtPTKlLFFI3AB5wbUx2o0bRAc kA1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=8u0rKXQw3ku0gdG3Qjba1Wsrm5Q2OuZixNH0J/qi/vI=; b=wyAjg8MsfV+m8s7zmGGt8RNsS+PTliQMT/QZZF21BVLNMGIgHMx6UwsxlFahtP6YB4 R+rXZKntoOvCqABl38Ds+Cx/Nv+9chfXPOT8ua9O6e3O0tnC7pwpVTN/JOfpXW8a7hyO 1znnpoDn3PdBoXz2Sg6pOoc3GVnfGRqXe6v77rUFR3Qao5x8EP5PHzxN8bm9pgeSleGR DvnikJhPAi4sQPrTdGkF64RmjPuH5jKvGuD+kfxcHj/vkqQ05lp/uMmK6wI9fhWV70EU 8dvMmC8sRJSeJw+10OP6H8g/V9Xj0ikzCdwV6dvdy9PrttkggMNY2r6+Oju9t4Q/8lta q4ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id y18-v6si22644519wrl.266.2018.11.01.16.25.56; Thu, 01 Nov 2018 16:25:56 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 929C31B3AF; Fri, 2 Nov 2018 00:25:52 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id BC8901B3AE for ; Fri, 2 Nov 2018 00:25:51 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC62B1596; Thu, 1 Nov 2018 16:25:50 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D08A3F718; Thu, 1 Nov 2018 16:25:50 -0700 (PDT) From: Honnappa Nagarahalli To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, gavin.hu@arm.com, dharmik.thakkar@arm.com, nd@arm.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, Honnappa Nagarahalli Date: Thu, 1 Nov 2018 18:25:20 -0500 Message-Id: <20181101232522.702-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181101232522.702-1-honnappa.nagarahalli@arm.com> References: <20181101045454.632-2-honnappa.nagarahalli@arm.com> <20181101232522.702-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 2/4] hash: deprecate lock ellision and read/write concurreny flags 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" Hash library should provide read/write concurrency by default as most of the use cases require read/write concurrency. Hence the flag RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY is deprecated. The library will decide if locking is required to provide the concurrency based on other configuration flags. If a lock is used to provide the read/write concurrency, best possible locking mechanism available on the platform should be used. Hence, the flag RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT is deprecated. The library will use transactional memory if the platform supports it. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu --- lib/librte_hash/rte_cuckoo_hash.c | 46 +++++++++++----------------- lib/librte_hash/rte_hash.h | 20 ++++++++++-- lib/librte_hash/rte_hash_version.map | 7 +++++ 3 files changed, 43 insertions(+), 30 deletions(-) -- 2.17.1 diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index ec3b519ba..7f97cddd4 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -121,7 +121,7 @@ get_alt_bucket_index(const struct rte_hash *h, } struct rte_hash * -rte_hash_create(const struct rte_hash_parameters *params) +rte_hash_create_v20(const struct rte_hash_parameters *params) { struct rte_hash *h = NULL; struct rte_tailq_entry *te = NULL; @@ -446,6 +446,7 @@ rte_hash_create(const struct rte_hash_parameters *params) rte_free(tbl_chng_cnt); return NULL; } +VERSION_SYMBOL(rte_hash_create, _v20, 2.0); struct rte_hash * rte_hash_create_v1811(const struct rte_hash_parameters *params) @@ -463,10 +464,10 @@ rte_hash_create_v1811(const struct rte_hash_parameters *params) char ext_ring_name[RTE_RING_NAMESIZE]; unsigned num_key_slots; unsigned i; - unsigned int hw_trans_mem_support = 0, use_local_cache = 0; + unsigned int use_local_cache = 0; unsigned int ext_table_support = 0; - unsigned int readwrite_concur_support = 0; - unsigned int writer_takes_lock = 0; + unsigned int readwrite_concur_support = 1; + unsigned int writer_takes_lock = 1; unsigned int no_free_on_del = 0; uint32_t *tbl_chng_cnt = NULL; unsigned int readwrite_concur_lf_support = 0; @@ -490,14 +491,6 @@ rte_hash_create_v1811(const struct rte_hash_parameters *params) } /* Validate correct usage of extra options */ - if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY) && - (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF)) { - rte_errno = EINVAL; - RTE_LOG(ERR, HASH, "rte_hash_create: choose rw concurrency or " - "rw concurrency lock free\n"); - return NULL; - } - if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) && (params->extra_flag & RTE_HASH_EXTRA_FLAGS_EXT_TABLE)) { rte_errno = EINVAL; @@ -506,18 +499,8 @@ rte_hash_create_v1811(const struct rte_hash_parameters *params) } /* Check extra flags field to check extra options. */ - if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT) - hw_trans_mem_support = 1; - - if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD) { + if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD) use_local_cache = 1; - writer_takes_lock = 1; - } - - if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY) { - readwrite_concur_support = 1; - writer_takes_lock = 1; - } if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_EXT_TABLE) ext_table_support = 1; @@ -526,11 +509,17 @@ rte_hash_create_v1811(const struct rte_hash_parameters *params) no_free_on_del = 1; if (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) { + /* Do not use lock for RW concurrency */ + readwrite_concur_support = 0; readwrite_concur_lf_support = 1; /* Enable not freeing internal memory/index on delete */ no_free_on_del = 1; } + if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) && + !(params->extra_flag & RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD)) + writer_takes_lock = 0; + /* Store all keys and leave the first entry as a dummy entry * for lookup_bulk. */ @@ -725,7 +714,7 @@ rte_hash_create_v1811(const struct rte_hash_parameters *params) h->free_slots = r; h->tbl_chng_cnt = tbl_chng_cnt; *h->tbl_chng_cnt = 0; - h->hw_trans_mem_support = hw_trans_mem_support; + h->hw_trans_mem_support = rte_tm_supported(); h->use_local_cache = use_local_cache; h->readwrite_concur_support = readwrite_concur_support; h->ext_table_support = ext_table_support; @@ -740,10 +729,6 @@ rte_hash_create_v1811(const struct rte_hash_parameters *params) #endif h->sig_cmp_fn = RTE_HASH_COMPARE_SCALAR; - /* Writer threads need to take the lock when: - * 1) RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY is enabled OR - * 2) RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD is enabled - */ if (h->writer_takes_lock) { h->readwrite_lock = rte_malloc(NULL, sizeof(rte_rwlock_t), RTE_CACHE_LINE_SIZE); @@ -775,6 +760,11 @@ rte_hash_create_v1811(const struct rte_hash_parameters *params) rte_free(tbl_chng_cnt); return NULL; } +BIND_DEFAULT_SYMBOL(rte_hash_create, _v1811, 18.11); +MAP_STATIC_SYMBOL( + struct rte_hash *rte_hash_create( + const struct rte_hash_parameters *params), + rte_hash_create_v1811); void rte_hash_free(struct rte_hash *h) diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index f049b9dd0..93c7019ec 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -30,13 +30,27 @@ extern "C" { #define RTE_HASH_LOOKUP_BULK_MAX 64 #define RTE_HASH_LOOKUP_MULTI_MAX RTE_HASH_LOOKUP_BULK_MAX -/** Enable Hardware transactional memory support. */ +/** + * @deprecated + * This define will be removed in the next release. + * If the target platform supports hardware transactional memory + * it will be used without user consent as it provides the best possible + * performance. + * + * Enable Hardware transactional memory support. + */ #define RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT 0x01 /** Default behavior of insertion, single writer/multi writer */ #define RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD 0x02 -/** Flag to support reader writer concurrency */ +/** + * @deprecated + * This define will be removed in the next release. + * This library should be thread-safe by default. + * + * Flag to support reader writer concurrency + */ #define RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY 0x04 /** Flag to indicate the extendabe bucket table feature should be used */ @@ -106,6 +120,8 @@ struct rte_hash; struct rte_hash * rte_hash_create(const struct rte_hash_parameters *params); struct rte_hash * +rte_hash_create_v20(const struct rte_hash_parameters *params); +struct rte_hash * rte_hash_create_v1811(const struct rte_hash_parameters *params); /** diff --git a/lib/librte_hash/rte_hash_version.map b/lib/librte_hash/rte_hash_version.map index 734ae28b0..c72469099 100644 --- a/lib/librte_hash/rte_hash_version.map +++ b/lib/librte_hash/rte_hash_version.map @@ -54,6 +54,13 @@ DPDK_18.08 { } DPDK_16.07; +DPDK_18.11 { + global: + + rte_hash_create; + +} DPDK_18.08; + EXPERIMENTAL { global: From patchwork Thu Nov 1 23:25:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 149998 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1393114ljp; Thu, 1 Nov 2018 16:26:10 -0700 (PDT) X-Google-Smtp-Source: AJdET5dLTLMJYn4lB5ubSV8sMp3TAetLg2LPchtETVyErk2uJ/4jWwQv+/CqcJKAZDBiUON3x3PT X-Received: by 2002:a1c:f712:: with SMTP id v18-v6mr6832373wmh.48.1541114770364; Thu, 01 Nov 2018 16:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541114770; cv=none; d=google.com; s=arc-20160816; b=X5a6mKsZd1oKKJga30ojGkc+6SPMMiq1oAN7TpdjytIaJfa9wlVCCZjkUQaa1s3s8M HzAW0JuirvXZhkkBFD5a9UKiUmxP80IhbiuY2Vhhyan4Dp2QB/HAa+fVGf4/L4vafPvA 8BqDlbNzFpRU+JaSW5JlVqH7+T9kCN28OY2LNFak34Ajw019nTPRCeHKfurSK4UbUCmG w4e5OFms+0hHJuzFzGZedl9iuzZrQp4T6b9ZHW1K/TNTe4ZPeelko01lebKKGUqK3OuI BdCHdISNw4JxM4+UMfY6nDGy/JUGBqFzct9nnayohfoEfOC2hTB/moH3DbetAf5Qf9cK +QTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=0dpWwS65X1maeNYJbIt8ubroUvf97QmYZBqH/nFi63c=; b=bL5+zwXeugVusj8wghkeb6Cwjisy8mPNKyW98tpRE2z60U9PcdWzr1Xc+fUe4tA7Ep NDMBqLzLfcmyn28OoN7Yf2/d/NcqGqW4BI+5hWwr43NLsmXkxx/eI4UH7+thOOFmeuiV sOG7Wy+COTn3duLfT5QxsRGu9xQX+6NPT+FkMz/jgvAfJ4DmRs15S9y8n1LAaQrEDDZE Hck39Yhs45Wo1Oot8UOmPdD2tp9SczO67nvNatoHEKMdS0qwq/S3apo+0dzuUH+1xJq7 CavmQt7DU0cW1viBVM/sshY0P24Q3mJPxhOFZsKUgaTvXSGPx5F94wiQVIe2VRHPvpg4 abAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id y4si17870448wrw.341.2018.11.01.16.26.10; Thu, 01 Nov 2018 16:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 53DF71B3BA; Fri, 2 Nov 2018 00:25:57 +0100 (CET) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id 493041B3D8 for ; Fri, 2 Nov 2018 00:25:55 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9DCCD1596; Thu, 1 Nov 2018 16:25:54 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 253933F718; Thu, 1 Nov 2018 16:25:54 -0700 (PDT) From: Honnappa Nagarahalli To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, gavin.hu@arm.com, dharmik.thakkar@arm.com, nd@arm.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, Honnappa Nagarahalli Date: Thu, 1 Nov 2018 18:25:21 -0500 Message-Id: <20181101232522.702-4-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181101232522.702-1-honnappa.nagarahalli@arm.com> References: <20181101045454.632-2-honnappa.nagarahalli@arm.com> <20181101232522.702-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 3/4] test/hash: stop using lock ellision and read/write concurreny flags 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" With the deprecation of RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY and RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT flags, the test cases can be simplified. This results in shorter run times. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu --- lib/librte_hash/rte_hash.h | 2 - test/test/test_hash_multiwriter.c | 20 +-- test/test/test_hash_perf.c | 40 +++--- test/test/test_hash_readwrite.c | 84 ++++--------- test/test/test_hash_readwrite_lf.c | 189 ++++++----------------------- 5 files changed, 82 insertions(+), 253 deletions(-) -- 2.17.1 diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h index 93c7019ec..e7e3397d5 100644 --- a/lib/librte_hash/rte_hash.h +++ b/lib/librte_hash/rte_hash.h @@ -32,7 +32,6 @@ extern "C" { /** * @deprecated - * This define will be removed in the next release. * If the target platform supports hardware transactional memory * it will be used without user consent as it provides the best possible * performance. @@ -46,7 +45,6 @@ extern "C" { /** * @deprecated - * This define will be removed in the next release. * This library should be thread-safe by default. * * Flag to support reader writer concurrency diff --git a/test/test/test_hash_multiwriter.c b/test/test/test_hash_multiwriter.c index d447f6dca..5469fb705 100644 --- a/test/test/test_hash_multiwriter.c +++ b/test/test/test_hash_multiwriter.c @@ -46,8 +46,6 @@ uint32_t rounded_nb_total_tsx_insertion; static rte_atomic64_t gcycles; static rte_atomic64_t ginsertions; -static int use_htm; - static int test_hash_multiwriter_worker(void *arg) { @@ -113,13 +111,9 @@ test_hash_multiwriter(void) .hash_func_init_val = 0, .socket_id = rte_socket_id(), }; - if (use_htm) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT - | RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + + hash_params.extra_flag = + RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; struct rte_hash *handle; char name[RTE_HASH_NAMESIZE]; @@ -272,19 +266,15 @@ test_hash_multiwriter_main(void) if (!rte_tm_supported()) { printf("Hardware transactional memory (lock elision) " "is NOT supported\n"); + printf("Test multi-writer without Hardware transactional " + "memory\n"); } else { printf("Hardware transactional memory (lock elision) " "is supported\n"); printf("Test multi-writer with Hardware transactional memory\n"); - - use_htm = 1; - if (test_hash_multiwriter() < 0) - return -1; } - printf("Test multi-writer without Hardware transactional memory\n"); - use_htm = 0; if (test_hash_multiwriter() < 0) return -1; diff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c index 525211180..03facd22a 100644 --- a/test/test/test_hash_perf.c +++ b/test/test/test_hash_perf.c @@ -79,7 +79,7 @@ static struct rte_hash_parameters ut_params = { static int create_table(unsigned int with_data, unsigned int table_index, - unsigned int with_locks, unsigned int ext) + unsigned int ext) { char name[RTE_HASH_NAMESIZE]; @@ -89,17 +89,11 @@ create_table(unsigned int with_data, unsigned int table_index, else sprintf(name, "test_hash%d", hashtest_key_lens[table_index]); - - if (with_locks) - ut_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT - | RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY; + if (ext) + ut_params.extra_flag = RTE_HASH_EXTRA_FLAGS_EXT_TABLE; else ut_params.extra_flag = 0; - if (ext) - ut_params.extra_flag |= RTE_HASH_EXTRA_FLAGS_EXT_TABLE; - ut_params.name = name; ut_params.key_len = hashtest_key_lens[table_index]; ut_params.socket_id = rte_socket_id(); @@ -516,8 +510,7 @@ reset_table(unsigned table_index) } static int -run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int with_locks, - unsigned int ext) +run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int ext) { unsigned i, j, with_data, with_hash; @@ -526,7 +519,7 @@ run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int with_locks, for (with_data = 0; with_data <= 1; with_data++) { for (i = 0; i < NUM_KEYSIZES; i++) { - if (create_table(with_data, i, with_locks, ext) < 0) + if (create_table(with_data, i, ext) < 0) return -1; if (get_input_keys(with_pushes, i, ext) < 0) @@ -669,25 +662,20 @@ fbk_hash_perf_test(void) static int test_hash_perf(void) { - unsigned int with_pushes, with_locks; - for (with_locks = 0; with_locks <= 1; with_locks++) { - if (with_locks) - printf("\nWith locks in the code\n"); + unsigned int with_pushes; + + for (with_pushes = 0; with_pushes <= 1; with_pushes++) { + if (with_pushes == 0) + printf("\nALL ELEMENTS IN PRIMARY LOCATION\n"); else - printf("\nWithout locks in the code\n"); - for (with_pushes = 0; with_pushes <= 1; with_pushes++) { - if (with_pushes == 0) - printf("\nALL ELEMENTS IN PRIMARY LOCATION\n"); - else - printf("\nELEMENTS IN PRIMARY OR SECONDARY LOCATION\n"); - if (run_all_tbl_perf_tests(with_pushes, with_locks, 0) < 0) - return -1; - } + printf("\nELEMENTS IN PRIMARY OR SECONDARY LOCATION\n"); + if (run_all_tbl_perf_tests(with_pushes, 0) < 0) + return -1; } printf("\n EXTENDABLE BUCKETS PERFORMANCE\n"); - if (run_all_tbl_perf_tests(1, 0, 1) < 0) + if (run_all_tbl_perf_tests(1, 1) < 0) return -1; if (fbk_hash_perf_test() < 0) diff --git a/test/test/test_hash_readwrite.c b/test/test/test_hash_readwrite.c index 01f986cf4..d389723aa 100644 --- a/test/test/test_hash_readwrite.c +++ b/test/test/test_hash_readwrite.c @@ -35,7 +35,7 @@ struct perf { uint32_t read_write_w[NUM_TEST]; }; -static struct perf htm_results, non_htm_results; +static struct perf results; struct { uint32_t *keys; @@ -121,7 +121,7 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg) } static int -init_params(int use_ext, int use_htm, int use_jhash) +init_params(int use_ext, int use_jhash) { unsigned int i; @@ -140,15 +140,8 @@ init_params(int use_ext, int use_htm, int use_jhash) else hash_params.hash_func = rte_hash_crc; - if (use_htm) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT | - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + hash_params.extra_flag = + RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; if (use_ext) hash_params.extra_flag |= @@ -195,7 +188,7 @@ init_params(int use_ext, int use_htm, int use_jhash) } static int -test_hash_readwrite_functional(int use_ext, int use_htm) +test_hash_readwrite_functional(int use_ext) { unsigned int i; const void *next_key; @@ -214,7 +207,7 @@ test_hash_readwrite_functional(int use_ext, int use_htm) rte_atomic64_init(&ginsertions); rte_atomic64_clear(&ginsertions); - if (init_params(use_ext, use_htm, use_jhash) != 0) + if (init_params(use_ext, use_jhash) != 0) goto err; if (use_ext) @@ -351,8 +344,7 @@ test_rw_writer(void *arg) } static int -test_hash_readwrite_perf(struct perf *perf_results, int use_htm, - int reader_faster) +test_hash_readwrite_perf(struct perf *perf_results, int reader_faster) { unsigned int n; int ret; @@ -379,7 +371,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm, rte_atomic64_init(&gwrite_cycles); rte_atomic64_clear(&gwrite_cycles); - if (init_params(0, use_htm, use_jhash) != 0) + if (init_params(0, use_jhash) != 0) goto err; /* @@ -608,12 +600,11 @@ test_hash_readwrite_main(void) { /* * Variables used to choose different tests. - * use_htm indicates if hardware transactional memory should be used. * reader_faster indicates if the reader threads should finish earlier * than writer threads. This is to timing either reader threads or * writer threads for performance numbers. */ - int use_htm, use_ext, reader_faster; + int use_ext, reader_faster; unsigned int i = 0, core_id = 0; if (rte_lcore_count() <= 2) { @@ -634,69 +625,40 @@ test_hash_readwrite_main(void) "is supported\n"); printf("Test read-write with Hardware transactional memory\n"); - - use_htm = 1; - use_ext = 0; - - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) - return -1; - - reader_faster = 1; - if (test_hash_readwrite_perf(&htm_results, use_htm, - reader_faster) < 0) - return -1; - - reader_faster = 0; - if (test_hash_readwrite_perf(&htm_results, use_htm, - reader_faster) < 0) - return -1; } else { printf("Hardware transactional memory (lock elision) " "is NOT supported\n"); + + printf("Test read-write without Hardware transactional " + "memory\n"); } - printf("Test read-write without Hardware transactional memory\n"); - use_htm = 0; use_ext = 0; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + if (test_hash_readwrite_functional(use_ext) < 0) return -1; use_ext = 1; - if (test_hash_readwrite_functional(use_ext, use_htm) < 0) + if (test_hash_readwrite_functional(use_ext) < 0) return -1; reader_faster = 1; - if (test_hash_readwrite_perf(&non_htm_results, use_htm, - reader_faster) < 0) + if (test_hash_readwrite_perf(&results, reader_faster) < 0) return -1; + reader_faster = 0; - if (test_hash_readwrite_perf(&non_htm_results, use_htm, - reader_faster) < 0) + if (test_hash_readwrite_perf(&results, reader_faster) < 0) return -1; printf("Results summary:\n"); - printf("single read: %u\n", htm_results.single_read); - printf("single write: %u\n", htm_results.single_write); + printf("single read: %u\n", results.single_read); + printf("single write: %u\n", results.single_write); for (i = 0; i < NUM_TEST; i++) { printf("core_cnt: %u\n", core_cnt[i]); - printf("HTM:\n"); - printf("read only: %u\n", htm_results.read_only[i]); - printf("write only: %u\n", htm_results.write_only[i]); - printf("read-write read: %u\n", htm_results.read_write_r[i]); - printf("read-write write: %u\n", htm_results.read_write_w[i]); - - printf("non HTM:\n"); - printf("read only: %u\n", non_htm_results.read_only[i]); - printf("write only: %u\n", non_htm_results.write_only[i]); - printf("read-write read: %u\n", - non_htm_results.read_write_r[i]); - printf("read-write write: %u\n", - non_htm_results.read_write_w[i]); + printf("read only: %u\n", results.read_only[i]); + printf("write only: %u\n", results.write_only[i]); + printf("read-write read: %u\n", results.read_write_r[i]); + printf("read-write write: %u\n", results.read_write_w[i]); } return 0; diff --git a/test/test/test_hash_readwrite_lf.c b/test/test/test_hash_readwrite_lf.c index cbfd93226..9d459aeb8 100644 --- a/test/test/test_hash_readwrite_lf.c +++ b/test/test/test_hash_readwrite_lf.c @@ -22,20 +22,9 @@ #define BULK_LOOKUP_SIZE 32 -#define RUN_WITH_HTM_DISABLED 0 - -#if (RUN_WITH_HTM_DISABLED) - -#define TOTAL_ENTRY (5*1024) -#define TOTAL_INSERT (5*1024) - -#else - #define TOTAL_ENTRY (4*1024*1024) #define TOTAL_INSERT (4*1024*1024) -#endif - #define READ_FAIL 1 #define READ_PASS_NO_KEY_SHIFTS 2 #define READ_PASS_SHIFT_PATH 4 @@ -53,7 +42,7 @@ struct rwc_perf { uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST]; }; -static struct rwc_perf rwc_lf_results, rwc_non_lf_results; +static struct rwc_perf rwc_lf_results; struct { uint32_t *keys; @@ -395,7 +384,7 @@ generate_keys(void) } static int -init_params(int rwc_lf, int use_jhash, int htm) +init_params(int use_jhash) { struct rte_hash *handle; @@ -411,19 +400,8 @@ init_params(int rwc_lf, int use_jhash, int htm) else hash_params.hash_func = rte_hash_crc; - if (rwc_lf) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else if (htm) - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT | - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; - else - hash_params.extra_flag = - RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | - RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD; + hash_params.extra_flag = RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD | + RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF; hash_params.name = "tests"; @@ -580,8 +558,7 @@ test_rwc_multi_writer(__attribute__((unused)) void *arg) * Reader(s) lookup keys present in the table. */ static int -test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -592,7 +569,7 @@ test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - no key-shifts, read - hit\n"); for (m = 0; m < 2; m++) { @@ -649,8 +626,7 @@ test_hash_add_no_ks_lookup_hit(struct rwc_perf *rwc_perf_results, int rwc_lf, * 'Main' thread adds with no key-shifts. */ static int -test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -662,7 +638,7 @@ test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - no key-shifts, Hash lookup - miss\n"); for (m = 0; m < 2; m++) { @@ -721,8 +697,7 @@ test_hash_add_no_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, * shift path while 'Main' thread adds keys causing key-shifts. */ static int -test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results, - int rwc_lf, int htm) +test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -734,7 +709,7 @@ test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - key shift, Hash lookup - hit" " (non-shift-path)\n"); @@ -797,8 +772,7 @@ test_hash_add_ks_lookup_hit_non_sp(struct rwc_perf *rwc_perf_results, * 'Main' thread adds keys causing key-shifts. */ static int -test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -810,7 +784,7 @@ test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - key shift, Hash lookup - hit (shift-path)" "\n"); @@ -873,8 +847,7 @@ test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results, int rwc_lf, * 'Main' thread adds keys causing key-shifts. */ static int -test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, int - htm) +test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results) { unsigned int n, m; uint64_t i; @@ -886,7 +859,7 @@ test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, int rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Hash add - key shift, Hash lookup - miss\n"); for (m = 0; m < 2; m++) { @@ -948,8 +921,7 @@ test_hash_add_ks_lookup_miss(struct rwc_perf *rwc_perf_results, int rwc_lf, int * Writers are running in parallel, on different data plane cores. */ static int -test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf, - int htm) +test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results) { unsigned int n, m, k; uint64_t i; @@ -960,7 +932,7 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf, rte_atomic64_init(&greads); rte_atomic64_init(&gread_cycles); - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) goto err; printf("\nTest: Multi-add-lookup\n"); uint8_t pos_core; @@ -1048,14 +1020,6 @@ test_hash_multi_add_lookup(struct rwc_perf *rwc_perf_results, int rwc_lf, static int test_hash_readwrite_lf_main(void) { - /* - * Variables used to choose different tests. - * rwc_lf indicates if read-write concurrency lock-free support is - * enabled. - * htm indicates if Hardware transactional memory support is enabled. - */ - int rwc_lf = 0; - int htm; int use_jhash = 0; if (rte_lcore_count() == 1) { printf("More than one lcore is required " @@ -1065,12 +1029,7 @@ test_hash_readwrite_lf_main(void) setlocale(LC_NUMERIC, ""); - if (rte_tm_supported()) - htm = 1; - else - htm = 0; - - if (init_params(rwc_lf, use_jhash, htm) != 0) + if (init_params(use_jhash) != 0) return -1; if (generate_keys() != 0) return -1; @@ -1078,133 +1037,65 @@ test_hash_readwrite_lf_main(void) return -1; if (RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF) { - rwc_lf = 1; - printf("Test lookup with read-write concurrency lock free support" - " enabled\n"); - if (test_hash_add_no_ks_lookup_hit(&rwc_lf_results, rwc_lf, - htm) < 0) + printf("Test lookup with read-write concurrency lock free " + "support enabled\n"); + if (test_hash_add_no_ks_lookup_hit(&rwc_lf_results) < 0) return -1; - if (test_hash_add_no_ks_lookup_miss(&rwc_lf_results, rwc_lf, - htm) < 0) + if (test_hash_add_no_ks_lookup_miss(&rwc_lf_results) < 0) return -1; - if (test_hash_add_ks_lookup_hit_non_sp(&rwc_lf_results, rwc_lf, - htm) < 0) + if (test_hash_add_ks_lookup_hit_non_sp(&rwc_lf_results) < 0) return -1; - if (test_hash_add_ks_lookup_hit_sp(&rwc_lf_results, rwc_lf, - htm) < 0) + if (test_hash_add_ks_lookup_hit_sp(&rwc_lf_results) < 0) return -1; - if (test_hash_add_ks_lookup_miss(&rwc_lf_results, rwc_lf, htm) - < 0) + if (test_hash_add_ks_lookup_miss(&rwc_lf_results) < 0) return -1; - if (test_hash_multi_add_lookup(&rwc_lf_results, rwc_lf, htm) - < 0) + if (test_hash_multi_add_lookup(&rwc_lf_results) < 0) return -1; } - printf("\nTest lookup with read-write concurrency lock free support" - " disabled\n"); - rwc_lf = 0; - if (!htm) { - printf("With HTM Disabled\n"); - if (!RUN_WITH_HTM_DISABLED) { - printf("Enable RUN_WITH_HTM_DISABLED to test with" - " lock-free disabled"); - goto results; - } - } else - printf("With HTM Enabled\n"); - if (test_hash_add_no_ks_lookup_hit(&rwc_non_lf_results, rwc_lf, htm) - < 0) - return -1; - if (test_hash_add_no_ks_lookup_miss(&rwc_non_lf_results, rwc_lf, htm) - < 0) - return -1; - if (test_hash_add_ks_lookup_hit_non_sp(&rwc_non_lf_results, rwc_lf, - htm) < 0) - return -1; - if (test_hash_add_ks_lookup_hit_sp(&rwc_non_lf_results, rwc_lf, htm) - < 0) - return -1; - if (test_hash_add_ks_lookup_miss(&rwc_non_lf_results, rwc_lf, htm) < 0) - return -1; - if (test_hash_multi_add_lookup(&rwc_non_lf_results, rwc_lf, htm) < 0) - return -1; -results: + printf("\n\t\t\t\t\t\t********** Results summary **********\n\n"); int i, j, k; for (j = 0; j < 2; j++) { if (j == 1) printf("\n\t\t\t\t\t#######********** Bulk Lookup " "**********#######\n\n"); - printf("_______\t\t_______\t\t_________\t___\t\t_________\t\t" - "\t\t\t\t_________________\n"); - printf("Writers\t\tReaders\t\tLock-free\tHTM\t\tTest-case\t\t\t" + printf("_______\t\t_______\t\t_________\t\t\t" + "\t\t\t_________________\n"); + printf("Writers\t\tReaders\t\tTest-case\t\t\t" "\t\t\tCycles per lookup\n"); - printf("_______\t\t_______\t\t_________\t___\t\t_________\t\t\t" + printf("_______\t\t_______\t\t_________\t\t\t" "\t\t\t_________________\n"); for (i = 0; i < NUM_TEST; i++) { printf("%u\t\t%u\t\t", 1, rwc_core_cnt[i]); - printf("Enabled\t\t"); - printf("N/A\t\t"); printf("Hash add - no key-shifts, lookup - hit\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", + "%u\n\t\t\t\t", rwc_lf_results.w_no_ks_r_hit[j][i]); printf("Hash add - no key-shifts, lookup - miss\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", + "%u\n\t\t\t\t", rwc_lf_results.w_no_ks_r_miss[j][i]); printf("Hash add - key-shifts, lookup - hit" - "(non-shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", + "(non-shift-path)\t\t%u\n\t\t\t\t", rwc_lf_results.w_ks_r_hit_nsp[j][i]); printf("Hash add - key-shifts, lookup - hit " - "(shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", + "(shift-path)\t\t%u\n\t\t\t\t", rwc_lf_results.w_ks_r_hit_sp[j][i]); printf("Hash add - key-shifts, Hash lookup miss\t\t\t\t" - "%u\n\n\t\t\t\t", + "%u\n\n", rwc_lf_results.w_ks_r_miss[j][i]); - printf("Disabled\t"); - if (htm) - printf("Enabled\t\t"); - else - printf("Disabled\t"); - printf("Hash add - no key-shifts, lookup - hit\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_no_ks_r_hit[j][i]); - printf("Hash add - no key-shifts, lookup - miss\t\t\t\t" - "%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_no_ks_r_miss[j][i]); - printf("Hash add - key-shifts, lookup - hit " - "(non-shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_ks_r_hit_nsp[j][i]); - printf("Hash add - key-shifts, lookup - hit " - "(shift-path)\t\t%u\n\t\t\t\t\t\t\t\t", - rwc_non_lf_results.w_ks_r_hit_sp[j][i]); - printf("Hash add - key-shifts, Hash lookup miss\t\t\t\t" - "%u\n", rwc_non_lf_results.w_ks_r_miss[j][i]); - - printf("_______\t\t_______\t\t_________\t___\t\t" - "_________\t\t\t\t\t\t_________________\n"); + printf("_______\t\t_______\t\t_________\t\t\t" + "\t\t\t_________________\n"); } for (i = 1; i < NUM_TEST; i++) { for (k = 0; k < NUM_TEST; k++) { printf("%u", rwc_core_cnt[i]); printf("\t\t%u\t\t", rwc_core_cnt[k]); - printf("Enabled\t\t"); - printf("N/A\t\t"); - printf("Multi-add-lookup\t\t\t\t\t\t%u\n\n\t\t" - "\t\t", + printf("Multi-add-lookup\t\t\t\t\t\t%u\n\n", rwc_lf_results.multi_rw[i][j][k]); - printf("Disabled\t"); - if (htm) - printf("Enabled\t\t"); - else - printf("Disabled\t"); - printf("Multi-add-lookup\t\t\t\t\t\t%u\n", - rwc_non_lf_results.multi_rw[i][j][k]); - printf("_______\t\t_______\t\t_________\t___" - "\t\t_________\t\t\t\t\t\t" - "_________________\n"); + printf("_______\t\t_______\t\t_________\t\t\t" + "\t\t\t_________________\n"); } } } From patchwork Thu Nov 1 23:25:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 149999 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1393228ljp; Thu, 1 Nov 2018 16:26:20 -0700 (PDT) X-Google-Smtp-Source: AJdET5fkuWx1aPf049PQUZuYLy8zoYoBH9ab8KwOh0SeTcx8HyKQnEOQ/R9txxh/btbqN6ytrgi4 X-Received: by 2002:a1c:9805:: with SMTP id a5-v6mr6948117wme.106.1541114780850; Thu, 01 Nov 2018 16:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541114780; cv=none; d=google.com; s=arc-20160816; b=WCIpxq2Av8UwOtd1mlHdhWCr7Dsd7PQLxqTaKpVaaVyJPuoci6NbkR5Rf4l0z7CClM Ol8E4PuiTu6ZjMk4QidxAQzyycnda9GdJwS/XjLNBfC1oRc0qHrXiCdjqZIcrjvvppkZ JvgITJRyh9DtTXjXSe08t37gLyDhG9Ymd7XmrHWNoY90IFsngYrUu4uTbuvcvm0SXaAR kv589ckwGm2qrN+9bUQPQmvdfXKXt1wyVUYfNeNgJp85iS+Z+Z4a/bPTCvovXePXxm2n T/eucVReIt1sEN6r4GdBal1EJfyVc6KdwCzc22AHnwUqJk2GT3FgEddUiWRga2OIkliG GVmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=QcqqB1qCRBW4SdIY8UKZmipOZZ5uLJWKWFhQPUEQLSk=; b=A5lNPl4GBetKkjxkyyZ3a3+/JUBldxps61k8LhQdCFtiqREmkF/e0NUDb2niMCrhOA viux5d9jn2OsGEGRsIBwHvk1Uijp66iyz1c9SnolYictC/H/RrxQgjsbDb6G8ozsgunY 2O0cTuLSmrKYseijB5BQhZ95+NTy+Rzef5+lEXGxL1Su2egMq5A0p+IUtD5Y7ritli0G oHaOUYhufU3vYAyFec4AOK9LgPPTLDAuBRvXlSr8goXf0u9A5rIOtAZLqOU13F47OCg4 OWc2E+Mo2UDeL53tPj0f0n6u89lNC22+ohqZzoiKO4LA/LV01VHK2z21DgsX38/N8c+n uHdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id 79-v6si19700020wmy.140.2018.11.01.16.26.20; Thu, 01 Nov 2018 16:26:20 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D34BE1B3EC; Fri, 2 Nov 2018 00:25:59 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id A1DC91B3E0 for ; Fri, 2 Nov 2018 00:25:58 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 026471596; Thu, 1 Nov 2018 16:25:58 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 86E7D3F718; Thu, 1 Nov 2018 16:25:57 -0700 (PDT) From: Honnappa Nagarahalli To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, gavin.hu@arm.com, dharmik.thakkar@arm.com, nd@arm.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, Honnappa Nagarahalli Date: Thu, 1 Nov 2018 18:25:22 -0500 Message-Id: <20181101232522.702-5-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181101232522.702-1-honnappa.nagarahalli@arm.com> References: <20181101045454.632-2-honnappa.nagarahalli@arm.com> <20181101232522.702-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 4/4] doc/hash: deprecate lock ellision and read/write concurreny flags 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" RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY and RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT configuration flags are deprecated. Reader/Writer concurrency is provided by default. Transactional memory will be used if the platform supports it. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar Reviewed-by: Gavin Hu --- doc/guides/rel_notes/deprecation.rst | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 34b28234c..d34cca260 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -55,3 +55,8 @@ Deprecation Notices - ``rte_pdump_set_socket_dir`` will be removed; - The parameter, ``path``, of ``rte_pdump_init`` will be removed; - The enum ``rte_pdump_socktype`` will be removed. + +* hash: The configuration flags RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY and + RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT will be removed in v19.02. + Reader/writer concurrency will be supported by default. The library will + use transactional memory if the platform supports it.