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 D4C8FA04BC; Thu, 8 Oct 2020 11:59:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CEDC1C002; Thu, 8 Oct 2020 11:52:29 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6D3591BFFA for ; Thu, 8 Oct 2020 11:52:26 +0200 (CEST) IronPort-SDR: RSszgmNmWpYyia8fqnu8bNjqjjK+21P26CcNq+XEkBURqbkohH/sESYAnlq0Uy5HmrToT2vEGJ sNnBmWTSoEuQ== X-IronPort-AV: E=McAfee;i="6000,8403,9767"; a="152226417" X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="152226417" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 02:52:26 -0700 IronPort-SDR: 08Q1Ow7ax5osbNenxbQ0U+/rmCQ7DJ7pHgE0VDdX7XlwK8feR7ryZqKc436XlJc+KP97j9vS4Q E3oWSz649g0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="344686780" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga008.jf.intel.com with ESMTP; 08 Oct 2020 02:52:24 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: patrick.fu@intel.com, thomas@monjalon.net, Bruce Richardson , Kevin Laatz , Radu Nicolau Date: Thu, 8 Oct 2020 10:51:32 +0100 Message-Id: <20201008095133.123014-25-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201008095133.123014-1-bruce.richardson@intel.com> References: <20200721095140.719297-1-bruce.richardson@intel.com> <20201008095133.123014-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 24/25] 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, eliminate 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 Reviewed-by: Kevin Laatz Acked-by: Radu Nicolau --- 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 9113f8c8e..165a9ea7f 100644 --- a/drivers/raw/ioat/idxd_pci.c +++ b/drivers/raw/ioat/idxd_pci.c @@ -101,7 +101,7 @@ idxd_pci_dev_start(struct rte_rawdev *dev) static const struct rte_rawdev_ops idxd_pci_ops = { .dev_close = idxd_rawdev_close, - .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 38218cc1e..50d47d05c 100644 --- a/drivers/raw/ioat/idxd_vdev.c +++ b/drivers/raw/ioat/idxd_vdev.c @@ -32,7 +32,7 @@ struct idxd_vdev_args { static const struct rte_rawdev_ops idxd_vdev_ops = { .dev_close = idxd_rawdev_close, - .dev_selftest = idxd_rawdev_test, + .dev_selftest = ioat_rawdev_test, .dump = idxd_dev_dump, .dev_configure = idxd_dev_configure, .dev_info_get = idxd_dev_info_get, diff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h index ab9a3e6cc..a74bc0422 100644 --- a/drivers/raw/ioat/ioat_private.h +++ b/drivers/raw/ioat/ioat_private.h @@ -63,6 +63,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 dd2543c80..2c88b4369 100644 --- a/drivers/raw/ioat/ioat_rawdev.c +++ b/drivers/raw/ioat/ioat_rawdev.c @@ -128,8 +128,6 @@ ioat_dev_close(struct rte_rawdev *dev __rte_unused) 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 a84be56c4..60d189b62 100644 --- a/drivers/raw/ioat/ioat_rawdev_test.c +++ b/drivers/raw/ioat/ioat_rawdev_test.c @@ -268,10 +268,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); -} -- 2.25.1