examples/ipsec-secgw: try end in flow actions before fail
authorRadu Nicolau <radu.nicolau@intel.com>
Thu, 18 Jan 2018 16:07:38 +0000 (16:07 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Sat, 20 Jan 2018 15:10:53 +0000 (16:10 +0100)
After trying RSS and Queue also try End for flow action
to allow for HW that don't support flow features with
inline crypto.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Akhil Goyal <akhil.goyal@nxp.com>
examples/ipsec-secgw/ipsec.c

index a478b6e..5fb5bc1 100644 (file)
@@ -221,6 +221,12 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
                                        &(struct rte_flow_action_queue){
                                        .index = 0,
                                };
+                               ret = rte_flow_validate(sa->portid, &sa->attr,
+                                                       sa->pattern, sa->action,
+                                                       &err);
+                               /* Try End. */
+                               sa->action[1].type = RTE_FLOW_ACTION_TYPE_END;
+                               sa->action[1].conf = NULL;
                                ret = rte_flow_validate(sa->portid, &sa->attr,
                                                        sa->pattern, sa->action,
                                                        &err);