Received: by 10.192.165.156 with SMTP id m28csp203826imm; Tue, 17 Apr 2018 08:47:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx49JZqa5zK83zrl2C3Y4LPh3/lRIe1ULYb6aHMiQN0rYj1yWes40qERSwepXzIXQ95pbgp9I X-Received: by 2002:a17:902:d20a:: with SMTP id t10-v6mr2517847ply.151.1523980036535; Tue, 17 Apr 2018 08:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523980036; cv=none; d=google.com; s=arc-20160816; b=JaMSWd4QWCXEqE3adUPRNSESzEd3XAi10NmJ1TrdW8UeBHwWG6j1hMU0pIGy3Ha9Ir 1GayUcGB9zGTbyV6rLEdBQVfREs8aBthZ+4ai+mv3V7a3RtVWDfbSGTXtVkm8PDR+JM1 fJoFB3NQqbhf0CuJ1aDhfLGQ6KN/9qNOPxgQaEb+kHUWGKAT5WGvavUBqgi+clDkVVbj +1EmS3crIIKkE3rDrAv7cV+0iZvK9tvB/tpIwzDPDu9XAjLayNNw0rLt+FuucI4HcM1y mxXNwGyAsCG5HWowS21XVGKsif28YNWvjOGBx6zlzjl44wUx+6bfwtLhlfyN64fOXsbz V/SA== 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:from:references:cc:to:subject:arc-authentication-results; bh=87VRi+9XrCcgwCsWMigPuuxZHxD4aASMOn0ZBkMssOs=; b=QC5Q91tUJjlV4DwjUwLGHLUmbvUgTDD/EoQgYgoGsqWYYq5hSaMtSpzqJ/hR0PrPMo OaM5dnZNqtay4dC3GHl0U6OoSXLnYen9t1hPQejBX2Mrvw9hg6SceClz/IJFnmd8Pw6S zm4Mgxlx9OaeTe74FvC0fJgzEp54gkFxwEHYOidpfIXxuLJUZq0dAHvGJyD+APeiOwMQ 3W0wltwu3BuF1NsEtFT/ZgNnzVBiCMvLidbVHuiyyT/A9J4/DiOhN437XY+2/+k8V79h EBSLl2ZqbUastg7Pux8FwyPnxkAqLOiaSh8WYsmv8MUl7xkWDyamp2Xvj5XBFLWRtpuC mnOQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si3586218pgc.425.2018.04.17.08.47.02; Tue, 17 Apr 2018 08:47:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753051AbeDQPpO (ORCPT + 99 others); Tue, 17 Apr 2018 11:45:14 -0400 Received: from www381.your-server.de ([78.46.137.84]:59351 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580AbeDQPpM (ORCPT ); Tue, 17 Apr 2018 11:45:12 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1f8Sn5-000215-9m; Tue, 17 Apr 2018 17:45:07 +0200 Received: from [2003:86:2c44:e800:8200:bff:fe9b:6612] by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1f8SmQ-000EHa-1l; Tue, 17 Apr 2018 17:44:26 +0200 Subject: Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client To: Vinod Koul , Peter Ujfalusi Cc: Radhey Shyam Pandey , "michal.simek@xilinx.com" , "linux-kernel@vger.kernel.org" , "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> From: Lars-Peter Clausen Message-ID: <9458b509-f3bd-2aae-58f6-24bc83629cb3@metafoo.de> Date: Tue, 17 Apr 2018 17:44:00 +0200 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: <20180417154231.GV6014@localhost> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.99.3/24488/Tue Apr 17 14:24:28 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/17/2018 05:42 PM, 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 :-) Well, for all the DMA core cares about the meta-data stream would be as opaque as the data stream itself. The data is in the end client specific. It is data that sits somewhere in memory that should be send along with the actual data to the client.