Received: by 10.192.165.156 with SMTP id m28csp147472imm; Tue, 17 Apr 2018 07:55:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+0vKSRRo9tRaVD9kR8jM0GZrRfrMho4OdCtT5MPpla80Hi5eMmnQ6fMU3GldqhSO2nbLhD X-Received: by 10.98.86.16 with SMTP id k16mr2262629pfb.149.1523976938171; Tue, 17 Apr 2018 07:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523976938; cv=none; d=google.com; s=arc-20160816; b=y3IXwz0Rwtip/JpDNZlvkTZgDAKzEvqUuNETrreNIgqyKRP9sQuf9hlFbKfjuQ5FAi ne+KK8exwPKLpEpbEmGjrMFyUOsfdGaKFEHQWCcD3+n9oqQn2n9bPKqmGz9ls891Zhgm 5vwKMBRoUnm9NRrdpyOzlAr1qtXfWQ6HbZ5eanfLjg/O9hklcIy2YnROyGq/spchrJkL z66sKBVQ/dVkhDuSMs3TfP++Qr0a8iHVuaw/glu72RrJg3h/p7IAF6ySX/D0dCOsjasx igAHcHzKPhP0IytvoJhvoSMKgavUvn278JCH2b+lBcNS/7pYJpAUSx8GACH4Ox8yRmje mOfw== 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:dkim-signature :arc-authentication-results; bh=Pw4xleLUC737UsTB8ZwpMqTQuKMC/5+h+fQz/dOr2jY=; b=0s6Sb9mBm4V78i5Cv+3L8va8dU8Xjopid9E01HWRBezn1WJo3wBXeKBGJfOoZaAfo/ Xb03Mi2qX75w+egCZO2aIUaSps6u1APDucmnq5Tr9Oetc+Ng7Bx2NzfBWcJXR9vVAtpy SGZCuB4szbk/a0rjDw4lF0zzpMSFCQQeUX/r722HHIZPLDbfSz0Y2ziq3PQ9vqJ2iptw nrTro4sRw8dGXth7jFE50Q4zUarCO3Cu7uPylJjuWzBVkNtybGzkLvulRMsrtb0UZQZe Kbo2OWlPZrL6EBZdlUsqt1W9lyn7MVcWKeorWhcFdYLNkPmfpwim7BguAf/kHDEEqvAt ntbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=nTFYYjoV; 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 g186si7374445pfb.76.2018.04.17.07.55.23; Tue, 17 Apr 2018 07:55:38 -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=nTFYYjoV; 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 S1752417AbeDQOyE (ORCPT + 99 others); Tue, 17 Apr 2018 10:54:04 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:13022 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbeDQOyC (ORCPT ); Tue, 17 Apr 2018 10:54:02 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3HErSGd014727; Tue, 17 Apr 2018 09:53:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1523976808; bh=zuhADztu+36pVxrHWkxYF4DMltfCac/7eAGocp9iw3c=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=nTFYYjoV7XxiZ2PvfiuvMJyqnwVRmjXZR2ikXJYocdSly+aJJ3Q811FZrFLStQ4jb s1sM6pDXdiPgQYCOR+jALbTEUqp5tc2BjmBCSp3bVt2Z0TecLcCyCqa1BKFpWQ/Weh LukLvOcPHav8RefAsvkOGobi1vADBPp7WROUkFmI= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3HErS03031430; Tue, 17 Apr 2018 09:53:28 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Tue, 17 Apr 2018 09:53:28 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Tue, 17 Apr 2018 09:53:28 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3HErPDB027728; Tue, 17 Apr 2018 09:53:26 -0500 Subject: Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client To: Lars-Peter Clausen , Radhey Shyam Pandey , Vinod Koul CC: "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> <1fc10bec-5c2c-98f1-1d5b-b768dea844ed@metafoo.de> From: Peter Ujfalusi Message-ID: <78828d31-e4cd-5211-f1b6-8918ac38f599@ti.com> Date: Tue, 17 Apr 2018 17:53:51 +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: <1fc10bec-5c2c-98f1-1d5b-b768dea844ed@metafoo.de> 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-17 16:58, Lars-Peter Clausen wrote: >>> There are two options. >>> >>> Either you extend the generic interfaces so it can cover your usecase in a >>> generic way. E.g. the ability to attach meta data to transfer. >> >> Fwiw I have this patch as part of a bigger work to achieve similar results: > > That's good stuff. Is this in a public tree somewhere? Not atm. I can not send the user of the new API and I did not wanted to send something like this out of the blue w/o context. But as it is a generic patch, I can send it as well. The only thing is that the need for the memcpy, so I might end up with ptr = get_metadata_ptr(desc, &size); /* size: in RX the valid size */ and set_metadata_size(); /* in TX to tell how the client placed */ Or something like that, the attach_metadata() as it is works just fine, but high throughput might not like the memcpy. >>> Or you can implement a interface that is specific to your DMA controller and >>> any client using this interface knows it is talking to your DMA controller. >> >> Hrm, so we can have DMA driver specific calls? The reason why TI's keystone 2 >> navigator DMA support was rejected that it was introducing NAV specific calls >> for clients to configure features not yet supported by the framework. > > In my opinion it is OK, somebody else might have different ideas. I mean it > is not nice, but it is better than the alternative of overloading the > generic API with driver specific semantics or introducing some kind of IOCTL > catch all callback. True, but the generic API can be extended as well to cover new grounds, features. Like this metadata thing. > If there is tight coupling between the DMA core and client and there is no > intention of using a generic client the best solution might even be to no > use DMAengine at all. This is how the knav stuff ended up. Well it is only used by networking atm, so it is 'fine' to have custom API, but it is not portable. > - Péter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki