summaryrefslogtreecommitdiff
path: root/examples/ip_pipeline/cli.c
diff options
context:
space:
mode:
authorJasvinder Singh <jasvinder.singh@intel.com>2018-03-29 19:31:59 +0100
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-04-05 19:00:20 +0200
commite92058d604e6fd8d4fee4a3ad2b2a5a7e79ef258 (patch)
treec954967d6a7c4e8cb00635957be2b86069d499a7 /examples/ip_pipeline/cli.c
parent7e11393e40ef117f3931038c39178fbe369b335e (diff)
downloaddpdk-e92058d604e6fd8d4fee4a3ad2b2a5a7e79ef258.zip
dpdk-e92058d604e6fd8d4fee4a3ad2b2a5a7e79ef258.tar.gz
dpdk-e92058d604e6fd8d4fee4a3ad2b2a5a7e79ef258.tar.xz
examples/ip_pipeline: add meter stats command
Add command to read traffic meter stats. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@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 e62b1ec..ea86f0b 100644
--- a/examples/ip_pipeline/cli.c
+++ b/examples/ip_pipeline/cli.c
@@ -4020,6 +4020,18 @@ cmd_pipeline_table_meter_profile_delete(char **tokens,
}
/**
+ * pipeline <pipeline_name> table <table_id> rule read meter [clear]
+ */
+static void
+cmd_pipeline_table_rule_meter_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
@@ -4348,6 +4360,16 @@ cli_process(char *in, char *out, size_t out_size)
n_tokens, 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], "meter") == 0)) {
+ cmd_pipeline_table_rule_meter_read(tokens, n_tokens,
+ out, out_size);
+ return;
+ }
}
if (strcmp(tokens[0], "thread") == 0) {