Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp742367ybz; Wed, 15 Apr 2020 17:59:34 -0700 (PDT) X-Google-Smtp-Source: APiQypIdH347RZ5V7DzqqimD9N4ep40bHiGktLeMQwS85OyarfTRCcVJ/M/dGvmKuojON5B8NjoT X-Received: by 2002:aa7:cd7b:: with SMTP id ca27mr20961490edb.104.1586998774028; Wed, 15 Apr 2020 17:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586998774; cv=none; d=google.com; s=arc-20160816; b=t9j99kbhHAnp6Qi5bejkp1Ey9CG5XyXl/7m7N1FRw6qJWQx5NsWFpzC6MD6w6sJ+G2 jan07yff3Ii+PygieReUnj6CeOjaCSFzZY7x6cWWHWVoGB7on0JNy7w1pTYw9F6AcSRt V4Y3koIU0O05TkMrAL7ciM9rLds6CAn4q5W7jlHrdIqhGkNUBpdp66B1IOGcGQ99UNRr 8DIyI9KvL2d+Ts1xoBZwdA7kJGjLTzQxnMWflpjL6q3iIj91CyIMlIVY6j6U88S7P9D6 jg5w+hlC4SwTGt9Fqyc8lIJs4c6Vt1rBlLLy8C6hpoOLjfMAwW7II/lFg8xsIYzEj/Im fV1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=D78ezzgr1zyOlgwKH7QLX+Li2SBqz2uUlzuC9KV6jFg=; b=MfAt6Jr4pbg1lkAK7+kvm7rBef72yrTJDyC+ACwbCM8BnqVW1oe550lK64zIZrVvIu Bw6dxBSUlfMyMpD+mBSaUe63nyzhon33KbaNklRstUA+qa1wD9zwR7XC/BcMiRyF/rh6 r5TtQsKJNNrplwkoqHlyJJFTFWxBMFIL9YA9KoczdFt9ycCya6fWbCaDXNfSLSbyEzXt QSSMrjx7Ll5POLfMhs6Fizr/309ofy1uUc60xj56/gSomTEnw4SUgPvnTP6367RxCfQU yZulfSQ6nO65vQ4e/wdN4FRyDbENz3cUv1mj2zCZI7bHUYAJKuzEyUUN6ReRzJ+5mWjP HQIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Ow9I7iEN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp6si12541281ejc.238.2020.04.15.17.59.11; Wed, 15 Apr 2020 17:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Ow9I7iEN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441701AbgDOTOS (ORCPT + 99 others); Wed, 15 Apr 2020 15:14:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1416883AbgDOSzr (ORCPT ); Wed, 15 Apr 2020 14:55:47 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE772C061A0C for ; Wed, 15 Apr 2020 11:55:45 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id j3so4458681ljg.8 for ; Wed, 15 Apr 2020 11:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D78ezzgr1zyOlgwKH7QLX+Li2SBqz2uUlzuC9KV6jFg=; b=Ow9I7iEN9+wJS6FF5B8WBHiyCZox0Z40+SBu0cl9K6E7AztZehjLEUTLvT4cBrYzk2 gzX2BI+vld43OaOpaFYJlg3UzWF/jzyNYMCshoLQ43XncVa6WOFhKDvf+/N1kyPs1ZMA Pliy2KCXpOEgNmv3NVrZbBO0WzqBHWAEnLKXa+CGUxiZT3ecGVJm2dcDiZ/noHGiJnYd HqwI9SiEx5LfvmZDyF/9S+TZETw7hS32v7OcxEfeA+uciipy/kC/oVjVPBT6zw+Z8PpO Iyn5m7ncmw/RE2M+LxaMdTxTsZWohK3yfoRWTin8+HrGrYpNraEDEL4UGU0g5w9mHDTS nkYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D78ezzgr1zyOlgwKH7QLX+Li2SBqz2uUlzuC9KV6jFg=; b=dxdmbIRMV7CXSNkBPKVw6l8OhlsjgpGDzVXCfF24fLjbgm9wpRGT31cqm5kAvnr9Bk uCUh/R+1f7psWvvDgYl0mAUuOEqb6CyAmRHF7bWTQR5V2nncNdryYqbE+t+f5rqyrGsj FkjTR4jH8mjtgFRlk81o4+GYeZeUSo7iQRWP9shis8T3lXqcGKsk/dJ+kCDqL4Mi6cKA xPZI3kp4SRGjpERto5skIFmJIqvmMI96PG/+eZWLnqCGKCwq1/l/nwOpAcCt7OaqhNuy 0CRcA+nxeO5RUvUx5lrbo3P67WitcZL93EFqPn8MgsdqpuO4hR1R0lQbInSB7lXEZa4y RyOA== X-Gm-Message-State: AGi0Puahm+KkwUtsyro+HWmc0JZftd1Xf0N6sQjN2JpTUNYGx7/UpkXY JrvyEzI2Hj+qhFXnDxTgk5Oe8NoF7wPk3tNRyer4Tw== X-Received: by 2002:a2e:3e15:: with SMTP id l21mr4074589lja.251.1586976944036; Wed, 15 Apr 2020 11:55:44 -0700 (PDT) MIME-Version: 1.0 References: <1586916464-27727-1-git-send-email-alan.mikhak@sifive.com> In-Reply-To: From: Alan Mikhak Date: Wed, 15 Apr 2020 11:55:32 -0700 Message-ID: Subject: Re: [PATCH RFC] dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev To: Gustavo Pimentel Cc: "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , "dan.j.williams@intel.com" , "vkoul@kernel.org" , "kishon@ti.com" , "paul.walmsley@sifive.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 11:17 AM Gustavo Pimentel wrote: > > Hi Alan, > > > > I like your approach, it separates the PCIe glue logic from the eDMA > > > itself. > > > I would suggest that pcitest would have multiple options that could be > > > triggered, for instance: > > > 1 - Execute Endpoint DMA (read/write) remotely with Linked List feature > > > (from the Root Complex side) > > > 2 - Execute Endpoint DMA (read/write) remotely without Linked List > > > feature (from the Root Complex side) > > > 3 - Execute Endpoint DMA (read/write) locally with Linked List feature > > > 4 - Execute Endpoint DMA (read/write) locally without Linked List > > > feature > > > > > > > I have all of the above four use cases in mind as well. At the moment, > > only #4 is possible with pcitest. > > > > Use case #3 would need a new command line option for pcitest such as -L > > to let its user specify linked list operationwhen used with dma in > > conjunction with the existing -D option. > > > > Use cases #1 and #2 would need another new command line option such as -R > > to specify remotely initiated dma operation in conjunction with -D option. > > > > New code in pci-epf-test and pci_endpoint_test drivers would be needed > > to support use cases #1, #2, and #3. However, use case #4 should be > > possible without modification to pci-epf-test or pci_endpoint_test as long > > as the dmaengine channels become available on the endpoint side. > > I would suggest something like this: > > -L option, local DMA triggering > -R option, remote DMA triggering > -W option, to select the DMA write channel n => (0 ... 7) to be > used > -R option, to select the DMA read channel n => (0 ... 7) to be > used > -K option, to use or not the linked list feature (K presence enables > the LL use) > -T option, to select which type of DMA transfer to be used => (n = 0 > - scatter-gather mode, 1 - cyclic mode) > -N option, to define the number of cyclic transfers to perform in > total > -C option, to define the size of each chunk to be used > -t