examples/ipsec-secgw: add offload error handling

Message ID 20190825110449.343-1-michaelsh@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series examples/ipsec-secgw: add offload error handling |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-Compile-Testing success Compile Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

Commit Message

Michael Shamis Aug. 25, 2019, 11:04 a.m. UTC
  From: Michael Shamis <michaelsh@marvell.com>

Added error handler for offload mode.

Signed-off-by: Michael Shamis <michaelsh@marvell.com>
---
 examples/ipsec-secgw/ipsec.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Akhil Goyal Aug. 26, 2019, 6:39 a.m. UTC | #1
> 
> From: Michael Shamis <michaelsh@marvell.com>
> 
> Added error handler for offload mode.
> 
> Signed-off-by: Michael Shamis <michaelsh@marvell.com>
> ---
>  examples/ipsec-secgw/ipsec.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
> index dc85adfe5..583c91658 100644
> --- a/examples/ipsec-secgw/ipsec.c
> +++ b/examples/ipsec-secgw/ipsec.c
> @@ -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;
>  		}
> --
> 2.23.0

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
  
Akhil Goyal Sept. 19, 2019, 3:06 p.m. UTC | #2
> >
> > From: Michael Shamis <michaelsh@marvell.com>
> >
> > Added error handler for offload mode.
> >
> > Signed-off-by: Michael Shamis <michaelsh@marvell.com>
> > ---
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index dc85adfe5..583c91658 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -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;
 		}