From: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 01/10] table: added structure for storing table stats
Date: Mon, 30 Mar 2015 13:42:08 +0200 [thread overview]
Message-ID: <1427715737-29252-2-git-send-email-maciejx.t.gajdzica@intel.com> (raw)
In-Reply-To: <1427715737-29252-1-git-send-email-maciejx.t.gajdzica@intel.com>
---
lib/librte_table/rte_table.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/lib/librte_table/rte_table.h b/lib/librte_table/rte_table.h
index d57bc33..9860b7b 100644
--- a/lib/librte_table/rte_table.h
+++ b/lib/librte_table/rte_table.h
@@ -58,6 +58,12 @@ extern "C" {
#include <rte_mbuf.h>
#include <rte_port.h>
+/** Lookup table statistics */
+struct rte_table_stats {
+ uint64_t n_pkts_in;
+ uint64_t n_pkts_lookup_miss;
+};
+
/**
* Lookup table create
*
@@ -186,6 +192,24 @@ typedef int (*rte_table_op_lookup)(
uint64_t *lookup_hit_mask,
void **entries);
+/**
+ * Lookup table stats read
+ *
+ * @param port
+ * Handle to lookup table instance
+ * @param stats
+ * Handle to table stats struct to copy data
+ * @param clear
+ * Flag indicating that stats should be cleared after read
+ *
+ * @return
+ * Error code or 0 on success.
+ */
+typedef int (*rte_table_op_stats_read)(
+ void *table,
+ struct rte_table_stats *stats,
+ int clear);
+
/** Lookup table interface defining the lookup table operation */
struct rte_table_ops {
rte_table_op_create f_create; /**< Create */
@@ -193,6 +217,7 @@ struct rte_table_ops {
rte_table_op_entry_add f_add; /**< Entry add */
rte_table_op_entry_delete f_delete; /**< Entry delete */
rte_table_op_lookup f_lookup; /**< Lookup */
+ rte_table_op_stats_read f_stats; /**< Stats */
};
#ifdef __cplusplus
--
1.7.9.5
next prev parent reply other threads:[~2015-03-30 11:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 11:42 [dpdk-dev] [PATCH 00/10] table: added table statistics Maciej Gajdzica
2015-03-30 11:42 ` Maciej Gajdzica [this message]
2015-03-30 11:42 ` [dpdk-dev] [PATCH 02/10] table: added acl table stats Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 03/10] table: added array " Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 04/10] table: added hash_ext " Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 05/10] table: added hash_key16 " Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 06/10] table: added hash_key32 " Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 07/10] table: added hash_key8 " Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 08/10] table: added hash_lru " Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 09/10] table: added lpm_ipv6 " Maciej Gajdzica
2015-03-30 11:42 ` [dpdk-dev] [PATCH 10/10] table: added lpm " Maciej Gajdzica
2015-03-30 11:59 ` [dpdk-dev] [PATCH 00/10] table: added table statistics Dumitrescu, Cristian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427715737-29252-2-git-send-email-maciejx.t.gajdzica@intel.com \
--to=maciejx.t.gajdzica@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).