examples/ipsec-secgw: add offload error handling
authorMichael Shamis <michaelsh@marvell.com>
Sun, 25 Aug 2019 11:04:48 +0000 (14:04 +0300)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 9 Oct 2019 09:50:12 +0000 (11:50 +0200)
Added error handler for offload mode.

Signed-off-by: Michael Shamis <michaelsh@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
examples/ipsec-secgw/ipsec.c

index 5f9d560..d5565a6 100644 (file)
@@ -573,6 +573,12 @@ ipsec_dequeue(ipsec_xform_fn xform_func, struct ipsec_ctx *ipsec_ctx,
                                        rte_pktmbuf_free(pkt);
                                        continue;
                                }
+                       } else if (sa->type ==
+                               RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL) {
+                               if (cops[j]->status) {
+                                       rte_pktmbuf_free(pkt);
+                                       continue;
+                               }
                        }
                        pkts[nb_pkts++] = pkt;
                }