Message ID | 20170425163051.19651-1-dmitry.ereminsolenikov@linaro.org |
---|---|
State | Superseded |
Headers | show |
-----Original Message----- From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Dmitry Eremin-Solenikov Sent: 25 April 2017 22:01 To: lng-odp@lists.linaro.org Subject: [lng-odp] [API-NEXT PATCH] api: packet: introduce odp_packet_data_range_t Rename odp_crypto_data_range_t to odp_packet_data_range_t, as it is relevant not only to the crypto interface. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> --- include/odp/api/spec/crypto.h | 17 +++++++---------- include/odp/api/spec/packet.h | 12 ++++++++++++ .../validation/api/crypto/odp_crypto_test_inp.c | 4 ++-- test/common_plat/validation/api/crypto/test_vectors.h | 4 ++-- 4 files changed, 23 insertions(+), 14 deletions(-) -- 2.11.0diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index d30f050f..c216c017 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -19,6 +19,8 @@ extern "C" { #endif +#include <odp/api/packet.h> + /** @defgroup odp_crypto ODP CRYPTO * Macros, enums, types and operations to utilise crypto. * @{ @@ -238,15 +240,10 @@ typedef struct odp_crypto_iv { /** * Crypto API data range specifier + * + * @deprecated Use odp_packet_data_range_t instead */ -typedef struct odp_crypto_data_range { - /** Offset from beginning of packet */ - uint32_t offset; - - /** Length of data to operate on */ - uint32_t length; - -} odp_crypto_data_range_t; +#define odp_crypto_data_range_t odp_packet_data_range_t This can be typedef odp_packet_data_range_t odp_crypto_data_range_t No other change to code should be required after this. Will get back on this after internal review. Thanks Shally /** * Crypto API session creation parameters @@ -365,10 +362,10 @@ typedef struct odp_crypto_op_param_t { uint32_t hash_result_offset; /** Data range to apply cipher */ - odp_crypto_data_range_t cipher_range; + odp_packet_data_range_t cipher_range; /** Data range to authenticate */ - odp_crypto_data_range_t auth_range; + odp_packet_data_range_t auth_range; } odp_crypto_op_param_t; diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 5439f234..95f5349b 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -71,6 +71,18 @@ extern "C" { * Packet is red */ +/** + * Packet API data range specifier + */ +typedef struct odp_packet_data_range { + /** Offset from beginning of packet */ + uint32_t offset; + + /** Length of data to operate on */ + uint32_t length; + +} odp_packet_data_range_t; + /* * * Alloc and free diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c index 42149ac6..dfd4f122 100644 --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c @@ -71,8 +71,8 @@ static void alg_test(odp_crypto_op_t op, odp_crypto_key_t cipher_key, odp_auth_alg_t auth_alg, odp_crypto_key_t auth_key, - odp_crypto_data_range_t *cipher_range, - odp_crypto_data_range_t *auth_range, + odp_packet_data_range_t *cipher_range, + odp_packet_data_range_t *auth_range, const uint8_t *plaintext, unsigned int plaintext_len, const uint8_t *ciphertext, diff --git a/test/common_plat/validation/api/crypto/test_vectors.h b/test/common_plat/validation/api/crypto/test_vectors.h index da4610f3..a1cf4faf 100644 --- a/test/common_plat/validation/api/crypto/test_vectors.h +++ b/test/common_plat/validation/api/crypto/test_vectors.h @@ -139,14 +139,14 @@ static uint8_t aes128_gcm_reference_iv[][AES128_GCM_IV_LEN] = { static uint32_t aes128_gcm_reference_length[] = { 84, 72, 72, 40}; -static odp_crypto_data_range_t aes128_gcm_cipher_range[] = { +static odp_packet_data_range_t aes128_gcm_cipher_range[] = { { .offset = 12, .length = 72 }, { .offset = 8, .length = 64 }, { .offset = 8, .length = 64 }, { .offset = 12, .length = 28 }, }; -static odp_crypto_data_range_t aes128_gcm_auth_range[] = { +static odp_packet_data_range_t aes128_gcm_auth_range[] = { { .offset = 0, .length = 84 }, { .offset = 0, .length = 72 }, { .offset = 0, .length = 72 },
Hi Dmitry We are okay with proposed change. We will change compression interface accordingly. Any idea when is it planned to be accepted and merged in api-next.? Thanks Shally -----Original Message----- From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Verma, Shally Sent: 26 April 2017 16:53 To: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>; lng-odp@lists.linaro.org Cc: Challa, Mahipal <Mahipal.Challa@cavium.com>; Narayana, Prasad Athreya <PrasadAthreya.Narayana@cavium.com> Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet: introduce odp_packet_data_range_t -----Original Message----- From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Dmitry Eremin-Solenikov Sent: 25 April 2017 22:01 To: lng-odp@lists.linaro.org Subject: [lng-odp] [API-NEXT PATCH] api: packet: introduce odp_packet_data_range_t Rename odp_crypto_data_range_t to odp_packet_data_range_t, as it is relevant not only to the crypto interface. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> --- include/odp/api/spec/crypto.h | 17 +++++++---------- include/odp/api/spec/packet.h | 12 ++++++++++++ .../validation/api/crypto/odp_crypto_test_inp.c | 4 ++-- test/common_plat/validation/api/crypto/test_vectors.h | 4 ++-- 4 files changed, 23 insertions(+), 14 deletions(-) -- 2.11.0diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index d30f050f..c216c017 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -19,6 +19,8 @@ extern "C" { #endif +#include <odp/api/packet.h> + /** @defgroup odp_crypto ODP CRYPTO * Macros, enums, types and operations to utilise crypto. * @{ @@ -238,15 +240,10 @@ typedef struct odp_crypto_iv { /** * Crypto API data range specifier + * + * @deprecated Use odp_packet_data_range_t instead */ -typedef struct odp_crypto_data_range { - /** Offset from beginning of packet */ - uint32_t offset; - - /** Length of data to operate on */ - uint32_t length; - -} odp_crypto_data_range_t; +#define odp_crypto_data_range_t odp_packet_data_range_t This can be typedef odp_packet_data_range_t odp_crypto_data_range_t No other change to code should be required after this. Will get back on this after internal review. Thanks Shally /** * Crypto API session creation parameters @@ -365,10 +362,10 @@ typedef struct odp_crypto_op_param_t { uint32_t hash_result_offset; /** Data range to apply cipher */ - odp_crypto_data_range_t cipher_range; + odp_packet_data_range_t cipher_range; /** Data range to authenticate */ - odp_crypto_data_range_t auth_range; + odp_packet_data_range_t auth_range; } odp_crypto_op_param_t; diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 5439f234..95f5349b 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -71,6 +71,18 @@ extern "C" { * Packet is red */ +/** + * Packet API data range specifier + */ +typedef struct odp_packet_data_range { + /** Offset from beginning of packet */ + uint32_t offset; + + /** Length of data to operate on */ + uint32_t length; + +} odp_packet_data_range_t; + /* * * Alloc and free diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c index 42149ac6..dfd4f122 100644 --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c @@ -71,8 +71,8 @@ static void alg_test(odp_crypto_op_t op, odp_crypto_key_t cipher_key, odp_auth_alg_t auth_alg, odp_crypto_key_t auth_key, - odp_crypto_data_range_t *cipher_range, - odp_crypto_data_range_t *auth_range, + odp_packet_data_range_t *cipher_range, + odp_packet_data_range_t *auth_range, const uint8_t *plaintext, unsigned int plaintext_len, const uint8_t *ciphertext, diff --git a/test/common_plat/validation/api/crypto/test_vectors.h b/test/common_plat/validation/api/crypto/test_vectors.h index da4610f3..a1cf4faf 100644 --- a/test/common_plat/validation/api/crypto/test_vectors.h +++ b/test/common_plat/validation/api/crypto/test_vectors.h @@ -139,14 +139,14 @@ static uint8_t aes128_gcm_reference_iv[][AES128_GCM_IV_LEN] = { static uint32_t aes128_gcm_reference_length[] = { 84, 72, 72, 40}; -static odp_crypto_data_range_t aes128_gcm_cipher_range[] = { +static odp_packet_data_range_t aes128_gcm_cipher_range[] = { { .offset = 12, .length = 72 }, { .offset = 8, .length = 64 }, { .offset = 8, .length = 64 }, { .offset = 12, .length = 28 }, }; -static odp_crypto_data_range_t aes128_gcm_auth_range[] = { +static odp_packet_data_range_t aes128_gcm_auth_range[] = { { .offset = 0, .length = 84 }, { .offset = 0, .length = 72 }, { .offset = 0, .length = 72 },
Shally, I'm ok to merge it as soon as we will get agreement from everybody. For this patches we need Dmitry review as he started to work on it and Petri as api gate keeper. Maxim. On 2 May 2017 at 11:33, Verma, Shally <Shally.Verma@cavium.com> wrote: > Hi Dmitry > > We are okay with proposed change. We will change compression interface > accordingly. > Any idea when is it planned to be accepted and merged in api-next.? > > Thanks > Shally > > -----Original Message----- > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > Verma, Shally > Sent: 26 April 2017 16:53 > To: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>; > lng-odp@lists.linaro.org > Cc: Challa, Mahipal <Mahipal.Challa@cavium.com>; Narayana, Prasad Athreya > <PrasadAthreya.Narayana@cavium.com> > Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet: introduce > odp_packet_data_range_t > > > -----Original Message----- > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > Dmitry Eremin-Solenikov > Sent: 25 April 2017 22:01 > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [API-NEXT PATCH] api: packet: introduce > odp_packet_data_range_t > > Rename odp_crypto_data_range_t to odp_packet_data_range_t, as it is > relevant not only to the crypto interface. > > Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> > --- > include/odp/api/spec/crypto.h | 17 > +++++++---------- > include/odp/api/spec/packet.h | 12 ++++++++++++ > .../validation/api/crypto/odp_crypto_test_inp.c | 4 ++-- > test/common_plat/validation/api/crypto/test_vectors.h | 4 ++-- > 4 files changed, 23 insertions(+), 14 deletions(-) > > diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h > index d30f050f..c216c017 100644 > --- a/include/odp/api/spec/crypto.h > +++ b/include/odp/api/spec/crypto.h > @@ -19,6 +19,8 @@ > extern "C" { > #endif > > +#include <odp/api/packet.h> > + > /** @defgroup odp_crypto ODP CRYPTO > * Macros, enums, types and operations to utilise crypto. > * @{ > @@ -238,15 +240,10 @@ typedef struct odp_crypto_iv { > > /** > * Crypto API data range specifier > + * > + * @deprecated Use odp_packet_data_range_t instead > */ > -typedef struct odp_crypto_data_range { > - /** Offset from beginning of packet */ > - uint32_t offset; > - > - /** Length of data to operate on */ > - uint32_t length; > - > -} odp_crypto_data_range_t; > +#define odp_crypto_data_range_t odp_packet_data_range_t > > This can be typedef odp_packet_data_range_t odp_crypto_data_range_t No > other change to code should be required after this. > > Will get back on this after internal review. > Thanks > Shally > > /** > * Crypto API session creation parameters @@ -365,10 +362,10 @@ typedef > struct odp_crypto_op_param_t { > uint32_t hash_result_offset; > > /** Data range to apply cipher */ > - odp_crypto_data_range_t cipher_range; > + odp_packet_data_range_t cipher_range; > > /** Data range to authenticate */ > - odp_crypto_data_range_t auth_range; > + odp_packet_data_range_t auth_range; > > } odp_crypto_op_param_t; > > diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h > index 5439f234..95f5349b 100644 > --- a/include/odp/api/spec/packet.h > +++ b/include/odp/api/spec/packet.h > @@ -71,6 +71,18 @@ extern "C" { > * Packet is red > */ > > +/** > + * Packet API data range specifier > + */ > +typedef struct odp_packet_data_range { > + /** Offset from beginning of packet */ > + uint32_t offset; > + > + /** Length of data to operate on */ > + uint32_t length; > + > +} odp_packet_data_range_t; > + > /* > * > * Alloc and free > diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > index 42149ac6..dfd4f122 100644 > --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > @@ -71,8 +71,8 @@ static void alg_test(odp_crypto_op_t op, > odp_crypto_key_t cipher_key, > odp_auth_alg_t auth_alg, > odp_crypto_key_t auth_key, > - odp_crypto_data_range_t *cipher_range, > - odp_crypto_data_range_t *auth_range, > + odp_packet_data_range_t *cipher_range, > + odp_packet_data_range_t *auth_range, > const uint8_t *plaintext, > unsigned int plaintext_len, > const uint8_t *ciphertext, > diff --git a/test/common_plat/validation/api/crypto/test_vectors.h > b/test/common_plat/validation/api/crypto/test_vectors.h > index da4610f3..a1cf4faf 100644 > --- a/test/common_plat/validation/api/crypto/test_vectors.h > +++ b/test/common_plat/validation/api/crypto/test_vectors.h > @@ -139,14 +139,14 @@ static uint8_t aes128_gcm_reference_iv[][AES128_GCM_IV_LEN] > = { > > static uint32_t aes128_gcm_reference_length[] = { 84, 72, 72, 40}; > > -static odp_crypto_data_range_t aes128_gcm_cipher_range[] = { > +static odp_packet_data_range_t aes128_gcm_cipher_range[] = { > { .offset = 12, .length = 72 }, > { .offset = 8, .length = 64 }, > { .offset = 8, .length = 64 }, > { .offset = 12, .length = 28 }, > }; > > -static odp_crypto_data_range_t aes128_gcm_auth_range[] = { > +static odp_packet_data_range_t aes128_gcm_auth_range[] = { > { .offset = 0, .length = 84 }, > { .offset = 0, .length = 72 }, > { .offset = 0, .length = 72 }, > -- > 2.11.0 > >
I'm OK with it, but it needs to be rebased on top of the deprecated patch set (which is not yet in api-next) -Petri > -----Original Message----- > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Maxim > Uvarov > Sent: Tuesday, May 02, 2017 11:46 AM > To: Verma, Shally <Shally.Verma@cavium.com> > Cc: Challa, Mahipal <Mahipal.Challa@cavium.com>; Narayana, Prasad Athreya > <PrasadAthreya.Narayana@cavium.com>; lng-odp@lists.linaro.org > Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet: introduce > odp_packet_data_range_t > > Shally, I'm ok to merge it as soon as we will get agreement from > everybody. > For this patches we need Dmitry review as he started to work on it and > Petri as api gate keeper. > > Maxim. > > On 2 May 2017 at 11:33, Verma, Shally <Shally.Verma@cavium.com> wrote: > > > Hi Dmitry > > > > We are okay with proposed change. We will change compression interface > > accordingly. > > Any idea when is it planned to be accepted and merged in api-next.? > > > > Thanks > > Shally > > > > -----Original Message----- > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > > Verma, Shally > > Sent: 26 April 2017 16:53 > > To: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>; > > lng-odp@lists.linaro.org > > Cc: Challa, Mahipal <Mahipal.Challa@cavium.com>; Narayana, Prasad > Athreya > > <PrasadAthreya.Narayana@cavium.com> > > Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet: introduce > > odp_packet_data_range_t > > > > > > -----Original Message----- > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > > Dmitry Eremin-Solenikov > > Sent: 25 April 2017 22:01 > > To: lng-odp@lists.linaro.org > > Subject: [lng-odp] [API-NEXT PATCH] api: packet: introduce > > odp_packet_data_range_t > > > > Rename odp_crypto_data_range_t to odp_packet_data_range_t, as it is > > relevant not only to the crypto interface. > > > > Signed-off-by: Dmitry Eremin-Solenikov > <dmitry.ereminsolenikov@linaro.org> > > --- > > include/odp/api/spec/crypto.h | 17 > > +++++++---------- > > include/odp/api/spec/packet.h | 12 > ++++++++++++ > > .../validation/api/crypto/odp_crypto_test_inp.c | 4 ++-- > > test/common_plat/validation/api/crypto/test_vectors.h | 4 ++-- > > 4 files changed, 23 insertions(+), 14 deletions(-) > > > > diff --git a/include/odp/api/spec/crypto.h > b/include/odp/api/spec/crypto.h > > index d30f050f..c216c017 100644 > > --- a/include/odp/api/spec/crypto.h > > +++ b/include/odp/api/spec/crypto.h > > @@ -19,6 +19,8 @@ > > extern "C" { > > #endif > > > > +#include <odp/api/packet.h> > > + > > /** @defgroup odp_crypto ODP CRYPTO > > * Macros, enums, types and operations to utilise crypto. > > * @{ > > @@ -238,15 +240,10 @@ typedef struct odp_crypto_iv { > > > > /** > > * Crypto API data range specifier > > + * > > + * @deprecated Use odp_packet_data_range_t instead > > */ > > -typedef struct odp_crypto_data_range { > > - /** Offset from beginning of packet */ > > - uint32_t offset; > > - > > - /** Length of data to operate on */ > > - uint32_t length; > > - > > -} odp_crypto_data_range_t; > > +#define odp_crypto_data_range_t odp_packet_data_range_t > > > > This can be typedef odp_packet_data_range_t odp_crypto_data_range_t No > > other change to code should be required after this. > > > > Will get back on this after internal review. > > Thanks > > Shally > > > > /** > > * Crypto API session creation parameters @@ -365,10 +362,10 @@ typedef > > struct odp_crypto_op_param_t { > > uint32_t hash_result_offset; > > > > /** Data range to apply cipher */ > > - odp_crypto_data_range_t cipher_range; > > + odp_packet_data_range_t cipher_range; > > > > /** Data range to authenticate */ > > - odp_crypto_data_range_t auth_range; > > + odp_packet_data_range_t auth_range; > > > > } odp_crypto_op_param_t; > > > > diff --git a/include/odp/api/spec/packet.h > b/include/odp/api/spec/packet.h > > index 5439f234..95f5349b 100644 > > --- a/include/odp/api/spec/packet.h > > +++ b/include/odp/api/spec/packet.h > > @@ -71,6 +71,18 @@ extern "C" { > > * Packet is red > > */ > > > > +/** > > + * Packet API data range specifier > > + */ > > +typedef struct odp_packet_data_range { > > + /** Offset from beginning of packet */ > > + uint32_t offset; > > + > > + /** Length of data to operate on */ > > + uint32_t length; > > + > > +} odp_packet_data_range_t; > > + > > /* > > * > > * Alloc and free > > diff --git > a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > index 42149ac6..dfd4f122 100644 > > --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > @@ -71,8 +71,8 @@ static void alg_test(odp_crypto_op_t op, > > odp_crypto_key_t cipher_key, > > odp_auth_alg_t auth_alg, > > odp_crypto_key_t auth_key, > > - odp_crypto_data_range_t *cipher_range, > > - odp_crypto_data_range_t *auth_range, > > + odp_packet_data_range_t *cipher_range, > > + odp_packet_data_range_t *auth_range, > > const uint8_t *plaintext, > > unsigned int plaintext_len, > > const uint8_t *ciphertext, > > diff --git a/test/common_plat/validation/api/crypto/test_vectors.h > > b/test/common_plat/validation/api/crypto/test_vectors.h > > index da4610f3..a1cf4faf 100644 > > --- a/test/common_plat/validation/api/crypto/test_vectors.h > > +++ b/test/common_plat/validation/api/crypto/test_vectors.h > > @@ -139,14 +139,14 @@ static uint8_t > aes128_gcm_reference_iv[][AES128_GCM_IV_LEN] > > = { > > > > static uint32_t aes128_gcm_reference_length[] = { 84, 72, 72, 40}; > > > > -static odp_crypto_data_range_t aes128_gcm_cipher_range[] = { > > +static odp_packet_data_range_t aes128_gcm_cipher_range[] = { > > { .offset = 12, .length = 72 }, > > { .offset = 8, .length = 64 }, > > { .offset = 8, .length = 64 }, > > { .offset = 12, .length = 28 }, > > }; > > > > -static odp_crypto_data_range_t aes128_gcm_auth_range[] = { > > +static odp_packet_data_range_t aes128_gcm_auth_range[] = { > > { .offset = 0, .length = 84 }, > > { .offset = 0, .length = 72 }, > > { .offset = 0, .length = 72 }, > > -- > > 2.11.0 > > > >
On Tue, May 2, 2017 at 6:59 AM, Savolainen, Petri (Nokia - FI/Espoo) < petri.savolainen@nokia.com> wrote: > I'm OK with it, but it needs to be rebased on top of the deprecated patch > set (which is not yet in api-next) > I'd like to close the topic of the deprecation patch at today's ODP call. As stated last week, I view this is reasonable infrastructure to have in place. How we choose to make use of it will be a separate discussion in each case of proposed deprecation, but the infrastructure by itself seems valuable as it's just providing us with tools to deprecate in a well-defined manner. > > -Petri > > > > -----Original Message----- > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > Maxim > > Uvarov > > Sent: Tuesday, May 02, 2017 11:46 AM > > To: Verma, Shally <Shally.Verma@cavium.com> > > Cc: Challa, Mahipal <Mahipal.Challa@cavium.com>; Narayana, Prasad > Athreya > > <PrasadAthreya.Narayana@cavium.com>; lng-odp@lists.linaro.org > > Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet: introduce > > odp_packet_data_range_t > > > > Shally, I'm ok to merge it as soon as we will get agreement from > > everybody. > > For this patches we need Dmitry review as he started to work on it and > > Petri as api gate keeper. > > > > Maxim. > > > > On 2 May 2017 at 11:33, Verma, Shally <Shally.Verma@cavium.com> wrote: > > > > > Hi Dmitry > > > > > > We are okay with proposed change. We will change compression interface > > > accordingly. > > > Any idea when is it planned to be accepted and merged in api-next.? > > > > > > Thanks > > > Shally > > > > > > -----Original Message----- > > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > > > Verma, Shally > > > Sent: 26 April 2017 16:53 > > > To: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>; > > > lng-odp@lists.linaro.org > > > Cc: Challa, Mahipal <Mahipal.Challa@cavium.com>; Narayana, Prasad > > Athreya > > > <PrasadAthreya.Narayana@cavium.com> > > > Subject: Re: [lng-odp] [API-NEXT PATCH] api: packet: introduce > > > odp_packet_data_range_t > > > > > > > > > -----Original Message----- > > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of > > > Dmitry Eremin-Solenikov > > > Sent: 25 April 2017 22:01 > > > To: lng-odp@lists.linaro.org > > > Subject: [lng-odp] [API-NEXT PATCH] api: packet: introduce > > > odp_packet_data_range_t > > > > > > Rename odp_crypto_data_range_t to odp_packet_data_range_t, as it is > > > relevant not only to the crypto interface. > > > > > > Signed-off-by: Dmitry Eremin-Solenikov > > <dmitry.ereminsolenikov@linaro.org> > > > --- > > > include/odp/api/spec/crypto.h | 17 > > > +++++++---------- > > > include/odp/api/spec/packet.h | 12 > > ++++++++++++ > > > .../validation/api/crypto/odp_crypto_test_inp.c | 4 ++-- > > > test/common_plat/validation/api/crypto/test_vectors.h | 4 ++-- > > > 4 files changed, 23 insertions(+), 14 deletions(-) > > > > > > diff --git a/include/odp/api/spec/crypto.h > > b/include/odp/api/spec/crypto.h > > > index d30f050f..c216c017 100644 > > > --- a/include/odp/api/spec/crypto.h > > > +++ b/include/odp/api/spec/crypto.h > > > @@ -19,6 +19,8 @@ > > > extern "C" { > > > #endif > > > > > > +#include <odp/api/packet.h> > > > + > > > /** @defgroup odp_crypto ODP CRYPTO > > > * Macros, enums, types and operations to utilise crypto. > > > * @{ > > > @@ -238,15 +240,10 @@ typedef struct odp_crypto_iv { > > > > > > /** > > > * Crypto API data range specifier > > > + * > > > + * @deprecated Use odp_packet_data_range_t instead > > > */ > > > -typedef struct odp_crypto_data_range { > > > - /** Offset from beginning of packet */ > > > - uint32_t offset; > > > - > > > - /** Length of data to operate on */ > > > - uint32_t length; > > > - > > > -} odp_crypto_data_range_t; > > > +#define odp_crypto_data_range_t odp_packet_data_range_t > > > > > > This can be typedef odp_packet_data_range_t odp_crypto_data_range_t No > > > other change to code should be required after this. > > > > > > Will get back on this after internal review. > > > Thanks > > > Shally > > > > > > /** > > > * Crypto API session creation parameters @@ -365,10 +362,10 @@ > typedef > > > struct odp_crypto_op_param_t { > > > uint32_t hash_result_offset; > > > > > > /** Data range to apply cipher */ > > > - odp_crypto_data_range_t cipher_range; > > > + odp_packet_data_range_t cipher_range; > > > > > > /** Data range to authenticate */ > > > - odp_crypto_data_range_t auth_range; > > > + odp_packet_data_range_t auth_range; > > > > > > } odp_crypto_op_param_t; > > > > > > diff --git a/include/odp/api/spec/packet.h > > b/include/odp/api/spec/packet.h > > > index 5439f234..95f5349b 100644 > > > --- a/include/odp/api/spec/packet.h > > > +++ b/include/odp/api/spec/packet.h > > > @@ -71,6 +71,18 @@ extern "C" { > > > * Packet is red > > > */ > > > > > > +/** > > > + * Packet API data range specifier > > > + */ > > > +typedef struct odp_packet_data_range { > > > + /** Offset from beginning of packet */ > > > + uint32_t offset; > > > + > > > + /** Length of data to operate on */ > > > + uint32_t length; > > > + > > > +} odp_packet_data_range_t; > > > + > > > /* > > > * > > > * Alloc and free > > > diff --git > > a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > > b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > > index 42149ac6..dfd4f122 100644 > > > --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > > +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c > > > @@ -71,8 +71,8 @@ static void alg_test(odp_crypto_op_t op, > > > odp_crypto_key_t cipher_key, > > > odp_auth_alg_t auth_alg, > > > odp_crypto_key_t auth_key, > > > - odp_crypto_data_range_t *cipher_range, > > > - odp_crypto_data_range_t *auth_range, > > > + odp_packet_data_range_t *cipher_range, > > > + odp_packet_data_range_t *auth_range, > > > const uint8_t *plaintext, > > > unsigned int plaintext_len, > > > const uint8_t *ciphertext, > > > diff --git a/test/common_plat/validation/api/crypto/test_vectors.h > > > b/test/common_plat/validation/api/crypto/test_vectors.h > > > index da4610f3..a1cf4faf 100644 > > > --- a/test/common_plat/validation/api/crypto/test_vectors.h > > > +++ b/test/common_plat/validation/api/crypto/test_vectors.h > > > @@ -139,14 +139,14 @@ static uint8_t > > aes128_gcm_reference_iv[][AES128_GCM_IV_LEN] > > > = { > > > > > > static uint32_t aes128_gcm_reference_length[] = { 84, 72, 72, 40}; > > > > > > -static odp_crypto_data_range_t aes128_gcm_cipher_range[] = { > > > +static odp_packet_data_range_t aes128_gcm_cipher_range[] = { > > > { .offset = 12, .length = 72 }, > > > { .offset = 8, .length = 64 }, > > > { .offset = 8, .length = 64 }, > > > { .offset = 12, .length = 28 }, > > > }; > > > > > > -static odp_crypto_data_range_t aes128_gcm_auth_range[] = { > > > +static odp_packet_data_range_t aes128_gcm_auth_range[] = { > > > { .offset = 0, .length = 84 }, > > > { .offset = 0, .length = 72 }, > > > { .offset = 0, .length = 72 }, > > > -- > > > 2.11.0 > > > > > > >
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index d30f050f..c216c017 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -19,6 +19,8 @@ extern "C" { #endif +#include <odp/api/packet.h> + /** @defgroup odp_crypto ODP CRYPTO * Macros, enums, types and operations to utilise crypto. * @{ @@ -238,15 +240,10 @@ typedef struct odp_crypto_iv { /** * Crypto API data range specifier + * + * @deprecated Use odp_packet_data_range_t instead */ -typedef struct odp_crypto_data_range { - /** Offset from beginning of packet */ - uint32_t offset; - - /** Length of data to operate on */ - uint32_t length; - -} odp_crypto_data_range_t; +#define odp_crypto_data_range_t odp_packet_data_range_t /** * Crypto API session creation parameters @@ -365,10 +362,10 @@ typedef struct odp_crypto_op_param_t { uint32_t hash_result_offset; /** Data range to apply cipher */ - odp_crypto_data_range_t cipher_range; + odp_packet_data_range_t cipher_range; /** Data range to authenticate */ - odp_crypto_data_range_t auth_range; + odp_packet_data_range_t auth_range; } odp_crypto_op_param_t; diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 5439f234..95f5349b 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -71,6 +71,18 @@ extern "C" { * Packet is red */ +/** + * Packet API data range specifier + */ +typedef struct odp_packet_data_range { + /** Offset from beginning of packet */ + uint32_t offset; + + /** Length of data to operate on */ + uint32_t length; + +} odp_packet_data_range_t; + /* * * Alloc and free diff --git a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c index 42149ac6..dfd4f122 100644 --- a/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/common_plat/validation/api/crypto/odp_crypto_test_inp.c @@ -71,8 +71,8 @@ static void alg_test(odp_crypto_op_t op, odp_crypto_key_t cipher_key, odp_auth_alg_t auth_alg, odp_crypto_key_t auth_key, - odp_crypto_data_range_t *cipher_range, - odp_crypto_data_range_t *auth_range, + odp_packet_data_range_t *cipher_range, + odp_packet_data_range_t *auth_range, const uint8_t *plaintext, unsigned int plaintext_len, const uint8_t *ciphertext, diff --git a/test/common_plat/validation/api/crypto/test_vectors.h b/test/common_plat/validation/api/crypto/test_vectors.h index da4610f3..a1cf4faf 100644 --- a/test/common_plat/validation/api/crypto/test_vectors.h +++ b/test/common_plat/validation/api/crypto/test_vectors.h @@ -139,14 +139,14 @@ static uint8_t aes128_gcm_reference_iv[][AES128_GCM_IV_LEN] = { static uint32_t aes128_gcm_reference_length[] = { 84, 72, 72, 40}; -static odp_crypto_data_range_t aes128_gcm_cipher_range[] = { +static odp_packet_data_range_t aes128_gcm_cipher_range[] = { { .offset = 12, .length = 72 }, { .offset = 8, .length = 64 }, { .offset = 8, .length = 64 }, { .offset = 12, .length = 28 }, }; -static odp_crypto_data_range_t aes128_gcm_auth_range[] = { +static odp_packet_data_range_t aes128_gcm_auth_range[] = { { .offset = 0, .length = 84 }, { .offset = 0, .length = 72 }, { .offset = 0, .length = 72 },
Rename odp_crypto_data_range_t to odp_packet_data_range_t, as it is relevant not only to the crypto interface. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> --- include/odp/api/spec/crypto.h | 17 +++++++---------- include/odp/api/spec/packet.h | 12 ++++++++++++ .../validation/api/crypto/odp_crypto_test_inp.c | 4 ++-- test/common_plat/validation/api/crypto/test_vectors.h | 4 ++-- 4 files changed, 23 insertions(+), 14 deletions(-) -- 2.11.0