diff mbox

[API-NEXT] linux-gen: ipsec: add stubs for functions

Message ID 1487331254-29664-1-git-send-email-petri.savolainen@linaro.org
State New
Headers show

Commit Message

Petri Savolainen Feb. 17, 2017, 11:34 a.m. UTC
Added stubs for functions so that applications can be built
already. A proper implementation follows later on.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 platform/linux-generic/odp_ipsec.c | 111 +++++++++++++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)

-- 
2.8.1

Comments

Bill Fischofer Feb. 17, 2017, 1:17 p.m. UTC | #1
On Fri, Feb 17, 2017 at 5:34 AM, Petri Savolainen
<petri.savolainen@linaro.org> wrote:
> Added stubs for functions so that applications can be built

> already. A proper implementation follows later on.

>

> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>


Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> ---

>  platform/linux-generic/odp_ipsec.c | 111 +++++++++++++++++++++++++++++++++++++

>  1 file changed, 111 insertions(+)

>

> diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c

> index ce7fded..588d8d8 100644

> --- a/platform/linux-generic/odp_ipsec.c

> +++ b/platform/linux-generic/odp_ipsec.c

> @@ -14,3 +14,114 @@ int odp_ipsec_capability(odp_ipsec_capability_t *capa)

>

>         return 0;

>  }

> +

> +int odp_ipsec_cipher_capability(odp_cipher_alg_t cipher,

> +                               odp_crypto_cipher_capability_t capa[], int num)

> +{

> +       (void)cipher;

> +       (void)capa;

> +       (void)num;

> +

> +       return -1;

> +}

> +

> +int odp_ipsec_auth_capability(odp_auth_alg_t auth,

> +                             odp_crypto_auth_capability_t capa[], int num)

> +{

> +       (void)auth;

> +       (void)capa;

> +       (void)num;

> +

> +       return -1;

> +}

> +

> +void odp_ipsec_config_init(odp_ipsec_config_t *config)

> +{

> +       memset(config, 0, sizeof(odp_ipsec_config_t));

> +}

> +

> +int odp_ipsec_config(const odp_ipsec_config_t *config)

> +{

> +       (void)config;

> +

> +       return -1;

> +}

> +

> +void odp_ipsec_sa_param_init(odp_ipsec_sa_param_t *param)

> +{

> +       memset(param, 0, sizeof(odp_ipsec_sa_param_t));

> +}

> +

> +odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param)

> +{

> +       (void)param;

> +

> +       return ODP_IPSEC_SA_INVALID;

> +}

> +

> +int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa)

> +{

> +       (void)sa;

> +

> +       return -1;

> +}

> +

> +int odp_ipsec_in(const odp_ipsec_op_param_t *input,

> +                odp_ipsec_op_result_t *output)

> +{

> +       (void)input;

> +       (void)output;

> +

> +       return -1;

> +}

> +

> +int odp_ipsec_out(const odp_ipsec_op_param_t *input,

> +                 odp_ipsec_op_result_t *output)

> +{

> +       (void)input;

> +       (void)output;

> +

> +       return -1;

> +}

> +

> +int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input)

> +{

> +       (void)input;

> +

> +       return -1;

> +}

> +

> +int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input)

> +{

> +       (void)input;

> +

> +       return -1;

> +}

> +

> +int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event)

> +{

> +       (void)result;

> +       (void)event;

> +

> +       return -1;

> +}

> +

> +int odp_ipsec_mtu_update(odp_ipsec_sa_t sa, uint32_t mtu)

> +{

> +       (void)sa;

> +       (void)mtu;

> +

> +       return -1;

> +}

> +

> +void *odp_ipsec_sa_context(odp_ipsec_sa_t sa)

> +{

> +       (void)sa;

> +

> +       return NULL;

> +}

> +

> +uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa)

> +{

> +       return _odp_pri(sa);

> +}

> --

> 2.8.1

>
Savolainen, Petri (Nokia - FI/Espoo) Feb. 21, 2017, 1:26 p.m. UTC | #2
Ping. This is very easy addition to merge. It enables OFP and other IPSEC users to compile against ODP.

-Petri


> -----Original Message-----

> From: Bill Fischofer [mailto:bill.fischofer@linaro.org]

> Sent: Friday, February 17, 2017 3:17 PM

> To: Petri Savolainen <petri.savolainen@linaro.org>

> Cc: lng-odp-forward <lng-odp@lists.linaro.org>

> Subject: Re: [lng-odp] [API-NEXT PATCH] linux-gen: ipsec: add stubs for

> functions

> 

> On Fri, Feb 17, 2017 at 5:34 AM, Petri Savolainen

> <petri.savolainen@linaro.org> wrote:

> > Added stubs for functions so that applications can be built

> > already. A proper implementation follows later on.

> >

> > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

> 

> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Maxim Uvarov Feb. 21, 2017, 2:46 p.m. UTC | #3
Merged,
Maxim.

On 02/21/17 16:26, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> Ping. This is very easy addition to merge. It enables OFP and other IPSEC users to compile against ODP.

> 

> -Petri

> 

> 

>> -----Original Message-----

>> From: Bill Fischofer [mailto:bill.fischofer@linaro.org]

>> Sent: Friday, February 17, 2017 3:17 PM

>> To: Petri Savolainen <petri.savolainen@linaro.org>

>> Cc: lng-odp-forward <lng-odp@lists.linaro.org>

>> Subject: Re: [lng-odp] [API-NEXT PATCH] linux-gen: ipsec: add stubs for

>> functions

>>

>> On Fri, Feb 17, 2017 at 5:34 AM, Petri Savolainen

>> <petri.savolainen@linaro.org> wrote:

>>> Added stubs for functions so that applications can be built

>>> already. A proper implementation follows later on.

>>>

>>> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

>>

>> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> 

>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c
index ce7fded..588d8d8 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -14,3 +14,114 @@  int odp_ipsec_capability(odp_ipsec_capability_t *capa)
 
 	return 0;
 }
+
+int odp_ipsec_cipher_capability(odp_cipher_alg_t cipher,
+				odp_crypto_cipher_capability_t capa[], int num)
+{
+	(void)cipher;
+	(void)capa;
+	(void)num;
+
+	return -1;
+}
+
+int odp_ipsec_auth_capability(odp_auth_alg_t auth,
+			      odp_crypto_auth_capability_t capa[], int num)
+{
+	(void)auth;
+	(void)capa;
+	(void)num;
+
+	return -1;
+}
+
+void odp_ipsec_config_init(odp_ipsec_config_t *config)
+{
+	memset(config, 0, sizeof(odp_ipsec_config_t));
+}
+
+int odp_ipsec_config(const odp_ipsec_config_t *config)
+{
+	(void)config;
+
+	return -1;
+}
+
+void odp_ipsec_sa_param_init(odp_ipsec_sa_param_t *param)
+{
+	memset(param, 0, sizeof(odp_ipsec_sa_param_t));
+}
+
+odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param)
+{
+	(void)param;
+
+	return ODP_IPSEC_SA_INVALID;
+}
+
+int odp_ipsec_sa_destroy(odp_ipsec_sa_t sa)
+{
+	(void)sa;
+
+	return -1;
+}
+
+int odp_ipsec_in(const odp_ipsec_op_param_t *input,
+		 odp_ipsec_op_result_t *output)
+{
+	(void)input;
+	(void)output;
+
+	return -1;
+}
+
+int odp_ipsec_out(const odp_ipsec_op_param_t *input,
+		  odp_ipsec_op_result_t *output)
+{
+	(void)input;
+	(void)output;
+
+	return -1;
+}
+
+int odp_ipsec_in_enq(const odp_ipsec_op_param_t *input)
+{
+	(void)input;
+
+	return -1;
+}
+
+int odp_ipsec_out_enq(const odp_ipsec_op_param_t *input)
+{
+	(void)input;
+
+	return -1;
+}
+
+int odp_ipsec_result(odp_ipsec_op_result_t *result, odp_event_t event)
+{
+	(void)result;
+	(void)event;
+
+	return -1;
+}
+
+int odp_ipsec_mtu_update(odp_ipsec_sa_t sa, uint32_t mtu)
+{
+	(void)sa;
+	(void)mtu;
+
+	return -1;
+}
+
+void *odp_ipsec_sa_context(odp_ipsec_sa_t sa)
+{
+	(void)sa;
+
+	return NULL;
+}
+
+uint64_t odp_ipsec_sa_to_u64(odp_ipsec_sa_t sa)
+{
+	return _odp_pri(sa);
+}