Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1333453imm; Sun, 2 Sep 2018 19:27:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ6Fjfdgx9bCGbVo0SnzVyzwOat06P2ZcXaDyfAPyyywWUChcSQMwdCRN3QRd0O4G1RIlH4 X-Received: by 2002:a17:902:7086:: with SMTP id z6-v6mr20097652plk.236.1535941625271; Sun, 02 Sep 2018 19:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535941625; cv=none; d=google.com; s=arc-20160816; b=tw06DjRGUERJXFtn7S9uuPP/xNC9w1I0gteYLGbJZ6eKcuPWDOtyMcOgpezk580JAM qK6fQefJ0/w+Pvoi3ebj2VQpqaVCSWkLmHLStkAhl1feP9LSgAiOogSMqtVuSysYQIqU EV+F7qFXOIDwyW3Ky/GmzG0KtHtDDoANnp2qogAAmYvvVmfgZYpSY3l+7W58ppR812hE AFQAXpU+rI7c5fZZxhEUFF2xMJpGUJ8bl6jfawgPaS+xpsunySF3TbH7GdWDJYWtcU+5 8QgBgAiqhxdlYqiA2+hBlhMzBXe85YMeYQOCcwUFVCV1kCsufN8y2iWhg+C9Q21dZnzD fQLQ== 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=eRINQaymomz9vcrz9I2QUGQcMnEX+PR4J0URSxBDkxY=; b=BQz7AowV5GMnajzgeOefBeJk4+N+sg9C7wdlxYyI+4YyN80aONXx9Tz3Lzvm9PyHew 956f+zlo477cLCFuoj6VVp3mcnIA3xJT/4gTgxketHAY03pLxMln3FszxYnNLMvfIAgr /wyNBTTmwheCqlhMopkX37LaFnRX4gI4Lmhrm4oL9TY5cRBVVsRCsCAhcmUMAu9TrZcc Slf9PEUKcnHqBkj5agr41BmgsZvQ2aaUpK0E+7JzbVB5hs4sT+4rDm34NvmVmGQXuyPB s+g1vjBDt682au4VetLKyGtFvCe1Xfgk70oDaWdskZ8T20WXp8mfqHW/pdwWwPpa5Dlj ytvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=qGbdrW2b; 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 x32-v6si16426619pld.356.2018.09.02.19.26.50; Sun, 02 Sep 2018 19:27:05 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=qGbdrW2b; 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 S1727455AbeICGnY (ORCPT + 99 others); Mon, 3 Sep 2018 02:43:24 -0400 Received: from merlin.infradead.org ([205.233.59.134]:33118 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725949AbeICGnY (ORCPT ); Mon, 3 Sep 2018 02:43:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eRINQaymomz9vcrz9I2QUGQcMnEX+PR4J0URSxBDkxY=; b=qGbdrW2bw21GNsPJRPDXS8P3sN HNEzKxSB5nzizR8ghHXwCcz7MVYqDUVAZJB86IyugGpwbMan7tPndCV16RFx3LjRgoqdhUNzwUxoa Y3YFOhzTCnbVJcYEm9cUgcHpQyTSzzsoGBm0YICouGd0TVTgJF+Fz8E7+elKYqzddbFpntvfhAJmY KgaHAnzifwDMpwAe7+STC2SvfIERnbgSYLNqG9X5j6lNy1GrxkebV2UzwfoiXJb+X/7H/SyD4YQ/p UfIjkZ0vFo8EfGDOBEIETkLv72LPPbXQcUSgjoo6TGa4RNGgR93351hN78sxk9+29l6t5z4A7yULm 5NDNOYyA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fweYG-0005SR-7B; Mon, 03 Sep 2018 02:25:16 +0000 Subject: Re: [PATCH 7/7] vfio/sdmdev: add user sample To: Kenneth Lee , Jonathan Corbet , Herbert Xu , "David S . Miller" , Joerg Roedel , Alex Williamson , Kenneth Lee , Hao Fang , Zhou Wang , Zaibo Xu , Philippe Ombredanne , Greg Kroah-Hartman , Thomas Gleixner , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-accelerators@lists.ozlabs.org, Lu Baolu , Sanjay Kumar Cc: linuxarm@huawei.com References: <20180903005204.26041-1-nek.in.cn@gmail.com> <20180903005204.26041-8-nek.in.cn@gmail.com> From: Randy Dunlap Message-ID: Date: Sun, 2 Sep 2018 19:25:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180903005204.26041-8-nek.in.cn@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/2018 05:52 PM, Kenneth Lee wrote: > From: Kenneth Lee > > This is the sample code to demostrate how WrapDrive user application > should be. > > It contains: > > 1. wd.[ch], the common library to provide WrapDrive interface. WarpDrive > 2. drv/*, the user driver to access the hardware upon spimdev > 3. test/*, the test application to use WrapDrive interface to access the WarpDrive > hardware queue(s) of the accelerator. > > The Hisilicon HIP08 ZIP accelerator is used in this sample. > > Signed-off-by: Zaibo Xu > Signed-off-by: Kenneth Lee > Signed-off-by: Hao Fang > Signed-off-by: Zhou Wang > --- > samples/warpdrive/AUTHORS | 2 + > samples/warpdrive/ChangeLog | 1 + > samples/warpdrive/Makefile.am | 9 + > samples/warpdrive/NEWS | 1 + > samples/warpdrive/README | 32 +++ > samples/warpdrive/autogen.sh | 3 + > samples/warpdrive/cleanup.sh | 13 ++ > samples/warpdrive/configure.ac | 52 +++++ > samples/warpdrive/drv/hisi_qm_udrv.c | 223 ++++++++++++++++++ > samples/warpdrive/drv/hisi_qm_udrv.h | 53 +++++ > samples/warpdrive/test/Makefile.am | 7 + > samples/warpdrive/test/comp_hw.h | 23 ++ > samples/warpdrive/test/test_hisi_zip.c | 206 +++++++++++++++++ > samples/warpdrive/wd.c | 309 +++++++++++++++++++++++++ > samples/warpdrive/wd.h | 154 ++++++++++++ > samples/warpdrive/wd_adapter.c | 74 ++++++ > samples/warpdrive/wd_adapter.h | 43 ++++ > 17 files changed, 1205 insertions(+) > create mode 100644 samples/warpdrive/AUTHORS > create mode 100644 samples/warpdrive/ChangeLog > create mode 100644 samples/warpdrive/Makefile.am > create mode 100644 samples/warpdrive/NEWS > create mode 100644 samples/warpdrive/README > create mode 100755 samples/warpdrive/autogen.sh > create mode 100755 samples/warpdrive/cleanup.sh > create mode 100644 samples/warpdrive/configure.ac > create mode 100644 samples/warpdrive/drv/hisi_qm_udrv.c > create mode 100644 samples/warpdrive/drv/hisi_qm_udrv.h > create mode 100644 samples/warpdrive/test/Makefile.am > create mode 100644 samples/warpdrive/test/comp_hw.h > create mode 100644 samples/warpdrive/test/test_hisi_zip.c > create mode 100644 samples/warpdrive/wd.c > create mode 100644 samples/warpdrive/wd.h > create mode 100644 samples/warpdrive/wd_adapter.c > create mode 100644 samples/warpdrive/wd_adapter.h > diff --git a/samples/warpdrive/README b/samples/warpdrive/README > new file mode 100644 > index 000000000000..3adf66b112fc > --- /dev/null > +++ b/samples/warpdrive/README > @@ -0,0 +1,32 @@ > +WD User Land Demonstration > +========================== > + > +This directory contains some applications and libraries to demonstrate how a > + > +WrapDrive application can be constructed. WarpDrive > + > + > +As a demo, we try to make it simple and clear for understanding. It is not > + > +supposed to be used in business scenario. > + > + > +The directory contains the following elements: > + > +wd.[ch] > + A demonstration WrapDrive fundamental library which wraps the basic WarpDrive > + operations to the WrapDrive-ed device. WarpDrive > + > +wd_adapter.[ch] > + User driver adaptor for wd.[ch] > + > +wd_utils.[ch] > + Some utitlities function used by WD and its drivers > + > +drv/* > + User drivers. It helps to fulfill the semantic of wd.[ch] for > + particular hardware > + > +test/* > + Test applications to use the wrapdrive library warpdrive -- ~Randy