[dpdk-dev] [PATCH v4] ip_pipeline: add flow actions pipeline

2015-12-07 Thread Thomas Monjalon
2015-12-07 09:44, Singh, Jasvinder:
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon
> > > Flow actions pipeline is an extension of flow-classification pipeline.
> > > Some of the operations of flow classification pipeline such as traffic
> > >
> > > Signed-off-by: Jasvinder Singh 
> > > Signed-off-by: Fan Zhang 
> > > Acked-by: Cristian Dumitrescu 
> > 
> > Applied, thanks
> 
> Hi Thomas,
> 
> This patch is not merged in the master. I don't see any source file.

Sorry for the inconvenience.
I had to resolve some conflicts and forgot to "git add" some files.
It is fixed now. Thank you for reporting.



[dpdk-dev] [PATCH v4] ip_pipeline: add flow actions pipeline

2015-12-07 Thread Panu Matilainen
On 12/07/2015 03:17 AM, Thomas Monjalon wrote:
> 2015-11-18 17:09, Fan Zhang:
>> 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.
>>
>> Signed-off-by: Jasvinder Singh 
>> Signed-off-by: Fan Zhang 
>> Acked-by: Cristian Dumitrescu 
>
> Applied, thanks
>

The patch tries to include pipeline_flow_actions.h which doesn't exist, 
making the ip_pipeline example unbuildable.

Seems like a case of forgotten "git add" when creating the patch...

- Panu -



[dpdk-dev] [PATCH v4] ip_pipeline: add flow actions pipeline

2015-12-07 Thread Singh, Jasvinder


> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Monday, December 7, 2015 1:18 AM
> To: Zhang, Roy Fan
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4] ip_pipeline: add flow actions pipeline
> 
> 2015-11-18 17:09, Fan Zhang:
> > Flow actions pipeline is an extension of flow-classification pipeline.
> > Some of the operations of flow classification pipeline such as traffic
> >
> > Signed-off-by: Jasvinder Singh 
> > Signed-off-by: Fan Zhang 
> > Acked-by: Cristian Dumitrescu 
> 
> Applied, thanks

Hi Thomas,

This patch is not merged in the master. I don't see any source file.

Regards,
Jasvinder


[dpdk-dev] [PATCH v4] ip_pipeline: add flow actions pipeline

2015-12-07 Thread Thomas Monjalon
2015-11-18 17:09, Fan Zhang:
> 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.
> 
> Signed-off-by: Jasvinder Singh 
> Signed-off-by: Fan Zhang 
> Acked-by: Cristian Dumitrescu 

Applied, thanks


[dpdk-dev] [PATCH v4] ip_pipeline: add flow actions pipeline

2015-11-18 Thread Fan Zhang
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.

Signed-off-by: Jasvinder Singh 
Signed-off-by: Fan Zhang 
Acked-by: Cristian Dumitrescu 
---

This patch depends on patch "ip_pipeline: add pipeline type validation"
http://dpdk.org/dev/patchwork/patch/7056/

*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

*v4
Removing changes made in v2, fix bug introduced in v3.

 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   | 1814 
 .../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, 3120 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

diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index f3ff1ec..13d31de 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -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

diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index 3f9c68d..0088ece 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -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, _master);
app_pipeline_type_register(app, _passthrough);
app_pipeline_type_register(app, _flow_classification);
+   app_pipeline_type_register(app, _flow_actions);
app_pipeline_type_register(app, _firewall);
app_pipeline_type_register(app, _routing);

diff --git a/examples/ip_pipeline/pipeline/pipeline_actions_common.h 
b/examples/ip_pipeline/pipeline/pipeline_actions_common.h
index 4b5d5c4..aa1dd59 100644
--- a/examples/ip_pipeline/pipeline/pipeline_actions_common.h
+++ b/examples/ip_pipeline/pipeline/pipeline_actions_common.h
@@ -116,4 +116,87 @@ f_ah(  
\
return 0;   \
 }

+#define PIPELINE_TABLE_AH_HIT_DROP_TIME(f_ah, f_pkt_work, f_pkt4_work) \
+static int \
+f_ah(  \
+   struct rte_mbuf **pkts, \
+   uint64_t *pkts_mask,\
+   struct rte_pipeline_table_entry