X-Git-Url: https://gerrit.fd.io/r/gitweb?p=deb_dpdk.git;a=blobdiff_plain;f=examples%2Fip_pipeline%2Fpipeline.h;h=278775c2d0fcff0b735cba9525d75562753fd92f;hp=e5b1d5d08f126f752d70ad0ba657d7d176052ad7;hb=refs%2Ftags%2Fupstream%2F18.11-rc2;hpb=8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82 diff --git a/examples/ip_pipeline/pipeline.h b/examples/ip_pipeline/pipeline.h index e5b1d5d0..278775c2 100644 --- a/examples/ip_pipeline/pipeline.h +++ b/examples/ip_pipeline/pipeline.h @@ -143,6 +143,10 @@ struct table_params { const char *action_profile_name; }; +struct table_rule; + +TAILQ_HEAD(table_rule_list, table_rule); + struct port_in { struct port_in_params params; struct port_in_action_profile *ap; @@ -153,6 +157,8 @@ struct table { struct table_params params; struct table_action_profile *ap; struct rte_table_action *a; + struct table_rule_list rules; + struct table_rule *rule_default; }; struct pipeline { @@ -286,6 +292,13 @@ struct table_rule_action { struct rte_table_action_decap_params decap; }; +struct table_rule { + TAILQ_ENTRY(table_rule) node; + struct table_rule_match match; + struct table_rule_action action; + void *data; +}; + int pipeline_port_in_stats_read(const char *pipeline_name, uint32_t port_id, @@ -316,22 +329,19 @@ int pipeline_table_rule_add(const char *pipeline_name, uint32_t table_id, struct table_rule_match *match, - struct table_rule_action *action, - void **data); + struct table_rule_action *action); int pipeline_table_rule_add_bulk(const char *pipeline_name, uint32_t table_id, - struct table_rule_match *match, - struct table_rule_action *action, - void **data, - uint32_t *n_rules); + struct table_rule_list *list, + uint32_t *n_rules_added, + uint32_t *n_rules_not_added); int pipeline_table_rule_add_default(const char *pipeline_name, uint32_t table_id, - struct table_rule_action *action, - void **data); + struct table_rule_action *action); int pipeline_table_rule_delete(const char *pipeline_name, @@ -345,7 +355,7 @@ pipeline_table_rule_delete_default(const char *pipeline_name, int pipeline_table_rule_stats_read(const char *pipeline_name, uint32_t table_id, - void *data, + struct table_rule_match *match, struct rte_table_action_stats_counters *stats, int clear); @@ -363,8 +373,7 @@ pipeline_table_mtr_profile_delete(const char *pipeline_name, int pipeline_table_rule_mtr_read(const char *pipeline_name, uint32_t table_id, - void *data, - uint32_t tc_mask, + struct table_rule_match *match, struct rte_table_action_mtr_counters *stats, int clear); @@ -377,8 +386,38 @@ pipeline_table_dscp_table_update(const char *pipeline_name, int pipeline_table_rule_ttl_read(const char *pipeline_name, uint32_t table_id, - void *data, + struct table_rule_match *match, struct rte_table_action_ttl_counters *stats, int clear); +int +pipeline_table_rule_time_read(const char *pipeline_name, + uint32_t table_id, + struct table_rule_match *match, + uint64_t *timestamp); + +struct table_rule * +table_rule_find(struct table *table, + struct table_rule_match *match); + +void +table_rule_add(struct table *table, + struct table_rule *rule); + +void +table_rule_add_bulk(struct table *table, + struct table_rule_list *list, + uint32_t n_rules); + +void +table_rule_delete(struct table *table, + struct table_rule_match *match); + +void +table_rule_default_add(struct table *table, + struct table_rule *rule); + +void +table_rule_default_delete(struct table *table); + #endif /* _INCLUDE_PIPELINE_H_ */