[20.11,20/20] raw/ioat: clean up use of common test function
diff mbox series

Message ID 20200721095140.719297-21-bruce.richardson@intel.com
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • raw/ioat: enhancements and new hardware support
Related show

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/checkpatch warning coding style issues

Commit Message

Bruce Richardson July 21, 2020, 9:51 a.m. UTC
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 <bruce.richardson@intel.com>
---
 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(-)

Patch
diff mbox series

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);
-}