Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp37736lqt; Sun, 17 Mar 2024 23:44:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGMZdjoI8Vvf0KCfQtfGGBsi39HYCyvIYgiNHCIgU9NdRgqF8eMbs5FDGsH9ZYCV2D49RYnUh33n6RklNUtZn3i3AxtYbG3S2iHwRCdw== X-Google-Smtp-Source: AGHT+IG/D0GlZCNHYpMRKZugbBXZ07PVmDrX1nkNB6e570tX5dUqGLlDYxD/oXUBsLcvWZ/0Qei8 X-Received: by 2002:a17:906:cf8b:b0:a46:13a9:6dc0 with SMTP id um11-20020a170906cf8b00b00a4613a96dc0mr7454346ejb.64.1710744284689; Sun, 17 Mar 2024 23:44:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710744284; cv=pass; d=google.com; s=arc-20160816; b=aqrCqA8gfmNBDiQ4ctSrDxohM9Fk0FYZHak4IiK3FeVAJV6GhJwSs9FneJGgy34+OI Ato/OguswtRN0py5vfZ8Uysf4axJSw5ZSzvSaYd+Tl3nxhoU1eTFfQ1I368cLn9aM6fr BtKl6G6gbO6FdKe7ABjufGJl5ss52KBwhMakeDcf5f/x4vD2r3KUQ79eARftojMqWz4m G6z/kPCI4yeQ9dfideevEQA8i+D5LHvqLlFNKjbVPXqRZYFqHqrDYW2IUtFVGmrSQ105 2knpcAHZHDbWOvPSPREWSx3Zs1EXgbabVnWuOnA22n9JJGYKfVaTnsWtc3M+dEEv/OYQ 97Pg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=osDyJdcJu79eMx8AxQ473FAUCgGzUBaif8zLPvxwRZ0=; fh=CwQwpe5hcQPvbRPs6Vid/R9TEK5++LPdVDzlNYdkOpk=; b=ruJJ6xQTP/J0RgOGFpg0qe7pHfARWF4VpSSHsLP5mkoHaMbmotkRnHbzgpl0Irosus hTYqEJiGH7oJe8NvRK+3i7uetAfMtMJ5Ll8QRDvWziGH8M8POHmjicK5i27uA5qZ3UPu HyiqKhaRAPlQK7G3FsAtHy/JHZ/EvC6rqVVwfz3NkCz3J3Hu1vX3hqkbqKvkk+EodT0W 6MDokTkQbzoYdQSlmYLUV1aw/yYFQ6l5WGX4757KCx4bOyw48o6CVL7IJmZ3kdQbuC+V is/VgDUrmfD2KfGIhMmjyARs08ltuh/txK841HpJAg5nLIB24FJ4JNO9EEPjfdnYvIyK WvZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DrhDOnNJ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-crypto+bounces-2704-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gt42-20020a1709072daa00b00a44a48327bfsi4132892ejc.182.2024.03.17.23.44.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 23:44:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2704-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DrhDOnNJ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-crypto+bounces-2704-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 642291F214B7 for ; Mon, 18 Mar 2024 06:44:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A091208A9; Mon, 18 Mar 2024 06:44:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DrhDOnNJ" X-Original-To: linux-crypto@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 F11A61CA89 for ; Mon, 18 Mar 2024 06:44:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710744279; cv=none; b=PG2k8N1T/9+KiAGOhO7Du8/qTNoOyFOAzcYq8FPSa1UIvI2J6Qb9O5eXC9Mxjq+/3CTmHybFxeLjs1OJnm/S5a1WOKgl3wWE8RR5b/HxPScwyUbZSZ39hJHb4JUikUjQS1mLF85atpWtGW4Z0uCQtLlRRuk7BkEKBihsLGeBEY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710744279; c=relaxed/simple; bh=skEsCZKyKJolpTxFMXOKRN6j1kC3rXie0+a+1lIxssk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=g0HnPbTCtu6CN+KdHAGl6lhlj1iz1w6TJfm9xQVPUi6jRLbdGw8HVONHT6482J3mBu2KbgUKm0yGdBf/CIGqAnqZyFzkqnXdmbkF76lMcY78a71yb8Hoi5kCpwGdgnYGe/05H8DvIDdJhD3EO2xYHxQw8uquPeBJCgw6RBB7JuE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DrhDOnNJ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710744276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=osDyJdcJu79eMx8AxQ473FAUCgGzUBaif8zLPvxwRZ0=; b=DrhDOnNJ7rSol3jphUDQc4iSHu336aqQBq0NlR2mslJrnyGwxdJyenrqnDqC9bQeHB6u4E NaKo0zCqrImE+QfLsqX2AdXsBwzmDL5lL+c06FbIGrmECVCePYPJ70WwZ7bNjHj4UwxfU1 RvCcoGav9PKYp7cM/b05KN/ZgXFK/gk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-490-KNM635-VOJiaQzITiPsPyw-1; Mon, 18 Mar 2024 02:44:33 -0400 X-MC-Unique: KNM635-VOJiaQzITiPsPyw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E96268007A3; Mon, 18 Mar 2024 06:44:32 +0000 (UTC) Received: from cantor.redhat.com (unknown [10.2.16.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C324C04121; Mon, 18 Mar 2024 06:44:32 +0000 (UTC) From: Jerry Snitselaar To: Tom Zanussi Cc: Jonathan Corbet , linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH] crypto: iaa: Fix some errors in IAA documentation Date: Sun, 17 Mar 2024 23:44:21 -0700 Message-ID: <20240318064421.833348-1-jsnitsel@redhat.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 This cleans up the following issues I ran into when trying to use the scripts and commands in the iaa-crypto.rst document. - Fix incorrect arguments being passed to accel-config config-wq. - Replace --device_name with --driver-name. - Replace --driver_name with --driver-name. - Replace --size with --wq-size. - Add missing --priority argument. - Add missing accel-config config-engine command after the config-wq commands. - Fix wq name passed to accel-config config-wq. - Add rmmod/modprobe of iaa_crypto to script that disables, then enables all devices and workqueues to avoid enable-wq failing with -EEXIST when trying to register to compression algorithm. - Fix device name in cases where iaa was used instead of iax. Cc: Tom Zanussi Cc: Jonathan Corbet Cc: linux-crypto@vger.kernel.org Cc: linux-doc@vger.kernel.org Signed-off-by: Jerry Snitselaar --- .../driver-api/crypto/iaa/iaa-crypto.rst | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Documentation/driver-api/crypto/iaa/iaa-crypto.rst b/Documentation/driver-api/crypto/iaa/iaa-crypto.rst index de587cf9cbed..330d35df5f16 100644 --- a/Documentation/driver-api/crypto/iaa/iaa-crypto.rst +++ b/Documentation/driver-api/crypto/iaa/iaa-crypto.rst @@ -179,7 +179,9 @@ has the old 'iax' device naming in place) :: # configure wq1.0 - accel-config config-wq --group-id=0 --mode=dedicated --type=kernel --name="iaa_crypto" --device_name="crypto" iax1/wq1.0 + accel-config config-wq --group-id=0 --mode=dedicated --type=kernel --priority=10 --name="iaa_crypto" --driver-name="crypto" iax1/wq1.0 + + accel-config config-engine iax1/engine1.0 --group-id=0 # enable IAA device iax1 @@ -536,12 +538,20 @@ The below script automatically does that:: echo "End Disable IAA" + echo "Reload iaa_crypto module" + + rmmod iaa_crypto + modprobe iaa_crypto + + echo "End Reload iaa_crypto module" + # # configure iaa wqs and devices # echo "Configure IAA" for ((i = 1; i < ${num_iaa} * 2; i += 2)); do - accel-config config-wq --group-id=0 --mode=dedicated --size=128 --priority=10 --type=kernel --name="iaa_crypto" --driver_name="crypto" iax${i}/wq${i} + accel-config config-wq --group-id=0 --mode=dedicated --wq-size=128 --priority=10 --type=kernel --name="iaa_crypto" --driver-name="crypto" iax${i}/wq${i}.0 + accel-config config-engine iax${i}/engine${i}.0 --group-id=0 done echo "End Configure IAA" @@ -552,10 +562,10 @@ The below script automatically does that:: echo "Enable IAA" for ((i = 1; i < ${num_iaa} * 2; i += 2)); do - echo enable iaa iaa${i} - accel-config enable-device iaa${i} - echo enable wq iaa${i}/wq${i}.0 - accel-config enable-wq iaa${i}/wq${i}.0 + echo enable iaa iax${i} + accel-config enable-device iax${i} + echo enable wq iax${i}/wq${i}.0 + accel-config enable-wq iax${i}/wq${i}.0 done echo "End Enable IAA" -- 2.41.0