raw/ioat: clean up use of common test function
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 8 Oct 2020 09:51:32 +0000 (10:51 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 8 Oct 2020 12:33:20 +0000 (14:33 +0200)
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 <bruce.richardson@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
drivers/raw/ioat/idxd_pci.c
drivers/raw/ioat/idxd_vdev.c
drivers/raw/ioat/ioat_private.h
drivers/raw/ioat/ioat_rawdev.c
drivers/raw/ioat/ioat_rawdev_test.c

index 9113f8c..165a9ea 100644 (file)
@@ -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,
index 38218cc..50d47d0 100644 (file)
@@ -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,
index ab9a3e6..a74bc04 100644 (file)
@@ -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_ */
index dd2543c..2c88b43 100644 (file)
@@ -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)
 {
index a84be56..60d189b 100644 (file)
@@ -268,10 +268,3 @@ err:
        free(ids);
        return -1;
 }
-
-int
-idxd_rawdev_test(uint16_t dev_id)
-{
-       rte_rawdev_dump(dev_id, stdout);
-       return ioat_rawdev_test(dev_id);
-}