examples/ip_pipeline: add table entry stats command
[dpdk.git] / examples / ip_pipeline / cli.c
index 27388ba..a0fbeae 100644 (file)
@@ -3795,6 +3795,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
  */
@@ -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) {