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 X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BB35C47088 for ; Wed, 26 May 2021 16:08:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E007E613B5 for ; Wed, 26 May 2021 16:08:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E007E613B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JarIUQZM0HPEaoQBIABgH+HchsAVmYVe9F6eD7Jq1U4=; b=kVDZLOtfuGBwLp VBWyJQ6rIQ3gP+kXVr3D/Md5afZZ/eOsrhwoBi2KtR29gVWBOXQqYhdYk7sbErH9ZqkQlNxiUqrQD +svZsZ18agWLvZ7nyEWpBrs7fM//KNE7Did23EY7eTUAPJz6Ar9sGA3Xk0/bYmAnI9Tq51KiW1vV5 6nH9ky7kxj0EKs6JlVCjyPkCOReiP1w6E9At0hAZRyM4myyYNZwCEOI0/oumNAR+8wWGjw5CO5yhv Pu5gGy9f3/8vyuq/CAH61etCuI+uXmdcGY+D9+D5N9tRaDwh8HvunLuUEqZwQRE/L83Dcuj4jbFV2 VgX7WnrELjM0Mo4lgkYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llw3E-00FbV3-G7; Wed, 26 May 2021 16:06:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lluuS-00F5ti-1G for linux-arm-kernel@lists.infradead.org; Wed, 26 May 2021 14:53:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7AB9D1516; Wed, 26 May 2021 07:53:22 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C8F1F3F73D; Wed, 26 May 2021 07:53:20 -0700 (PDT) Date: Wed, 26 May 2021 15:53:17 +0100 From: Cristian Marussi To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com Subject: Re: [PATCH 4/4] firmware: arm_scmi: Introduce delegated xfers support Message-ID: <20210526145317.GQ28060@e120937-lin> References: <20210524231503.34924-1-cristian.marussi@arm.com> <20210524231503.34924-5-cristian.marussi@arm.com> <659c2f2c-e236-1a70-44be-c5f6871868e7@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <659c2f2c-e236-1a70-44be-c5f6871868e7@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210526_075324_164128_467B24F1 X-CRM114-Status: GOOD ( 25.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 24, 2021 at 07:20:45PM -0700, Florian Fainelli wrote: > > > On 5/24/2021 4:15 PM, Cristian Marussi wrote: > > Introduce optional support for delegated xfers allocation. > > > > An SCMI transport can optionally declare to support delegated xfers and > > then use a few helper functions exposed by the core SCMI transport layer to > > query the core for existing in-flight transfers matching a provided message > > header or alternatively and transparently obtain a brand new xfer to handle > > a freshly received notification message. > > In both cases the obtained xfer is uniquely mapped into a specific xfer > > through the means of the message header acting as key. > > > > In this way such a transport can properly store its own transport specific > > payload into the xfer uniquely associated to the message header before > > even calling into the core scmi_rx_callback() in the usual way, so that > > the transport specific message envelope structures can be freed early > > and there is no more need to keep track of their status till the core > > fully processes the xfer to completion or times out. > > > > The scmi_rx_callbak() does not need to be modified to carry additional > > transport-specific ancillary data related to such message envelopes since > > an unique natural association is established between the xfer and the > > related message header. > > > > Existing transports that do not need anything of the above will continue > > to work as before without any change. > > > > Signed-off-by: Cristian Marussi > > It would be better to see this in the context of its planned user, but > that looked reasonable enough. I agree, definitely better to see this in the context of usage. Such virtio-scmi rework is still in progress indeed, but working in my local testing so far. The reworked V4 virtio-scmi series is still to be refined and posted, and this transitional code lives now at: https://gitlab.arm.com/linux-arm/linux-cm/-/tree/scmi_virtio_trans_V4_rework and in particular this is the patch that changes virtio-scmi transport to use the new delegated xfers. (hopefully simplfying it) https://gitlab.arm.com/linux-arm/linux-cm/-/commit/0b524f89ea6cfcf6204a5eaa8cf9030118805b2f ...but, as said, it is highly work in progress so you may just want to wait for final V4 virtio-scmi rework posted and do not bother this noise of mine :D In any case thanks a lot for the feedback so far. Cristian > -- > Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel