[dpdk-dev] [PATCH v2 4/9] examples/ipsec-secgw: rework ipsec execution loop

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Tue Jun 7 14:50:38 CEST 2016



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Sergio Gonzalez
> Monroy
> Sent: Wednesday, May 18, 2016 1:42 PM
> To: dev at dpdk.org
> Cc: Mcnamara, John
> Subject: [dpdk-dev] [PATCH v2 4/9] examples/ipsec-secgw: rework ipsec
> execution loop
> 
> Rework implementation moving from function pointers approach, where
> each
> function implements very specific functionality, to a generic function
> approach.
> 
> Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com>
> ---
>  examples/ipsec-secgw/esp.c   |   8 +-
>  examples/ipsec-secgw/esp.h   |   9 +-
>  examples/ipsec-secgw/ipsec.c |  36 ++++--
>  examples/ipsec-secgw/ipsec.h |   2 -
>  examples/ipsec-secgw/sa.c    | 272 ++++++++++++++++++-------------------------
>  5 files changed, 145 insertions(+), 182 deletions(-)
> 
> diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c
> index 7dce78c..b423080 100644
> --- a/examples/ipsec-secgw/esp.c
> +++ b/examples/ipsec-secgw/esp.c
> @@ -69,7 +69,7 @@ random_iv_u64(uint64_t *buf, uint16_t n)
> 
>  /* IPv4 Tunnel */

You removed this comment in the header file, so probably you should do the same here?

>  int
> -esp4_tunnel_inbound_pre_crypto(struct rte_mbuf *m, struct ipsec_sa *sa,
> +esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa,
>  		struct rte_crypto_op *cop)
>  {
>  	int32_t payload_len;
> @@ -117,7 +117,7 @@ esp4_tunnel_inbound_pre_crypto(struct rte_mbuf
> *m, struct ipsec_sa *sa,
>  }




More information about the dev mailing list