From patchwork Thu Mar 28 17:44:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Glover X-Patchwork-Id: 13609265 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF32426AF6; Thu, 28 Mar 2024 17:45:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711647907; cv=none; b=UhJ+Df7Ry/7U+fDp77tWqRgLp2/6RsJJkTnCtVxPKrlDMXyRQwer6bDmU9/pUUrVHAeAw8JSsh9TwMF5GJ2AaSsImQYRAldLXZ/MAm7VZmiENd0qil+BwMcnT+iR8UFNQ+1M7BPrDmgptoTeCB3qg906iboTtfJaJu1xjVcYpBU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711647907; c=relaxed/simple; bh=njo01UyIuCS4hJErYPZdC79rPyF1110IDRpOnxYG0K0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=H07QDQvVyZaLN+9KIH9o+qCh2BxR/VoTGlwBrrjY3pk6X99Zm4DaCvPdVzyi9Ua6LH2O8XPVNgKqTnUYbzgpSHA6ubW7QGcCqDDPpK/JGzl9eboUvHuEjbn9nc0KVuFvO6ntH5uY9iNqq5x+MVeXGznePcvNcjOKaJO+H9H769Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TjEzPczO; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TjEzPczO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711647906; x=1743183906; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=njo01UyIuCS4hJErYPZdC79rPyF1110IDRpOnxYG0K0=; b=TjEzPczOrfyLnTJ+rAOcj4pIP8/N+ybP8xNfr/tOdIvHVdk0AbQivpYo R34uyu7dKHEoNf3ymc1ZzRSZv8QxxlhAcMerwopNjDZrMMwRbycT+aznQ LJ073iwW4nHviTNq6stigd4ncVJyDHvwIKt0qIb3ouGNxk9GoShmVgezp VKLShyheirxO5/Tdy/i0JyFs7V8wonIH5fq9Geh63K1MKxOYH/x2Z6N/A JgL3IfOv1BaNW/rAzCBsSxpPM/o9bX5L3iTpzUV546009si4Qlvmh6GVv X+DcQkRJPAZ3u8ejNI7u+HQ4on3aSwgZgUb5Op6gsCaxRgt+GYdV4oz1I A==; X-CSE-ConnectionGUID: mozWwTXBRlSf8jc3KwBplg== X-CSE-MsgGUID: Hf1mjSBnSVub/4wzwOBAJA== X-IronPort-AV: E=McAfee;i="6600,9927,11027"; a="10631342" X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="10631342" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 10:44:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="16675562" Received: from jf5300-b11a264t.jf.intel.com ([10.242.51.89]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 10:44:57 -0700 From: Andre Glover To: tom.zanussi@linux.intel.com, herbert@gondor.apana.org.au, davem@davemloft.net Cc: dave.jiang@intel.com, fenghua.yu@intel.com, wajdi.k.feghali@intel.com, james.guilford@intel.com, vinodh.gopal@intel.com, tony.luck@intel.com, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org, andre.glover@linux.intel.com Subject: [PATCH 0/4] crypto: Add new compression modes for zlib and IAA Date: Thu, 28 Mar 2024 10:44:41 -0700 Message-Id: X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This patch series adds 'canned' compression for Intel IAA and zlib. It also adds 'dynamic' compression for Intel IAA which is compatible with zlib deflate algorithms. The original IAA crypto submissions [1] included a 'canned' compression mode, but support for 'canned' compression was removed during the review because it didn't have an equivalent software implementation available [2]. Deflate compression can be done in a variety of modes. The dynamic mode uses Huffman tables that are generated/optimized for that particular input. This gives the best compression ratio but has the longest latency. The fixed mode uses Huffman tables that are defined by the Deflate standard. It generally gives the best latency but with a lower compression ratio. The 'canned' compression mode implements a compression scheme that uses a statically defined set of Huffman tables, but where the Deflate Block Header is implied rather than stored with the compressed data. The 'canned' mode results in lower compression/decompression latencies compared to using the dynamic mode, but it results in a better compression ratio than using the fixed mode. Below is a table showing the latency improvements with zlib, between zlib dynamic and zlib canned modes, and the compression ratio for each mode while using a set of 4300 4KB pages sampled from SPEC CPU17 workloads: