summaryrefslogtreecommitdiff
path: root/examples/ip_pipeline/cli.c
diff options
context:
space:
mode:
authorJasvinder Singh <jasvinder.singh@intel.com>2018-03-29 19:31:57 +0100
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-04-05 19:00:19 +0200
commitc64b9121a9637e02e62b791c88d556cee1c269a1 (patch)
tree46e07a51ac45a70a44197893782f1ee254cbe219 /examples/ip_pipeline/cli.c
parent3186282f8e12dad3e1b1b8b287a9d62d31886c01 (diff)
downloaddpdk-c64b9121a9637e02e62b791c88d556cee1c269a1.zip
dpdk-c64b9121a9637e02e62b791c88d556cee1c269a1.tar.gz
dpdk-c64b9121a9637e02e62b791c88d556cee1c269a1.tar.xz
examples/ip_pipeline: add table entry stats command
Add command to read the pipeline table entry stats. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Diffstat (limited to 'examples/ip_pipeline/cli.c')
-rw-r--r--examples/ip_pipeline/cli.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c
index 27388ba..a0fbeae 100644
--- a/examples/ip_pipeline/cli.c
+++ b/examples/ip_pipeline/cli.c
@@ -3796,6 +3796,18 @@ cmd_pipeline_table_rule_delete_default(char **tokens,
}
/**
+ * pipeline <pipeline_name> table <table_id> rule read stats [clear]
+ */
+static void
+cmd_pipeline_table_rule_stats_read(char **tokens,
+ uint32_t n_tokens __rte_unused,
+ char *out,
+ size_t out_size)
+{
+ snprintf(out, out_size, MSG_CMD_UNIMPLEM, tokens[0]);
+}
+
+/**
* thread <thread_id> pipeline <pipeline_name> enable
*/
static void
@@ -4094,6 +4106,16 @@ cli_process(char *in, char *out, size_t out_size)
out, out_size);
return;
}
+
+ if ((n_tokens >= 7) &&
+ (strcmp(tokens[2], "table") == 0) &&
+ (strcmp(tokens[4], "rule") == 0) &&
+ (strcmp(tokens[5], "read") == 0) &&
+ (strcmp(tokens[6], "stats") == 0)) {
+ cmd_pipeline_table_rule_stats_read(tokens, n_tokens,
+ out, out_size);
+ return;
+ }
}
if (strcmp(tokens[0], "thread") == 0) {