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 03D7BA04B1; Wed, 26 Aug 2020 17:45:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 710C51BFE3; Wed, 26 Aug 2020 17:45:57 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 8CF571BECF for ; Wed, 26 Aug 2020 17:45:55 +0200 (CEST) IronPort-SDR: XTah8ME8LNzIpL31J0HIvIFJFyn7Ei6w/DbhJpEYUgpHL4Jjzl7xl8g89xP6REkwc3008Lafb/ oxDG5Xv3QiHA== X-IronPort-AV: E=McAfee;i="6000,8403,9725"; a="217864972" X-IronPort-AV: E=Sophos;i="5.76,356,1592895600"; d="scan'208";a="217864972" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2020 08:45:54 -0700 IronPort-SDR: Mg62sBi5JjDghIsgonuIVICRc3YxxR3hVuXYqz0ECMyzLHjeAR6154EM2XKonldgUXbZ4DAgKw FB9Jb3QW9aqg== X-IronPort-AV: E=Sophos;i="5.76,356,1592895600"; d="scan'208";a="474819742" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.1.248]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 26 Aug 2020 08:45:53 -0700 Date: Wed, 26 Aug 2020 16:45:49 +0100 From: Bruce Richardson To: "Laatz, Kevin" Cc: dev@dpdk.org, cheng1.jiang@intel.com, patrick.fu@intel.com, ping.yu@intel.com Message-ID: <20200826154549.GB564@bricha3-MOBL.ger.corp.intel.com> References: <20200721095140.719297-1-bruce.richardson@intel.com> <20200821162944.29840-1-bruce.richardson@intel.com> <20200821162944.29840-9-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Aug 25, 2020 at 04:27:43PM +0100, Laatz, Kevin wrote: > 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". Actually, this should be fine, since the word public only occurs in the private header file and is not exposed to external apps. /Bruce