diff mbox series

[v2,31/41] net/mlx5: add stub to read hw counters

Message ID 20211007184350.73858-32-srikanth.k@oneconvergence.com (mailing list archive)
State New
Delegated to: Raslan Darawsheh
Headers show
Series add MLX5 FreeBSD support | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Srikanth Kaka Oct. 7, 2021, 6:43 p.m. UTC
retrieving hw counter stats is not supported at the moment.

Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.com>
Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
Signed-off-by: Anand Thulasiram <avelu@juniper.net>
---
 drivers/net/mlx5/freebsd/mlx5_os.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/mlx5/freebsd/mlx5_os.c b/drivers/net/mlx5/freebsd/mlx5_os.c
index 0c7e43646e..9a7c7e4b95 100644
--- a/drivers/net/mlx5/freebsd/mlx5_os.c
+++ b/drivers/net/mlx5/freebsd/mlx5_os.c
@@ -327,6 +327,30 @@  mlx5_os_dev_shared_handler_uninstall(struct mlx5_dev_ctx_shared *sh)
 #endif
 }
 
+/**
+ * Read statistics by a named counter.
+ *
+ * @param[in] priv
+ *   Pointer to the private device data structure.
+ * @param[in] ctr_name
+ *   Pointer to the name of the statistic counter to read
+ * @param[out] stat
+ *   Pointer to read statistic value.
+ * @return
+ *   0 on success and stat is valud, 1 if failed to read the value
+ *   rte_errno is set.
+ *
+ */
+int
+mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
+		      uint64_t *stat)
+{
+	RTE_SET_USED(priv);
+	RTE_SET_USED(ctr_name);
+	RTE_SET_USED(stat);
+	return -ENOTSUP;
+}
+
 /**
  * Set the reg_mr and dereg_mr call backs
  *