Received: by 10.192.165.156 with SMTP id m28csp911997imm; Wed, 18 Apr 2018 00:05:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ciwipy2HeppfFBzQmeXjxwWEJStKQV4Qs1O+CZQi6badLE0J2+HxaDEblFEaxVNahTibs X-Received: by 10.99.173.7 with SMTP id g7mr808425pgf.170.1524035109746; Wed, 18 Apr 2018 00:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524035109; cv=none; d=google.com; s=arc-20160816; b=uTNCP12+z8MZzU1JHyRIHYHU++6m7+sCJynfc0Rb1gc+/EIQy8xA2G9paQ/jFD/eo0 eZ4qiqu6sVeQ6Qt/cAd0x0zSAhW64yAPSS4krd5gQ9tsztsmpV4kn+UdKAxsp7eu5Wgr zcWhdeE8KKdQ4WI/3gL9aO+Ks683hTWfGcwjrOu2DGDILsHq/xp3xskD03PMYtSk9vTJ pZng5Ww3d0mPAAkoapj+rit01oTHVXBuNp/Wz0y/R2bvN+YCuasF+9S41B5v/jniVk6K /vEJedutt/3fbkc8XnnWOTD3KBKso05w4/gXjuja4ZtY+VmuGR4qdpRKdwLaEIwGeWFt eq0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=SpNjYc1K8MTvsPkN97s9h93JFt1NOVePalbT7adD7Rc=; b=MNd8I9X283IGDOQ3Mfv1IaefSr0hqDWK876x1pMvOD2etwDrpKX/c+WwdXF9izaGnc fRNhqlKxHp3rLHyrCgajSkmv8ENS9yq+dMO1zxDQHM8qf8HeJav+3pbga7vx4+pX53t3 hkOlAXPJPYqnMRzYnSmWB8l3ByCq8g5RmsjaKIQPLfget6sNJNzksUyTMswipqp3Sofq LnwCD5PWAfOEQZdHN3zJdvIOqFvHizLVCvSQuln2sPokDvI5SgnnYw33lT/KICy5jJ4r KnjpBCJqin41Bqdmx+I79kZ7XK6IH5/o9UUd2TrTXzhky3KP20E4arp5wOOMPAloBimn 9Bug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yT6WmuNN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12-v6si710062plk.62.2018.04.18.00.04.56; Wed, 18 Apr 2018 00:05:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yT6WmuNN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752806AbeDRHDy (ORCPT + 99 others); Wed, 18 Apr 2018 03:03:54 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:41339 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752085AbeDRHDw (ORCPT ); Wed, 18 Apr 2018 03:03:52 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3I73K4X026956; Wed, 18 Apr 2018 02:03:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524035000; bh=+fruNVwho3XKMMZPGrOn5mSEoI6fte80hSH8OPLInUU=; h=Subject:From:To:CC:References:Date:In-Reply-To; b=yT6WmuNNUTEzvrDgVWgPB79CN+nz4jwIc7WlTlxsvPDKRq2CDcDQngk4Nu+OkdWFQ C/8pgx/6zaznZlnQmPhDKmcS+ae9Ol/vxp8yMoiiARD9l+5NcjZ/pmQXz71+3G1DRy WAZghHCO1fgBo38yNWtOBar6Vr0za3u7xuhX5YHU= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3I73Kgt009463; Wed, 18 Apr 2018 02:03:20 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 18 Apr 2018 02:03:20 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 18 Apr 2018 02:03:20 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3I73Ijg015761; Wed, 18 Apr 2018 02:03:18 -0500 Subject: Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client From: Peter Ujfalusi To: Vinod Koul CC: Lars-Peter Clausen , Radhey Shyam Pandey , "linux-kernel@vger.kernel.org" , "michal.simek@xilinx.com" , "dmaengine@vger.kernel.org" , "dan.j.williams@intel.com" , Appana Durga Kedareswara Rao , "linux-arm-kernel@lists.infradead.org" References: <1522665546-10035-1-git-send-email-radheys@xilinx.com> <1522665546-10035-3-git-send-email-radheys@xilinx.com> <20180411090854.GY6014@localhost> <7f549d2e-fc96-8c7e-d839-edb86ae088a5@metafoo.de> <4ba085c7-5256-6c8a-5697-c0d5736a6e46@ti.com> <20180417154231.GV6014@localhost> <994c184c-e915-7735-5a8b-81a02c5449b0@ti.com> Message-ID: <43634e42-a3fd-c189-ea2c-0d3b7e62fc46@ti.com> Date: Wed, 18 Apr 2018 10:03:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <994c184c-e915-7735-5a8b-81a02c5449b0@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-18 09:39, Peter Ujfalusi wrote: > > > On 2018-04-17 18:42, Vinod Koul wrote: >> On Tue, Apr 17, 2018 at 04:46:43PM +0300, Peter Ujfalusi wrote: >> >>> @@ -709,6 +709,11 @@ struct dma_filter { >>> * be called after period_len bytes have been transferred. >>> * @device_prep_interleaved_dma: Transfer expression in a generic way. >>> * @device_prep_dma_imm_data: DMA's 8 byte immediate data to the dst address >>> + * @device_attach_metadata: Some DMA engines can send and receive side band >>> + * information, commands or parameters which is not transferred within the >>> + * data stream itself. In such case clients can set the metadata to the >>> + * given descriptor and it is going to be sent to the peripheral, or in >>> + * case of DEV_TO_MEM the provided buffer will receive the metadata. >>> * @device_config: Pushes a new configuration to a channel, return 0 or an error >>> * code >>> * @device_pause: Pauses any transfer happening on a channel. Returns >>> @@ -796,6 +801,9 @@ struct dma_device { >>> struct dma_chan *chan, dma_addr_t dst, u64 data, >>> unsigned long flags); >>> >>> + int (*device_attach_metadata)(struct dma_async_tx_descriptor *desc, >>> + void *data, size_t len); >> >> while i am okay with the concept, I would not want to go again the custom >> pointer route, this is a no-go for me. >> >> Instead lets add the vendor data, define that explicitly. We can use struct, >> tokens or something else to define these. But lets try to stay away from >> opaque objects please :-) > > The DMA does not interpret the metadata, it is information which can be > only understood by the client driver and the remote peripheral. It is > just chunk of data (parameters, timestamps, keys, etc) that needs to > travel along with the payload. > > The content is not relevant for the DMA itself. To add: different peripherals needs to send receive different metadata and even the same peripheral might pass different information based on their operating mode. The size of metadata can be different as well. So it is not really vendor specific metadata, but peripheral, operating mode and other factors affected chunk of data. > > - Péter > > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki > - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki