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 88E3BA04B1; Tue, 25 Aug 2020 17:28:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 63F71B62; Tue, 25 Aug 2020 17:28:22 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 51ECF23D for ; Tue, 25 Aug 2020 17:28:20 +0200 (CEST) IronPort-SDR: R+DDJNzjMTP8lXotX7CUVEt+FO9cRUcHjabdQvbIYGEkhQu4/dgPgFKNb5ozP/+alDeYAPqQNw x2h+/Sp6tasw== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143907166" X-IronPort-AV: E=Sophos;i="5.76,353,1592895600"; d="scan'208";a="143907166" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 08:27:51 -0700 IronPort-SDR: BM4Bo3RsrneCHqRuJjXQczQZePFqzYmJLvdK707RcIi9zJU9+sB3SOkGyT24XPaZXelicxX3ZM Tl0mgS7vtATQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,353,1592895600"; d="scan'208";a="322797001" 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:50 -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-11-bruce.richardson@intel.com> From: "Laatz, Kevin" Message-ID: <12ddacf2-212b-a249-c0f7-1250da8aa0ad@intel.com> Date: Tue, 25 Aug 2020 16:27:49 +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-11-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 10/18] raw/ioat: add datapath data structures for idxd devices 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: > Add in the relevant data structures for the data path for DSA devices. Also > include a device dump function to output the status of each device. > > Signed-off-by: Bruce Richardson > --- > drivers/raw/ioat/idxd_pci.c | 3 +- > drivers/raw/ioat/idxd_vdev.c | 1 + > drivers/raw/ioat/ioat_common.c | 34 +++++++++++ > drivers/raw/ioat/ioat_private.h | 2 + > drivers/raw/ioat/ioat_rawdev_test.c | 3 +- > drivers/raw/ioat/rte_ioat_rawdev_fns.h | 80 ++++++++++++++++++++++++++ > 6 files changed, 121 insertions(+), 2 deletions(-) > > diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c > index 72f4ecebb7..ce238ae04c 100644 > --- a/drivers/raw/ioat/idxd_pci.c > +++ b/drivers/raw/ioat/idxd_pci.c > @@ -52,7 +52,8 @@ idxd_is_wq_enabled(struct idxd_rawdev *idxd) > } > > static const struct rte_rawdev_ops idxd_pci_ops = { > - .dev_selftest = idxd_rawdev_test > + .dev_selftest = idxd_rawdev_test, > + .dump = idxd_dev_dump, > }; > > /* each portal uses 4 x 4k pages */ > diff --git a/drivers/raw/ioat/idxd_vdev.c b/drivers/raw/ioat/idxd_vdev.c > index 93c023a6e8..0f9aa48e84 100644 > --- a/drivers/raw/ioat/idxd_vdev.c > +++ b/drivers/raw/ioat/idxd_vdev.c > @@ -32,6 +32,7 @@ struct idxd_vdev_args { > > static const struct rte_rawdev_ops idxd_vdev_ops = { > .dev_selftest = idxd_rawdev_test, > + .dump = idxd_dev_dump, > }; > > static void * > diff --git a/drivers/raw/ioat/ioat_common.c b/drivers/raw/ioat/ioat_common.c > index 37a14e514d..fb4f7055de 100644 > --- a/drivers/raw/ioat/ioat_common.c > +++ b/drivers/raw/ioat/ioat_common.c > @@ -7,6 +7,36 @@ > > #include "ioat_private.h" > > +int > +idxd_dev_dump(struct rte_rawdev *dev, FILE *f) > +{ > + struct idxd_rawdev *idxd = dev->dev_private; > + struct rte_idxd_rawdev *rte_idxd = &idxd->public; For C++ compatibility, we need to rename "public" since it is a reserved word. This will trigger renaming this wherever it is used in other patches, of course :) Thanks, Kevin