Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2633094rdb; Fri, 8 Dec 2023 14:13:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9rOo9dl0bRcGI9uta+ujGm68171Nz9TvVDf9tdpomE9PRoHFsNLgQRB0mZUbO914howyY X-Received: by 2002:a17:903:245:b0:1cc:6cc3:d9ba with SMTP id j5-20020a170903024500b001cc6cc3d9bamr895560plh.4.1702073627324; Fri, 08 Dec 2023 14:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702073627; cv=none; d=google.com; s=arc-20160816; b=SQMkty4pLWTXXeucjx1+Q3huLRIv8K2jHIzgDjbyu1/5O3458r3kS5Kjil5VtWkoNQ I8foq/Wmd4HWRJASZOOHA1/NMxSuCgdJTOinBTe9ZMTDoZYSYzlkaMABT9QMmQ3I0Uds OgUQokN1hbfTfbK9oYaDRwLB2XF9SCwiN0SGHzYxuECUKZTrLnMEajXjAWyj6FGCFQra VPG+oC28VkDXj4KSLgNmGzcV9UASgve1fSNntC+JK4vCfL2JAKs+IpxmHJU7r+KNgQ/z QCKwe1fIlo8WRqYWGzLv49cCb5zEws7cnV+CcB8ZO+W+fIMoCotbrWk0UVbChoRLstdu zyOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=w1v4oKJqwHgkdrRyzMFs/vg/GrTCtGOQwJHxok3dXpE=; fh=YdHTU7+bgVBYkakqZrCzx6k0QHn30uASPLJOR2aip2s=; b=Rv1mIksyJJDU+XMJAJDzLrEtjJTabFakjODe/pwqHAtUPGH0uLry/4HfkLx3Rry3m/ tDM18w/Z1o1LzoZW3H4s01Uc3LGL6ichtSSCGhUTsspq5r5RoGmIjgkxzTQGvcj5N5Ok qAc3u23RGccl3LIibgkRf+L9mw72WllIK1P72BDzpMvUwGEsZ86Add3wmF6dJAeNLVgY wYBo8g4r8Gg2/MNaM97grXGjgdlDTSBGPNgMp0lprVdB0r3DXCOe7ov/omA8OwWA59Ts x1xrMDeEFQMeodaHqqwEMKMxNvZOSazgHDWdgmqsoAlEA9aew2wLHMcQYWHd/ZuWWzXj aXHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TwtvYz0b; spf=pass (google.com: domain of linux-crypto+bounces-655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c12-20020a170902b68c00b001d0b4bfcbc7si2109433pls.27.2023.12.08.14.13.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 14:13:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TwtvYz0b; spf=pass (google.com: domain of linux-crypto+bounces-655-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0263C2816A4 for ; Fri, 8 Dec 2023 22:13:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4693E59B4B; Fri, 8 Dec 2023 22:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TwtvYz0b" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 108171712; Fri, 8 Dec 2023 14:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702073618; x=1733609618; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=w1v4oKJqwHgkdrRyzMFs/vg/GrTCtGOQwJHxok3dXpE=; b=TwtvYz0bo1ERyWUUh+r7I3rSv2JB/UEJVLwXDMcGLBUJBd1BPcE/Zb6g vPWFSSFoDh4r7IH6GCD29QsYXHFEwDB3JPKPXFzhSAwh9Mwe/Z8YsIyiF CZtPzTEqcBowQzport34p3Rtep58VuyyKare3lSgovSOZGKtOD6iuwFnl 8HSzolmP7vwcfQfqulv+sYv0uCQLChQHHPaXloD02aw3+0Ml+K19uzFRm h9ePFrEWUdaaS3BS93vOMgNiVP5BcsqOO8LQdg9puAN5/iqodePpa0AH/ bgsorwATHKMMfDfsbUfTdPWCMidUoMesKXgEQwChD/jTeyI96i3hqkAZA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10918"; a="397262425" X-IronPort-AV: E=Sophos;i="6.04,262,1695711600"; d="scan'208";a="397262425" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2023 14:13:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10918"; a="748485527" X-IronPort-AV: E=Sophos;i="6.04,262,1695711600"; d="scan'208";a="748485527" Received: from arjunbal-mobl2.amr.corp.intel.com ([10.212.106.93]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2023 14:13:36 -0800 Message-ID: <433b750a252b778fc5bf6e8caf5bc14485623bac.camel@linux.intel.com> Subject: Re: [PATCH v11 14/14] dmaengine: idxd: Add support for device/wq defaults From: Tom Zanussi To: Fenghua Yu , herbert@gondor.apana.org.au, davem@davemloft.net, vkoul@kernel.org Cc: dave.jiang@intel.com, tony.luck@intel.com, wajdi.k.feghali@intel.com, james.guilford@intel.com, kanchana.p.sridhar@intel.com, vinodh.gopal@intel.com, giovanni.cabiddu@intel.com, pavel@ucw.cz, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Date: Fri, 08 Dec 2023 16:13:33 -0600 In-Reply-To: References: <20231201201035.172465-1-tom.zanussi@linux.intel.com> <20231201201035.172465-15-tom.zanussi@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2023-12-08 at 12:12 -0800, Fenghua Yu wrote: >=20 >=20 > On 12/1/23 12:10, Tom Zanussi wrote: > > Add a load_device_defaults() function pointer to struct > > idxd_driver_data, which if defined, will be called when an idxd > > device > > is probed and will allow the idxd device to be configured with > > default > > values. > >=20 > > The load_device_defaults() function is passed an idxd device to > > work > > with to set specific device attributes. > >=20 > > Also add a load_device_defaults() implementation IAA devices; > > future > > patches would add default functions for other device types such as > > DSA. > >=20 > > The way idxd device probing works, if the device configuration is > > valid at that point e.g. at least one workqueue and engine is > > properly > > configured then the device will be enabled and ready to go. > >=20 > > The IAA implementation, idxd_load_iaa_device_defaults(), configures > > a > > single workqueue (wq0) for each device with the following default > > values: > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mode=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 "dedicated" > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 threshold=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 size=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Total WQ Size from WQCAP > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 priority=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A010 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 type=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0IDXD_WQT_KERNEL > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 group=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "iaa_crypto" > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 driver_name=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 "crypto" > >=20 > > Note that this now adds another configuration step for any users > > that > > want to configure their own devices/workqueus with something > > different > > in that they'll first need to disable (in the case of IAA) wq0 and > > the > > device itself before they can set their own attributes and re- > > enable, > > since they've been already been auto-enabled.=C2=A0 Note also that in > > order > > for the new configuration to be applied to the deflate-iaa crypto > > algorithm the iaa_crypto module needs to unregister the old > > version, > > which is accomplished by removing the iaa_crypto module, and > > re-registering it with the new configuration by reinserting the > > iaa_crypto module. > >=20 > > Signed-off-by: Tom Zanussi > > Reviewed-by: Dave Jiang >=20 > Reviewed-by: Fenghua Yu >=20 Thanks, Fenghua! Tom > Thanks. >=20 > -Fenghua