From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F16F8A034C; Fri, 19 Aug 2022 21:52:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D996640A7B; Fri, 19 Aug 2022 21:52:29 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 2BF2840689 for ; Fri, 19 Aug 2022 21:52:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660938748; x=1692474748; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=unpmnkQrNClFIha9BJ4OdMdBtqU8JVoXRIoVVQjEflM=; b=mnlp+dmVNmEgV4uYZRI/84moLi1xp3TigaRxvGqulrEaBKp3oLTFavgs X/mBhHg+iaagM7ItUPUiNBHpcGU2p9zW0Qq0q72/hNXzjE9fOAavrAZpn 5Ygq0Nf5CDmdkCSIkoWvaeTL57nkI/l7qVekYpvJCRaDnTztbWsDV/O5F 0WEk9mY3bGKxtmXOhuBpgm/opHpqLyO2gMck1uxUwUWUW+7C5o/k6lkmE wdYMu3ZxuZHkqLbSsnRdGPUIFsYllXkb9uR6aacJTkvk4DqRV9IOD3iB0 SvCFwNsVQSTHZZ6lc4n2WsPL9T3j28z+TYORYYig7wo5M/gXGQyU9cl7y g==; X-IronPort-AV: E=McAfee;i="6500,9779,10444"; a="280047518" X-IronPort-AV: E=Sophos;i="5.93,249,1654585200"; d="scan'208";a="280047518" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2022 12:52:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,248,1654585200"; d="scan'208";a="604695936" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com.) ([10.237.223.157]) by orsmga007.jf.intel.com with ESMTP; 19 Aug 2022 12:52:26 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Subject: [PATCH V2 0/6] pipeline: make the hash function configurable per table Date: Fri, 19 Aug 2022 19:52:19 +0000 Message-Id: <20220819195225.1483020-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220818114449.1408226-1-cristian.dumitrescu@intel.com> References: <20220818114449.1408226-1-cristian.dumitrescu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The exact match and learner tables use a hash function for the lookup operation. This patch set makes the hash function configurable and removes some limitations. The hash function previously used by these table types had the following limitations: a) Not configurable: An internally hardcoded version was used; b) Mask-based: This prevents using most of the available hash functions, as they are not mask-based; c) Key size limited to 64 bytes or less. The new hash function is: a) Configurable; b) Not mask-based; c) Not limited to key sizes to less than or equal to 64 bytes. Also, since this flexibility has some performance cost, this patch set also introduces key comparison functions specialized for each key size value. Since the key size is fixed for each table, the key comparison function can be selected at initialization as opposed to using a generic function that can handle any key size. This strategy result in a performance improvement for the table lookup operation of around 5%. Depends-on: series-24117 ("pipeline: pipeline configuration and build improvements") Change log: V2: -Added check for table match fields to be contiguous for exact match tables. -Fixed bug in the specification file parsing related to hash function configuration. Cristian Dumitrescu (6): table: add hash function prototype table: add key comparison functions table: configure the hash function for regular tables pipeline: configure the hash function for regular tables table: configure the hash function for learner tables pipeline: configure the hash function for learner tables lib/pipeline/rte_swx_ctl.c | 1 + lib/pipeline/rte_swx_ctl.h | 3 + lib/pipeline/rte_swx_pipeline.c | 134 ++++++++++-- lib/pipeline/rte_swx_pipeline.h | 30 ++- lib/pipeline/rte_swx_pipeline_internal.h | 2 + lib/pipeline/rte_swx_pipeline_spec.c | 83 ++++++- lib/pipeline/rte_swx_pipeline_spec.h | 2 + lib/table/meson.build | 2 + lib/table/rte_swx_hash_func.h | 39 ++++ lib/table/rte_swx_keycmp.c | 166 ++++++++++++++ lib/table/rte_swx_keycmp.h | 49 +++++ lib/table/rte_swx_table.h | 8 + lib/table/rte_swx_table_em.c | 266 ++++------------------- lib/table/rte_swx_table_learner.c | 220 +++---------------- lib/table/rte_swx_table_learner.h | 6 + 15 files changed, 555 insertions(+), 456 deletions(-) create mode 100644 lib/table/rte_swx_hash_func.h create mode 100644 lib/table/rte_swx_keycmp.c create mode 100644 lib/table/rte_swx_keycmp.h -- 2.34.1