Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3543895imw; Mon, 18 Jul 2022 09:57:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vNjYms4wu8GJaPvpYeTHf0C+R0V9S/33SEJZI7EVmc+nxpNIdm4xOZxLs+FF83LXPbfSdk X-Received: by 2002:a17:906:5d08:b0:6ff:8ed:db63 with SMTP id g8-20020a1709065d0800b006ff08eddb63mr26867238ejt.408.1658163443843; Mon, 18 Jul 2022 09:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658163443; cv=none; d=google.com; s=arc-20160816; b=cIpSp0wkZeWAJw2FT+jvWsAWr9qi1e5Y4a5z+Q/OrLlbIF0B20wH371M0PluOpsOed xkwHQm1c5Xq+yxH+au02ZdqlIwAtVFN6CC01Xuj3o8WtYCmk38K1OFN4UjJpT23iMY1K WPHjsWPWENkrPitxT0cqJg8LSPyFkIAppJYXTkTs6mXlUNx6NcLSz0P1MYlKMC4ZvySm G/7b80W5YmrtS14ps41+FbxHgE7ADuq+jmRUWumOFYZaEBRlsdXVZUnP69aqLcWQK/P7 jKOHpFnyWFEeXUs9jPoTJTbX3HcrhvQxo3qJZ1sR2uvbAlpOUFKEOmvKOb6JW1+jTfjY +egg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gfpNnbv9YOemTBAvBMvhdh6XDEmFRn+jVc5Sgvldw+c=; b=ljygxbDUjVMTLiO/GDmyczwOJfOJBczak0fgLtxMtADVnIa32juSKfdOj4t6U2qfY1 nnblHLUw9OXuDVn0hwVNmo8nzVSCfNpMTboL9WoqSn1o+CyDP/i/2vz5aWOZmcV4xGcS OqruI8XgevMz63BkSKX6QA+1nhY/9iw7FLoROuVZzffQTcAal08I2sxcSXmIAP0QsAlr hUk0F5ylDVhyxfSeD9K2DsfpSPmZKZ/KOJL3lao3Mwj0OfXnkI5GBA1XJaGVGWJwXzpa JLpswGCidVvHJUXa9eEGUEheWFRBi7GZZfWnhe8UDlDwu4/7LDMOkmlVtdFHjlVIcUFy rZhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YIUJz0+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg8-20020a170907970800b0072a7a097e3csi18672320ejc.464.2022.07.18.09.56.57; Mon, 18 Jul 2022 09:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YIUJz0+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233951AbiGRQyq (ORCPT + 99 others); Mon, 18 Jul 2022 12:54:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233673AbiGRQyo (ORCPT ); Mon, 18 Jul 2022 12:54:44 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E5141056A for ; Mon, 18 Jul 2022 09:54:43 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id x91so16180727ede.1 for ; Mon, 18 Jul 2022 09:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gfpNnbv9YOemTBAvBMvhdh6XDEmFRn+jVc5Sgvldw+c=; b=YIUJz0+n5d+MRgeE8Kggy7XaBMiqg9MnEjo0j7YMzPJYtH+Alg1O4ymKE42Z3IKh8q CxHTP8fHRuyW1dviJIgkn/4suGtCaaNT3qo/CGesBmoKK3PSiBlk6RHX+n/t+kUoiPoT k0G+McbVBQ+YkIJdowKGhQWEFRIb15jfHhgAWgGXCVhS1G3UHIQ1FKnl7kIeBbfnl8+m A3K6w2y+CDIvDFweCJJ+9bvBReSF6l/TYXyO2YTlCVXiNKFhO2QQ5k7JhpSnnNChCq0O qL7v5XVPRwIu3iiveTk2YtcapolY9zaZDcb/3ocmub/aF/+BYBFSyUHuyL1PsrMFjn3r B2pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gfpNnbv9YOemTBAvBMvhdh6XDEmFRn+jVc5Sgvldw+c=; b=Jb3Qt9N2aDUFakN69desD1Q6tWN2pQRyudbkJYmDf3K9j1yTRF++rO5CeZb2qV2s8J TJXtrZIbbelk8bob405VAJ1C8X3MtDC74DCYpXWlvTNLNDM3i+sSfwX3Iw6qfxER5Q/T 5WU5q8wHV37FfcRmCgMSb5N42NvuN775q8gPL3tAOR38WJFVXLqthODfYBkqDp8cOsXp s9cgYZIqAj4XYCD8HzzPNOOxWSbU2BUKBx9azv4wtfW7Lhe1ssBtZPWdgfloc+Kz6SwQ Z+466bt+iFVDCh8Q+VbLZDCSt/xWDHQygUddz0SiBbaWZLVDhE1LhJBpmVETNwLgD0Po kP/A== X-Gm-Message-State: AJIora/xVMdqHVmHrhVbQwYRGNaaJro+ZK7ojUoxcsPOuoZ8UvW16dWe gwS1R3vGpAW1t1us8Lv1MZK1rtNG5hOojX6MvNN/IQ== X-Received: by 2002:a05:6402:35cf:b0:43a:d139:ea2b with SMTP id z15-20020a05640235cf00b0043ad139ea2bmr38300885edc.415.1658163281692; Mon, 18 Jul 2022 09:54:41 -0700 (PDT) MIME-Version: 1.0 References: <1654651005-15475-1-git-send-email-quic_clew@quicinc.com> <0eaabd6c-07bd-eb83-da9d-6195b350bc9a@foss.st.com> In-Reply-To: <0eaabd6c-07bd-eb83-da9d-6195b350bc9a@foss.st.com> From: Mathieu Poirier Date: Mon, 18 Jul 2022 10:54:30 -0600 Message-ID: Subject: Re: [PATCH 0/4] Introduction of rpmsg_rx_done To: Arnaud POULIQUEN Cc: Chris Lew , bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Jul 2022 at 02:26, Arnaud POULIQUEN wrote: > > Hello Chris, > > On 6/8/22 03:16, Chris Lew wrote: > > This series proposes an implementation for the rpmsg framework to do > > deferred cleanup of buffers provided in the rx callback. The current > > implementation assumes that the client is done with the buffer after > > returning from the rx callback. > > > > In some cases where the data size is large, the client may want to > > avoid copying the data in the rx callback for later processing. This > > series proposes two new facilities for signaling that they want to > > hold on to a buffer after the rx callback. > > They are: > > - New API rpmsg_rx_done() to tell the rpmsg framework the client is > > done with the buffer > > - New return codes for the rx callback to signal that the client will > > hold onto a buffer and later call rpmsg_rx_done() > > > > This series implements the qcom_glink_native backend for these new > > facilities. > > The API you proposed seems to me quite smart and adaptable to the rpmsg > virtio backend. > > My main concern is about the release of the buffer when the endpoint > is destroyed. > > Does the buffer release should be handled by each services or by the > core? > > I wonder if the buffer list could be managed by the core part by adding > the list in the rpmsg_endpoint structure. On destroy the core could call > the rx_done for each remaining buffers in list... > > I let Bjorn and Mathieu advise on this... Thanks for taking a look Arnaud. I'll get to this sortly. > > Thanks, > Arnaud > > > > > Chris Lew (4): > > rpmsg: core: Add rx done hooks > > rpmsg: char: Add support to use rpmsg_rx_done > > rpmsg: glink: Try to send rx done in irq > > rpmsg: glink: Add support for rpmsg_rx_done > > > > drivers/rpmsg/qcom_glink_native.c | 112 ++++++++++++++++++++++++++++++-------- > > drivers/rpmsg/rpmsg_char.c | 50 ++++++++++++++++- > > drivers/rpmsg/rpmsg_core.c | 20 +++++++ > > drivers/rpmsg/rpmsg_internal.h | 1 + > > include/linux/rpmsg.h | 24 ++++++++ > > 5 files changed, 183 insertions(+), 24 deletions(-) > >