Skip to contentSkip to conversation

examples/ipsec-secgw: add offload error handling

PATCH Applied [email protected] 2 participants 3 messages Aug 25, 2019 – Sep 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ipsec-secgw: add offload error handling

From: Michael Shamis <[email protected]>

Added error handler for offload mode.

---
 examples/ipsec-secgw/ipsec.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/ipsec-secgw/ipsec.c +6 -0
index dc85adfe5..583c91658 100644
@@ -566,6 +566,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;
 		}
Signature · 1 line
2.23.0
Acked-by on v1 1/1
#1 lore raw
Quoted 30 lines

From: Michael Shamis <[email protected]>

Added error handler for offload mode.

---
 examples/ipsec-secgw/ipsec.c | 6 ++++++
 1 file changed, 6 insertions(+)
examples/ipsec-secgw/ipsec.c +6 -0
index dc85adfe5..583c91658 100644
@@ -566,6 +566,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;
+				}
 			}
examples/ipsec-secgw/ipsec.c +0 -1
 			pkts[nb_pkts++] = pkt;
 		}
--
Quoted 1 line

2.23.0