[dpdk-dev] [PATCH v5 3/3] examples/ipsec-secgw: add Egress flow actions
Nelio Laranjeiro
nelio.laranjeiro at 6wind.com
Mon Dec 18 11:24:37 CET 2017
Add Egress flow create for devices supporting
RTE_SECURITY_TX_HW_TRAILER_OFFLOAD.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro at 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(+)
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 37a6416ed..580e09a3a 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -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,
--
2.11.0
More information about the dev
mailing list