Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-03-01 Thread Andriy Berestovskyy

Hey Bill,
Ah, no problem. It is a minor thing.

Thanks for your time,
Andriy

On 28.02.2017 19:00, Bill Fischofer wrote:

Thanks Andriy,

We discussed this during the call and the consensus is to leave this
code as-is for now. Bala was on the call, so Cavium was represented in
the discussions.

Regards,
Bill

On Tue, Feb 28, 2017 at 11:44 AM, Andriy Berestovskyy
<andriy.berestovs...@cavium.com <mailto:andriy.berestovs...@cavium.com>>
wrote:

Hey guys,
IMO having:

typedef enum odp_ipsec_op_mode_t
ODP_IPSEC_OP_MODE_*

typedef enum odp_ipsec_dir_t
ODP_IPSEC_DIR_*

typedef enum odp_ipsec_mode_t
ODP_IPSEC_MODE_*

typedef enum odp_ipsec_tunnel_type_t
ODP_IPSEC_TUNNEL_*

and then:

typedef enum odp_ipsec_protocol_t
ODP_IPSEC_*

looks like a minor inconsistency to me. I am not sure I will be able
to join the call since we have the OFP call about the same time...

Regards,
Andriy


On 28.02.2017 13:43, Bill Fischofer wrote:



On Tue, Feb 28, 2017 at 2:22 AM, Savolainen, Petri (Nokia -
FI/Espoo)
<petri.savolai...@nokia-bell-labs.com
<mailto:petri.savolai...@nokia-bell-labs.com>
<mailto:petri.savolai...@nokia-bell-labs.com
<mailto:petri.savolai...@nokia-bell-labs.com>>> wrote:



> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org
<mailto:lng-odp-boun...@lists.linaro.org>
<mailto:lng-odp-boun...@lists.linaro.org
<mailto:lng-odp-boun...@lists.linaro.org>>] On Behalf Of Bill
> Fischofer
> Sent: Monday, February 27, 2017 5:17 PM
> To: Andriy Berestovskyy <andriy.berestovs...@cavium.com
<mailto:andriy.berestovs...@cavium.com>
<mailto:andriy.berestovs...@cavium.com
<mailto:andriy.berestovs...@cavium.com>>>
> Cc: lng-odp-forward <lng-odp@lists.linaro.org
<mailto:lng-odp@lists.linaro.org>
        <mailto:lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>>>
    > Subject: Re: [lng-odp] [PATCH] api: ipsec: make IPSEC
protocol consistent
> with other types
>
> On Mon, Feb 27, 2017 at 7:02 AM, Andriy Berestovskyy <
> andriy.berestovs...@cavium.com
<mailto:andriy.berestovs...@cavium.com>
<mailto:andriy.berestovs...@cavium.com
<mailto:andriy.berestovs...@cavium.com>>> wrote:
>
> > Oops, sorry.
> > Shall I resend the patch then?
> >
>
> Probably not necessary right now. Let's get some feedback
on this. If a v2
> is needed, then yes, please post it as an API-NEXT patch.
Thanks.

+/**
+ * IPSEC protocol
+ */
+typedef enum odp_ipsec_proto_t {
+   /** ESP protocol */
+   ODP_IPSEC_ESP = 0,
+
+   /** AH protocol */
+   ODP_IPSEC_AH
+
+} odp_ipsec_proto_t;

" "proto" is not an obvious abbreviation. It might stand for
"prototype". I'd prefer to see this as odp_ipsec_protocol_t "


Bill, you didn't like "proto" the last time. Is it now OK?


I prefer these things to be unambiguous to trying to save a
couple of
characters, but there are a number of proposed changes in this
patch, so
worth discussing them.



-Petri





Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-28 Thread Bill Fischofer
Thanks Andriy,

We discussed this during the call and the consensus is to leave this code
as-is for now. Bala was on the call, so Cavium was represented in the
discussions.

Regards,
Bill

On Tue, Feb 28, 2017 at 11:44 AM, Andriy Berestovskyy <
andriy.berestovs...@cavium.com> wrote:

> Hey guys,
> IMO having:
>
> typedef enum odp_ipsec_op_mode_t
> ODP_IPSEC_OP_MODE_*
>
> typedef enum odp_ipsec_dir_t
> ODP_IPSEC_DIR_*
>
> typedef enum odp_ipsec_mode_t
> ODP_IPSEC_MODE_*
>
> typedef enum odp_ipsec_tunnel_type_t
> ODP_IPSEC_TUNNEL_*
>
> and then:
>
> typedef enum odp_ipsec_protocol_t
> ODP_IPSEC_*
>
> looks like a minor inconsistency to me. I am not sure I will be able to
> join the call since we have the OFP call about the same time...
>
> Regards,
> Andriy
>
>
> On 28.02.2017 13:43, Bill Fischofer wrote:
>
>>
>>
>> On Tue, Feb 28, 2017 at 2:22 AM, Savolainen, Petri (Nokia - FI/Espoo)
>> <petri.savolai...@nokia-bell-labs.com
>> <mailto:petri.savolai...@nokia-bell-labs.com>> wrote:
>>
>>
>>
>> > -Original Message-
>> > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org
>> <mailto:lng-odp-boun...@lists.linaro.org>] On Behalf Of Bill
>> > Fischofer
>> > Sent: Monday, February 27, 2017 5:17 PM
>>     > To: Andriy Berestovskyy <andriy.berestovs...@cavium.com > andriy.berestovs...@cavium.com>>
>> > Cc: lng-odp-forward <lng-odp@lists.linaro.org > lng-odp@lists.linaro.org>>
>> > Subject: Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol
>> consistent
>> > with other types
>> >
>> > On Mon, Feb 27, 2017 at 7:02 AM, Andriy Berestovskyy <
>> > andriy.berestovs...@cavium.com
>> <mailto:andriy.berestovs...@cavium.com>> wrote:
>> >
>> > > Oops, sorry.
>> > > Shall I resend the patch then?
>> > >
>> >
>> > Probably not necessary right now. Let's get some feedback on this.
>> If a v2
>> > is needed, then yes, please post it as an API-NEXT patch. Thanks.
>>
>> +/**
>> + * IPSEC protocol
>> + */
>> +typedef enum odp_ipsec_proto_t {
>> +   /** ESP protocol */
>> +   ODP_IPSEC_ESP = 0,
>> +
>> +   /** AH protocol */
>> +   ODP_IPSEC_AH
>> +
>> +} odp_ipsec_proto_t;
>>
>> " "proto" is not an obvious abbreviation. It might stand for
>> "prototype". I'd prefer to see this as odp_ipsec_protocol_t "
>>
>>
>> Bill, you didn't like "proto" the last time. Is it now OK?
>>
>>
>> I prefer these things to be unambiguous to trying to save a couple of
>> characters, but there are a number of proposed changes in this patch, so
>> worth discussing them.
>>
>>
>>
>> -Petri
>>
>>
>>


Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-28 Thread Andriy Berestovskyy

Hey guys,
IMO having:

typedef enum odp_ipsec_op_mode_t
ODP_IPSEC_OP_MODE_*

typedef enum odp_ipsec_dir_t
ODP_IPSEC_DIR_*

typedef enum odp_ipsec_mode_t
ODP_IPSEC_MODE_*

typedef enum odp_ipsec_tunnel_type_t
ODP_IPSEC_TUNNEL_*

and then:

typedef enum odp_ipsec_protocol_t
ODP_IPSEC_*

looks like a minor inconsistency to me. I am not sure I will be able to 
join the call since we have the OFP call about the same time...


Regards,
Andriy


On 28.02.2017 13:43, Bill Fischofer wrote:



On Tue, Feb 28, 2017 at 2:22 AM, Savolainen, Petri (Nokia - FI/Espoo)
<petri.savolai...@nokia-bell-labs.com
<mailto:petri.savolai...@nokia-bell-labs.com>> wrote:



> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org
<mailto:lng-odp-boun...@lists.linaro.org>] On Behalf Of Bill
> Fischofer
> Sent: Monday, February 27, 2017 5:17 PM
> To: Andriy Berestovskyy <andriy.berestovs...@cavium.com 
<mailto:andriy.berestovs...@cavium.com>>
> Cc: lng-odp-forward <lng-odp@lists.linaro.org 
<mailto:lng-odp@lists.linaro.org>>
> Subject: Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent
> with other types
>
> On Mon, Feb 27, 2017 at 7:02 AM, Andriy Berestovskyy <
> andriy.berestovs...@cavium.com
<mailto:andriy.berestovs...@cavium.com>> wrote:
>
> > Oops, sorry.
> > Shall I resend the patch then?
> >
>
> Probably not necessary right now. Let's get some feedback on this. If a v2
> is needed, then yes, please post it as an API-NEXT patch. Thanks.

+/**
+ * IPSEC protocol
+ */
+typedef enum odp_ipsec_proto_t {
+   /** ESP protocol */
+   ODP_IPSEC_ESP = 0,
+
+   /** AH protocol */
+   ODP_IPSEC_AH
+
+} odp_ipsec_proto_t;

" "proto" is not an obvious abbreviation. It might stand for
"prototype". I'd prefer to see this as odp_ipsec_protocol_t "


Bill, you didn't like "proto" the last time. Is it now OK?


I prefer these things to be unambiguous to trying to save a couple of
characters, but there are a number of proposed changes in this patch, so
worth discussing them.



-Petri




Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-28 Thread Bill Fischofer
On Tue, Feb 28, 2017 at 2:22 AM, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolai...@nokia-bell-labs.com> wrote:

>
>
> > -Original Message-
> > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> Bill
> > Fischofer
> > Sent: Monday, February 27, 2017 5:17 PM
> > To: Andriy Berestovskyy <andriy.berestovs...@cavium.com>
> > Cc: lng-odp-forward <lng-odp@lists.linaro.org>
> > Subject: Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent
> > with other types
> >
> > On Mon, Feb 27, 2017 at 7:02 AM, Andriy Berestovskyy <
> > andriy.berestovs...@cavium.com> wrote:
> >
> > > Oops, sorry.
> > > Shall I resend the patch then?
> > >
> >
> > Probably not necessary right now. Let's get some feedback on this. If a
> v2
> > is needed, then yes, please post it as an API-NEXT patch. Thanks.
>
> +/**
> + * IPSEC protocol
> + */
> +typedef enum odp_ipsec_proto_t {
> +   /** ESP protocol */
> +   ODP_IPSEC_ESP = 0,
> +
> +   /** AH protocol */
> +   ODP_IPSEC_AH
> +
> +} odp_ipsec_proto_t;
>
> " "proto" is not an obvious abbreviation. It might stand for "prototype".
> I'd prefer to see this as odp_ipsec_protocol_t "
>
>
> Bill, you didn't like "proto" the last time. Is it now OK?
>

I prefer these things to be unambiguous to trying to save a couple of
characters, but there are a number of proposed changes in this patch, so
worth discussing them.


>
> -Petri
>
>


Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-28 Thread Savolainen, Petri (Nokia - FI/Espoo)


> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Bill
> Fischofer
> Sent: Monday, February 27, 2017 5:17 PM
> To: Andriy Berestovskyy <andriy.berestovs...@cavium.com>
> Cc: lng-odp-forward <lng-odp@lists.linaro.org>
> Subject: Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent
> with other types
> 
> On Mon, Feb 27, 2017 at 7:02 AM, Andriy Berestovskyy <
> andriy.berestovs...@cavium.com> wrote:
> 
> > Oops, sorry.
> > Shall I resend the patch then?
> >
> 
> Probably not necessary right now. Let's get some feedback on this. If a v2
> is needed, then yes, please post it as an API-NEXT patch. Thanks.

+/**
+ * IPSEC protocol
+ */
+typedef enum odp_ipsec_proto_t {
+   /** ESP protocol */
+   ODP_IPSEC_ESP = 0,
+
+   /** AH protocol */
+   ODP_IPSEC_AH
+
+} odp_ipsec_proto_t;

" "proto" is not an obvious abbreviation. It might stand for "prototype". I'd 
prefer to see this as odp_ipsec_protocol_t "


Bill, you didn't like "proto" the last time. Is it now OK?

-Petri



Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-27 Thread Bill Fischofer
On Mon, Feb 27, 2017 at 7:02 AM, Andriy Berestovskyy <
andriy.berestovs...@cavium.com> wrote:

> Oops, sorry.
> Shall I resend the patch then?
>

Probably not necessary right now. Let's get some feedback on this. If a v2
is needed, then yes, please post it as an API-NEXT patch. Thanks.


>
> Andriy
>
> On 27.02.2017 13:55, Bill Fischofer wrote:
>
>> Thanks Andriy,
>>
>> Please note that all API changes should specify
>> --subject-prefix="API-NEXT PATCH" as we use the api-next branch to
>> accumulate all API changes.
>>
>> On Mon, Feb 27, 2017 at 5:24 AM, Andriy Berestovskyy
>> >
>> wrote:
>>
>> - rename odp_ipsec_protocol_t to odp_ipsec_proto_t
>> - rename ODP_IPSEC_AH to ODP_IPSEC_PROTO_AH
>> - rename ODP_IPSEC_ESP to ODP_IPSEC_PROTO_ESP
>>
>> Signed-off-by: Andriy Berestovskyy > >
>>
>> ---
>>  include/odp/api/spec/ipsec.h | 10 +-
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/odp/api/spec/ipsec.h
>> b/include/odp/api/spec/ipsec.h
>> index 66222d8..793e317 100644
>> --- a/include/odp/api/spec/ipsec.h
>> +++ b/include/odp/api/spec/ipsec.h
>> @@ -140,14 +140,14 @@ typedef enum odp_ipsec_mode_t {
>>  /**
>>   * IPSEC protocol
>>   */
>> -typedef enum odp_ipsec_protocol_t {
>> +typedef enum odp_ipsec_proto_t {
>> /** ESP protocol */
>> -   ODP_IPSEC_ESP = 0,
>> +   ODP_IPSEC_PROTO_ESP = 0,
>>
>> /** AH protocol */
>> -   ODP_IPSEC_AH
>> +   ODP_IPSEC_PROTO_AH
>>
>> -} odp_ipsec_protocol_t;
>> +} odp_ipsec_proto_t;
>>
>>  /**
>>   * IPSEC tunnel type
>> @@ -362,7 +362,7 @@ typedef struct odp_ipsec_sa_param_t {
>> odp_ipsec_dir_t dir;
>>
>> /** IPSEC protocol: ESP or AH */
>> -   odp_ipsec_protocol_t proto;
>> +   odp_ipsec_proto_t proto;
>>
>> /** IPSEC protocol mode: transport or tunnel */
>> odp_ipsec_mode_t mode;
>> --
>> 2.7.4
>>
>>
>>


Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-27 Thread Andriy Berestovskyy

Oops, sorry.
Shall I resend the patch then?

Andriy

On 27.02.2017 13:55, Bill Fischofer wrote:

Thanks Andriy,

Please note that all API changes should specify
--subject-prefix="API-NEXT PATCH" as we use the api-next branch to
accumulate all API changes.

On Mon, Feb 27, 2017 at 5:24 AM, Andriy Berestovskyy
>
wrote:

- rename odp_ipsec_protocol_t to odp_ipsec_proto_t
- rename ODP_IPSEC_AH to ODP_IPSEC_PROTO_AH
- rename ODP_IPSEC_ESP to ODP_IPSEC_PROTO_ESP

Signed-off-by: Andriy Berestovskyy >
---
 include/odp/api/spec/ipsec.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 66222d8..793e317 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -140,14 +140,14 @@ typedef enum odp_ipsec_mode_t {
 /**
  * IPSEC protocol
  */
-typedef enum odp_ipsec_protocol_t {
+typedef enum odp_ipsec_proto_t {
/** ESP protocol */
-   ODP_IPSEC_ESP = 0,
+   ODP_IPSEC_PROTO_ESP = 0,

/** AH protocol */
-   ODP_IPSEC_AH
+   ODP_IPSEC_PROTO_AH

-} odp_ipsec_protocol_t;
+} odp_ipsec_proto_t;

 /**
  * IPSEC tunnel type
@@ -362,7 +362,7 @@ typedef struct odp_ipsec_sa_param_t {
odp_ipsec_dir_t dir;

/** IPSEC protocol: ESP or AH */
-   odp_ipsec_protocol_t proto;
+   odp_ipsec_proto_t proto;

/** IPSEC protocol mode: transport or tunnel */
odp_ipsec_mode_t mode;
--
2.7.4




Re: [lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-27 Thread Bill Fischofer
Thanks Andriy,

Please note that all API changes should specify --subject-prefix="API-NEXT
PATCH" as we use the api-next branch to accumulate all API changes.

On Mon, Feb 27, 2017 at 5:24 AM, Andriy Berestovskyy <
andriy.berestovs...@cavium.com> wrote:

> - rename odp_ipsec_protocol_t to odp_ipsec_proto_t
> - rename ODP_IPSEC_AH to ODP_IPSEC_PROTO_AH
> - rename ODP_IPSEC_ESP to ODP_IPSEC_PROTO_ESP
>
> Signed-off-by: Andriy Berestovskyy 
> ---
>  include/odp/api/spec/ipsec.h | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
> index 66222d8..793e317 100644
> --- a/include/odp/api/spec/ipsec.h
> +++ b/include/odp/api/spec/ipsec.h
> @@ -140,14 +140,14 @@ typedef enum odp_ipsec_mode_t {
>  /**
>   * IPSEC protocol
>   */
> -typedef enum odp_ipsec_protocol_t {
> +typedef enum odp_ipsec_proto_t {
> /** ESP protocol */
> -   ODP_IPSEC_ESP = 0,
> +   ODP_IPSEC_PROTO_ESP = 0,
>
> /** AH protocol */
> -   ODP_IPSEC_AH
> +   ODP_IPSEC_PROTO_AH
>
> -} odp_ipsec_protocol_t;
> +} odp_ipsec_proto_t;
>
>  /**
>   * IPSEC tunnel type
> @@ -362,7 +362,7 @@ typedef struct odp_ipsec_sa_param_t {
> odp_ipsec_dir_t dir;
>
> /** IPSEC protocol: ESP or AH */
> -   odp_ipsec_protocol_t proto;
> +   odp_ipsec_proto_t proto;
>
> /** IPSEC protocol mode: transport or tunnel */
> odp_ipsec_mode_t mode;
> --
> 2.7.4
>
>


[lng-odp] [PATCH] api: ipsec: make IPSEC protocol consistent with other types

2017-02-27 Thread Andriy Berestovskyy
- rename odp_ipsec_protocol_t to odp_ipsec_proto_t
- rename ODP_IPSEC_AH to ODP_IPSEC_PROTO_AH
- rename ODP_IPSEC_ESP to ODP_IPSEC_PROTO_ESP

Signed-off-by: Andriy Berestovskyy 
---
 include/odp/api/spec/ipsec.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 66222d8..793e317 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -140,14 +140,14 @@ typedef enum odp_ipsec_mode_t {
 /**
  * IPSEC protocol
  */
-typedef enum odp_ipsec_protocol_t {
+typedef enum odp_ipsec_proto_t {
/** ESP protocol */
-   ODP_IPSEC_ESP = 0,
+   ODP_IPSEC_PROTO_ESP = 0,
 
/** AH protocol */
-   ODP_IPSEC_AH
+   ODP_IPSEC_PROTO_AH
 
-} odp_ipsec_protocol_t;
+} odp_ipsec_proto_t;
 
 /**
  * IPSEC tunnel type
@@ -362,7 +362,7 @@ typedef struct odp_ipsec_sa_param_t {
odp_ipsec_dir_t dir;
 
/** IPSEC protocol: ESP or AH */
-   odp_ipsec_protocol_t proto;
+   odp_ipsec_proto_t proto;
 
/** IPSEC protocol mode: transport or tunnel */
odp_ipsec_mode_t mode;
-- 
2.7.4