Thread (157 messages) 157 messages, 5 authors, 2020-10-08

Re: [dpdk-dev] [PATCH v2 10/18] raw/ioat: add datapath data structures for idxd devices

From: Laatz, Kevin <hidden>
Date: 2020-08-25 15:28:23

On 21/08/2020 17:29, Bruce Richardson wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
---
  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


<snip>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help