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 0C11B45A81; Tue, 1 Oct 2024 21:26:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2F554027C; Tue, 1 Oct 2024 21:26:56 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mails.dpdk.org (Postfix) with ESMTP id 6149F40273 for ; Tue, 1 Oct 2024 21:26:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727810815; x=1759346815; h=from:to:cc:subject:date:message-id; bh=mP33OmqVrVgR+ahM7dspGrYnSlmcL6BQYARgVjiAlxA=; b=dn+mJzdmUHZenseeF4vmXPz44pdSTIDL63hVrKXVE0FEIOA5+ZOZmM6C 0hyCVhGX00mxVbJ1uK8AaODNNmTls/8uzlFJbemJCsLLViEH/0WK36H6+ CwktMwbPTQx0SswgVS6JwnUb8PGePee+rtYuIiBA0DRYx8L/tRw7gpmev yKe5gETzSQ9p5dXYzIyl4QbEhZ85/ADEEMRKkJc5DNV08uuCL/wZZdbZn Loj4ftsk5f9RsXqjxt5Qfn0cDpM8pzk+xPwVy04jDKNIakzguDA0Eko32 A7fxhYJF6vHdDDgMHyW0Mtai5X/9nHzFT7Eq6fy2tnUPfR6v4azFMRo/L w==; X-CSE-ConnectionGUID: tVKGVW9UR4yhsabcZ9T2ag== X-CSE-MsgGUID: jjZqK9gNRX+fdACmj8C9mg== X-IronPort-AV: E=McAfee;i="6700,10204,11212"; a="27139751" X-IronPort-AV: E=Sophos;i="6.11,169,1725346800"; d="scan'208";a="27139751" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2024 12:26:54 -0700 X-CSE-ConnectionGUID: ev2VdpqDQUSuYqwACjMNHQ== X-CSE-MsgGUID: ZOysTIR5TmerjfGAGaIhJA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,169,1725346800"; d="scan'208";a="78521901" Received: from silpixa00399302.ir.intel.com ([10.237.214.22]) by orviesa005.jf.intel.com with ESMTP; 01 Oct 2024 12:26:52 -0700 From: Arkadiusz Kusztal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, kai.ji@intel.com, brian.dooley@intel.com, Arkadiusz Kusztal Subject: [PATCH v2 0/3] net: add thread-safe crc api Date: Tue, 1 Oct 2024 19:11:47 +0100 Message-Id: <20241001181150.43506-1-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 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 current net CRC API is not thread-safe, this patch solves this by adding another, thread-safe API functions. This API is also safe to use across multiple processes, yet with limitations on max-simd-bitwidth, which will be checked only by the process that created the CRC context; all other processes will use the same CRC function when used with the same CRC context. It is an undefined behavior when process binaries are compiled with different SIMD capabilities when the same CRC context is used v2: - removed old API - added multi-process support - replaced test cases - marked internal functions as __rte_internal Arkadiusz Kusztal (3): net: add thread-safe crc api crypto/qat: use process safe crc api test/crc: replace thread-unsafe api functions app/test/test_crc.c | 168 ++++++++----------- doc/guides/cryptodevs/qat.rst | 6 + drivers/crypto/qat/qat_sym.h | 6 +- drivers/crypto/qat/qat_sym_session.c | 3 + drivers/crypto/qat/qat_sym_session.h | 2 + lib/net/net_crc.h | 19 ++- lib/net/rte_net_crc.c | 309 ++++++++++------------------------- lib/net/rte_net_crc.h | 40 +---- lib/net/version.map | 18 +- 9 files changed, 204 insertions(+), 367 deletions(-) -- 2.13.6