From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76777A04B1; Tue, 25 Aug 2020 17:27:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1DD52B94; Tue, 25 Aug 2020 17:27:47 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 499A3FEB for ; Tue, 25 Aug 2020 17:27:46 +0200 (CEST) IronPort-SDR: iDOKTJX77WWigEp/U7G4NZ2cdsim/G8kwalvBhpnsnXh5VGijUCryenevvWTe1MuYfhhZK7aaH g//yaqR+BY7A== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143794493" X-IronPort-AV: E=Sophos;i="5.76,353,1592895600"; d="scan'208";a="143794493" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 08:27:45 -0700 IronPort-SDR: Ru2auxr+cP5VIuSi9MkPKYQWOEoXvkNNlMA78Na3c4k1R5hQ6juQvCrs0NCBFAKVyzAocXJqNJ pCfpagu6WesQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,353,1592895600"; d="scan'208";a="322796983" Received: from klaatz-mobl1.ger.corp.intel.com (HELO [10.213.235.49]) ([10.213.235.49]) by fmsmga004.fm.intel.com with ESMTP; 25 Aug 2020 08:27:43 -0700 To: Bruce Richardson , dev@dpdk.org Cc: cheng1.jiang@intel.com, patrick.fu@intel.com, ping.yu@intel.com References: <20200721095140.719297-1-bruce.richardson@intel.com> <20200821162944.29840-1-bruce.richardson@intel.com> <20200821162944.29840-9-bruce.richardson@intel.com> From: "Laatz, Kevin" Message-ID: Date: Tue, 25 Aug 2020 16:27:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200821162944.29840-9-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2 08/18] raw/ioat: create rawdev instances on idxd PCI probe X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 21/08/2020 17:29, Bruce Richardson wrote: > When a matching device is found via PCI probe create a rawdev instance for > each queue on the hardware. Use empty self-test function for these devices > so that the overall rawdev_autotest does not report failures. > > Signed-off-by: Bruce Richardson > --- > drivers/raw/ioat/idxd_pci.c | 236 ++++++++++++++++++++++++- > drivers/raw/ioat/ioat_common.c | 61 +++++++ > drivers/raw/ioat/ioat_private.h | 31 ++++ > drivers/raw/ioat/ioat_rawdev_test.c | 7 + > drivers/raw/ioat/ioat_spec.h | 64 +++++++ > drivers/raw/ioat/meson.build | 1 + > drivers/raw/ioat/rte_ioat_rawdev_fns.h | 35 +++- > 7 files changed, 432 insertions(+), 3 deletions(-) > create mode 100644 drivers/raw/ioat/ioat_common.c > > diff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h > index d87d4d055e..32c824536d 100644 > --- a/drivers/raw/ioat/ioat_private.h > +++ b/drivers/raw/ioat/ioat_private.h > @@ -14,6 +14,10 @@ > * @b EXPERIMENTAL: these structures and APIs may change without prior notice > */ > > +#include > +#include > +#include "rte_ioat_rawdev.h" > + > extern int ioat_pmd_logtype; > > #define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \ > @@ -24,4 +28,31 @@ extern int ioat_pmd_logtype; > #define IOAT_PMD_ERR(fmt, args...) IOAT_PMD_LOG(ERR, fmt, ## args) > #define IOAT_PMD_WARN(fmt, args...) IOAT_PMD_LOG(WARNING, fmt, ## args) > > +struct idxd_pci_common { > + rte_spinlock_t lk; > + volatile struct rte_idxd_bar0 *regs; > + volatile struct rte_idxd_wqcfg *wq_regs; > + volatile struct rte_idxd_grpcfg *grp_regs; > + volatile void *portals; > +}; > + > +struct idxd_rawdev { > + struct rte_idxd_rawdev public; /* the public members, must be first */ For C++ compatibility, we cannot use "public" since it is a reserved word in C++. Suggest renaming to "pub". Thanks, Kevin