[dpdk-dev,v5,3/3] examples/ipsec-secgw: add Egress flow actions
Checks
Commit Message
Add Egress flow create for devices supporting
RTE_SECURITY_TX_HW_TRAILER_OFFLOAD.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
--
Changes in v5:
* removed default second end actions wrongly added in this patch.
---
examples/ipsec-secgw/ipsec.c | 7 +++++++
1 file changed, 7 insertions(+)
Comments
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nelio Laranjeiro
> Sent: Monday, December 18, 2017 10:25 AM
> To: Gonzalez Monroy, Sergio <sergio.gonzalez.monroy@intel.com>;
> Nicolau, Radu <radu.nicolau@intel.com>; Anoob Joseph
> <anoob.joseph@caviumnetworks.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v5 3/3] examples/ipsec-secgw: add Egress flow
> actions
>
> Add Egress flow create for devices supporting
> RTE_SECURITY_TX_HW_TRAILER_OFFLOAD.
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Akhil, Radu, could you review this patch?
Thanks,
Pablo
> -----Original Message-----
> From: Nelio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> Sent: Monday, December 18, 2017 10:25 AM
> To: Gonzalez Monroy, Sergio <sergio.gonzalez.monroy@intel.com>; Nicolau,
> Radu <radu.nicolau@intel.com>; Anoob Joseph
> <anoob.joseph@caviumnetworks.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v5 3/3] examples/ipsec-secgw: add Egress flow actions
>
> Add Egress flow create for devices supporting
> RTE_SECURITY_TX_HW_TRAILER_OFFLOAD.
>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
@@ -255,6 +255,13 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
&err);
if (ret)
goto flow_create_failure;
+ } else if (sa->attr.egress &&
+ (sa->ol_flags &
+ RTE_SECURITY_TX_HW_TRAILER_OFFLOAD)) {
+ sa->action[1].type =
+ RTE_FLOW_ACTION_TYPE_PASSTHRU;
+ sa->action[2].type =
+ RTE_FLOW_ACTION_TYPE_END;
}
flow_create:
sa->flow = rte_flow_create(sa->portid,