From patchwork Tue Jul 21 09:51:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 74559 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3B8F6A0526; Tue, 21 Jul 2020 11:57:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6138F1C0DB; Tue, 21 Jul 2020 11:56:31 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D15561C0CC for ; Tue, 21 Jul 2020 11:56:28 +0200 (CEST) IronPort-SDR: He7l/yhF76amX28Mu1B47+sTyIHQtlxgTQHVZLa7adxU0w/9e6JnnUdi90n28+FlRnb0Imf+9w +IsXhhiTuLIA== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="138191475" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="138191475" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 02:56:28 -0700 IronPort-SDR: xuH9gWtzOJ0vhiB3STLmCFEBj+pEqjf75J8xYQ83BdgpwDBaTns1T8+bFpLe3rN1P80WC81qAd BW0SYfnB9l6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="488024552" Received: from silpixa00399126.ir.intel.com ([10.237.222.36]) by fmsmga005.fm.intel.com with ESMTP; 21 Jul 2020 02:56:26 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: cheng1.jiang@intel.com, patrick.fu@intel.com, kevin.laatz@intel.com, Bruce Richardson Date: Tue, 21 Jul 2020 10:51:40 +0100 Message-Id: <20200721095140.719297-21-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721095140.719297-1-bruce.richardson@intel.com> References: <20200721095140.719297-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 20.11 20/20] raw/ioat: clean up use of common test function 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" Now that all devices can pass the same set of unit tests, elminate the temporary idxd_rawdev_test function and move the prototype for ioat_rawdev_test to the proper internal header file, to be used by all device instances. Signed-off-by: Bruce Richardson --- drivers/raw/ioat/idxd_pci.c | 2 +- drivers/raw/ioat/idxd_vdev.c | 2 +- drivers/raw/ioat/ioat_private.h | 4 ++-- drivers/raw/ioat/ioat_rawdev.c | 2 -- drivers/raw/ioat/ioat_rawdev_test.c | 7 ------- 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/raw/ioat/idxd_pci.c b/drivers/raw/ioat/idxd_pci.c index a426897b2..d5e87d2e4 100644 --- a/drivers/raw/ioat/idxd_pci.c +++ b/drivers/raw/ioat/idxd_pci.c @@ -102,7 +102,7 @@ idxd_pci_dev_start(struct rte_rawdev *dev) } static const struct rte_rawdev_ops idxd_pci_ops = { - .dev_selftest = idxd_rawdev_test, + .dev_selftest = ioat_rawdev_test, .dump = idxd_dev_dump, .dev_configure = idxd_dev_configure, .dev_start = idxd_pci_dev_start, diff --git a/drivers/raw/ioat/idxd_vdev.c b/drivers/raw/ioat/idxd_vdev.c index aa2693368..7c3c791ce 100644 --- a/drivers/raw/ioat/idxd_vdev.c +++ b/drivers/raw/ioat/idxd_vdev.c @@ -81,7 +81,7 @@ idxd_vdev_start(struct rte_rawdev *dev) } static const struct rte_rawdev_ops idxd_vdev_ops = { - .dev_selftest = idxd_rawdev_test, + .dev_selftest = ioat_rawdev_test, .dump = idxd_dev_dump, .dev_configure = idxd_dev_configure, .dev_start = idxd_vdev_start, diff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h index 46465e675..0c626e6bf 100644 --- a/drivers/raw/ioat/ioat_private.h +++ b/drivers/raw/ioat/ioat_private.h @@ -65,6 +65,8 @@ int ioat_xstats_get_names(const struct rte_rawdev *dev, int ioat_xstats_reset(struct rte_rawdev *dev, const uint32_t *ids, uint32_t nb_ids); +extern int ioat_rawdev_test(uint16_t dev_id); + extern int idxd_rawdev_create(const char *name, struct rte_device *dev, const struct idxd_rawdev *idxd, const struct rte_rawdev_ops *ops); @@ -75,8 +77,6 @@ extern int idxd_dev_configure(const struct rte_rawdev *dev, extern int idxd_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info, size_t info_size); -extern int idxd_rawdev_test(uint16_t dev_id); - extern int idxd_dev_dump(struct rte_rawdev *dev, FILE *f); #endif /* _IOAT_PRIVATE_H_ */ diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c index e3c98a825..1b6a58073 100644 --- a/drivers/raw/ioat/ioat_rawdev.c +++ b/drivers/raw/ioat/ioat_rawdev.c @@ -121,8 +121,6 @@ ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info, return 0; } -extern int ioat_rawdev_test(uint16_t dev_id); - static int ioat_rawdev_create(const char *name, struct rte_pci_device *dev) { diff --git a/drivers/raw/ioat/ioat_rawdev_test.c b/drivers/raw/ioat/ioat_rawdev_test.c index 678d135c4..626299525 100644 --- a/drivers/raw/ioat/ioat_rawdev_test.c +++ b/drivers/raw/ioat/ioat_rawdev_test.c @@ -253,10 +253,3 @@ ioat_rawdev_test(uint16_t dev_id) free(ids); return -1; } - -int -idxd_rawdev_test(uint16_t dev_id) -{ - rte_rawdev_dump(dev_id, stdout); - return ioat_rawdev_test(dev_id); -}