From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C03B668C2 for ; Thu, 18 Sep 2014 12:29:02 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 18 Sep 2014 03:34:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,546,1406617200"; d="scan'208";a="601529809" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 18 Sep 2014 03:34:32 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s8IAYWSt012106 for ; Thu, 18 Sep 2014 11:34:32 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s8IAYVEC003862 for ; Thu, 18 Sep 2014 11:34:31 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id s8IAYVni003858 for dev@dpdk.org; Thu, 18 Sep 2014 11:34:31 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Thu, 18 Sep 2014 11:34:28 +0100 Message-Id: <1411036471-3822-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH 0/3] New Thread Safe Hash Library 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: Thu, 18 Sep 2014 10:29:03 -0000 This is an alternative hash implementation to the existing hash library. This patch set provides a thread safe hash implementation, it allows users to use multiple readers/writers working on a same hash table. Main differences between the previous and the new implementation are: - Multiple readers/writers can work on the same hash table, whereas in the previous implementation writers could not work on the table at the same time readers do. - Previous implementation returned an index to a table after a lookup. This implementation returns 8-byte integers or pointers to external data. - Maximum entries to be looked up in bursts is 64, instead of 16. - Maximum key length has being increased to 128, instead of a maximum of 64. Basic implementation: - A sparse table containing buckets (64-byte long) with hashes, most of which are empty, and indexes to the second table. - A compact table containing keys for final matching, plus data associated to them. Pablo de Lara (3): eal: add const in prefetch functions lib/librte_tshash: New Thread Safe Hash library for DPDK app/test: Added unit tests for Thread Safe Hash library app/test/Makefile | 4 + app/test/test_tshash_func.c | 1117 ++++++++++++++++++++++++ app/test/test_tshash_multi_thread.c | 351 ++++++++ app/test/test_tshash_perf.c | 631 +++++++++++++ config/common_bsdapp | 6 + config/common_linuxapp | 6 + lib/Makefile | 1 + lib/librte_eal/common/include/rte_log.h | 1 + lib/librte_eal/common/include/rte_prefetch.h | 12 +- lib/librte_eal/common/include/rte_tailq_elem.h | 2 + lib/librte_tshash/Makefile | 49 + lib/librte_tshash/rte_tshash.c | 580 ++++++++++++ lib/librte_tshash/rte_tshash.h | 533 +++++++++++ lib/librte_tshash/rte_vector_jhash.h | 332 +++++++ mk/rte.app.mk | 4 + 15 files changed, 3623 insertions(+), 6 deletions(-) create mode 100644 app/test/test_tshash_func.c create mode 100644 app/test/test_tshash_multi_thread.c create mode 100644 app/test/test_tshash_perf.c create mode 100644 lib/librte_tshash/Makefile create mode 100644 lib/librte_tshash/rte_tshash.c create mode 100644 lib/librte_tshash/rte_tshash.h create mode 100644 lib/librte_tshash/rte_vector_jhash.h -- 1.7.7.6