Skip to contentSkip to conversation

ip_pipeline: add flow actions pipeline

PATCH Superseded Fan Zhang 1 participant 1 message Nov 18, 2015

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH v3 1/1 ip_pipeline: add flow actions pipeline

Flow actions pipeline is an extension of flow-classification pipeline. Some of the operations of flow classification pipeline such as traffic metering/marking(for e.g. Single Rate Three Color Marker (srTCM), Two Rate Three Color Marker trTCM)), policer can be performed separately in flow action pipeline to avoid excessive computational burden on the CPU core running the flow-classification pipeline. The Flow action pipeline implements various function such as traffic metering, policer, stats. Traffic mettering can configured as per the required context, for examples- per user, per traffic class or both. These contexts can be applied by specifying parameters in configuration file as shown below;

[PIPELINE1]
type = FLOW_ACTIONS
core = 1
pktq_in = RXQ0.0 RXQ1.0 RXQ2.0 RXQ3.0
pktq_out = TXQ0.0 TXQ1.0 TXQ2.0 TXQ3.0
n_flows = 65536
n_meters_per_flow = 1
flow_id_offset = 158
ip_hdr_offset = 142
color_offset = 64

The entries of flow and dscp tables of flow actions pipeline can be modified through command-line interface. The commands to add or delete entries to the flow table, DSCP(differentiated services code point) table and for statistics collection, etc have been included. The key functions such as Traffic Metering/marking and policer functions have been implemented as flow-table action handler.

---

*v2
Add CLI command check for pipeline type and update such check to all existing pipelines. It prevents running CLI commands on not supported pipeline types.

*v3
To be applied on top of:
[dpdk-dev] [PATCH 1/1] ip_pipeline: add pipeline type validation

 examples/ip_pipeline/Makefile                      |    2 +
 examples/ip_pipeline/init.c                        |    2 +
 .../ip_pipeline/pipeline/pipeline_actions_common.h |   83 +
 .../ip_pipeline/pipeline/pipeline_flow_actions.c   | 1808 ++++++++++++++++++++
 .../ip_pipeline/pipeline/pipeline_flow_actions.h   |   78 +
 .../pipeline/pipeline_flow_actions_be.c            |  973 +++++++++++
 .../pipeline/pipeline_flow_actions_be.h            |  168 ++
 7 files changed, 3114 insertions(+)
 create mode 100644 examples/ip_pipeline/pipeline/pipeline_flow_actions.c
 create mode 100644 examples/ip_pipeline/pipeline/pipeline_flow_actions.h
 create mode 100644 examples/ip_pipeline/pipeline/pipeline_flow_actions_be.c
 create mode 100644 examples/ip_pipeline/pipeline/pipeline_flow_actions_be.h
examples/ip_pipeline/Makefile +2 -0
index f3ff1ec..13d31de 100644
@@ -66,6 +66,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_firewall_be.c
 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_firewall.c
 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_classification_be.c
 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_classification.c
+SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_actions_be.c
+SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_actions.c
 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing_be.c
 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing.c
 
examples/ip_pipeline/init.c +2 -0
index 3f9c68d..0088ece 100644
@@ -49,6 +49,7 @@
 #include "pipeline_passthrough.h"
 #include "pipeline_firewall.h"
 #include "pipeline_flow_classification.h"
+#include "pipeline_flow_actions.h"
 #include "pipeline_routing.h"
 
 #define APP_NAME_SIZE	32
@@ -1291,6 +1292,7 @@ int app_init(struct app_params *app)
 	app_pipeline_type_register(app, &pipeline_master);
 	app_pipeline_type_register(app, &pipeline_passthrough);
 	app_pipeline_type_register(app, &pipeline_flow_classification);
+	app_pipeline_type_register(app, &pipeline_flow_actions);
 	app_pipeline_type_register(app, &pipeline_firewall);
 	app_pipeline_type_register(app, &pipeline_routing);
 
examples/ip_pipeline/pipeline/pipeline_actions_common.h +83 -0

87 lines not on this page · raw message

examples/ip_pipeline/pipeline/pipeline_flow_actions.c new file +1808 -0

1,808 lines not on this page · raw message

examples/ip_pipeline/pipeline/pipeline_flow_actions.h new file +78 -0

78 lines not on this page · raw message

examples/ip_pipeline/pipeline/pipeline_flow_actions_be.c new file +973 -0

973 lines not on this page · raw message

examples/ip_pipeline/pipeline/pipeline_flow_actions_be.h new file +168 -0

32 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.5.0

Part of the diff is not shown here. View the raw message.