From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 338D2C636D4 for ; Fri, 10 Feb 2023 22:17:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbjBJWRp (ORCPT ); Fri, 10 Feb 2023 17:17:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233340AbjBJWRp (ORCPT ); Fri, 10 Feb 2023 17:17:45 -0500 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C172B4FC20; Fri, 10 Feb 2023 14:17:43 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 5A9532808FCC2; Fri, 10 Feb 2023 23:17:42 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 41C43CC5C9; Fri, 10 Feb 2023 23:17:42 +0100 (CET) Date: Fri, 10 Feb 2023 23:17:42 +0100 From: Lukas Wunner To: Jonathan Cameron Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Gregory Price , Ira Weiny , Dan Williams , Alison Schofield , Vishal Verma , Dave Jiang , "Li, Ming" , Hillf Danton , Ben Widawsky , linuxarm@huawei.com, linux-cxl@vger.kernel.org Subject: Re: [PATCH v2 04/10] cxl/pci: Use synchronous API for DOE Message-ID: <20230210221742.GA15075@wunner.de> References: <20230124110127.00001de0@Huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230124110127.00001de0@Huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Tue, Jan 24, 2023 at 11:01:27AM +0000, Jonathan Cameron wrote: > On Mon, 23 Jan 2023 11:14:00 +0100 Lukas Wunner wrote: > > A synchronous API for DOE has just been introduced. Convert CXL CDAT > > retrieval over to it. > > The clean up here gives opportunities for 'right sizing' at least > the response to reading the header. The others are harder was we > don't know what each one is going to be. > May make more sense as a follow on patch though. Thy will be done: https://lore.kernel.org/linux-pci/49c5299afc660ac33fee9a116ea37df0de938432.1676043318.git.lukas@wunner.de/ > > - DECLARE_CDAT_DOE_TASK(CDAT_DOE_REQ(entry_handle), t); > > + u32 request = CDAT_DOE_REQ(entry_handle); > > + u32 response[32]; > > As above, this is still a bit random. > Things we might be reading. > DSMAS: 6 dword > DSLBIS: 6 dword > DSIS: 2 dword > DSEMTS: 6 dword > SSLBIS: 4 dword + 2 * entires dwords. This can get huge - as > can include p2p as well as the smaller usp / dsp set. > > Right now we aren't reading from switches though so we can fix > that later (I posted an RFC for switches ages ago, but haven't > gotten back to it since then) > > So for now probably leave this one at the 32 dwords. I found a way to avoid a response buffer altogether. Thanks, Lukas