This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via ad990bbf88d95b2a4f9583b7fda718bf5d7d4212 (commit) via d6be400839611af3ca47baa85e8fed12d0c87e29 (commit) via d2a70019d5fb5443f80a4896dd30b710d3988e8e (commit) via 2526489e826f49dede472782621c0e0ba8976745 (commit) via 8ff99a64d79b6e3e350037575b9d5bc9adeca267 (commit) from 4cb02e1caccb9179575e95448fd46979e17d0905 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit ad990bbf88d95b2a4f9583b7fda718bf5d7d4212 Author: Petri Savolainen petri.savolainen@linaro.org Date: Fri Nov 24 14:17:16 2017 +0200
validation: time: test odp_time_diff_ns
Added tests for the new time difference in nsec function.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/api/time/time.c b/test/validation/api/time/time.c index ef137257..c8f90dba 100644 --- a/test/validation/api/time/time.c +++ b/test/validation/api/time/time.c @@ -201,7 +201,8 @@ static void time_test_diff(time_cb time_cur, /* volatile to stop optimization of busy loop */ volatile int count = 0; odp_time_t diff, t1, t2; - uint64_t nsdiff, ns1, ns2, ns; + uint64_t ns1, ns2, ns; + uint64_t nsdiff, diff_ns; uint64_t upper_limit, lower_limit;
/* test timestamp diff */ @@ -217,6 +218,9 @@ static void time_test_diff(time_cb time_cur, diff = odp_time_diff(t2, t1); CU_ASSERT(odp_time_cmp(diff, ODP_TIME_NULL) > 0);
+ diff_ns = odp_time_diff_ns(t2, t1); + CU_ASSERT(diff_ns > 0); + ns1 = odp_time_to_ns(t1); ns2 = odp_time_to_ns(t2); ns = ns2 - ns1; @@ -225,6 +229,7 @@ static void time_test_diff(time_cb time_cur, upper_limit = ns + 2 * res; lower_limit = ns - 2 * res; CU_ASSERT((nsdiff <= upper_limit) && (nsdiff >= lower_limit)); + CU_ASSERT((diff_ns <= upper_limit) && (diff_ns >= lower_limit));
/* test timestamp and interval diff */ ns1 = 54; @@ -233,11 +238,16 @@ static void time_test_diff(time_cb time_cur,
diff = odp_time_diff(t2, t1); CU_ASSERT(odp_time_cmp(diff, ODP_TIME_NULL) > 0); + + diff_ns = odp_time_diff_ns(t2, t1); + CU_ASSERT(diff_ns > 0); + nsdiff = odp_time_to_ns(diff);
upper_limit = ns + 2 * res; lower_limit = ns - 2 * res; CU_ASSERT((nsdiff <= upper_limit) && (nsdiff >= lower_limit)); + CU_ASSERT((diff_ns <= upper_limit) && (diff_ns >= lower_limit));
/* test interval diff */ ns2 = 60 * 10 * ODP_TIME_SEC_IN_NS; @@ -246,11 +256,16 @@ static void time_test_diff(time_cb time_cur, t2 = time_from_ns(ns2); diff = odp_time_diff(t2, t1); CU_ASSERT(odp_time_cmp(diff, ODP_TIME_NULL) > 0); + + diff_ns = odp_time_diff_ns(t2, t1); + CU_ASSERT(diff_ns > 0); + nsdiff = odp_time_to_ns(diff);
upper_limit = ns + 2 * res; lower_limit = ns - 2 * res; CU_ASSERT((nsdiff <= upper_limit) && (nsdiff >= lower_limit)); + CU_ASSERT((diff_ns <= upper_limit) && (diff_ns >= lower_limit));
/* same time has to diff to 0 */ diff = odp_time_diff(t2, t2); @@ -258,6 +273,9 @@ static void time_test_diff(time_cb time_cur,
diff = odp_time_diff(t2, ODP_TIME_NULL); CU_ASSERT(odp_time_cmp(t2, diff) == 0); + + diff_ns = odp_time_diff_ns(t2, t2); + CU_ASSERT(diff_ns == 0); }
void time_test_local_diff(void)
commit d6be400839611af3ca47baa85e8fed12d0c87e29 Author: Petri Savolainen petri.savolainen@linaro.org Date: Fri Nov 24 14:07:56 2017 +0200
linux-gen: time: implement odp_time_diff_ns
Implemented the new diff in nsec function.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index 0df4682c..04fedf5f 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -228,6 +228,15 @@ odp_time_t odp_time_diff(odp_time_t t2, odp_time_t t1) return time; }
+uint64_t odp_time_diff_ns(odp_time_t t2, odp_time_t t1) +{ + odp_time_t time; + + time.u64 = t2.u64 - t1.u64; + + return time_to_ns(time); +} + uint64_t odp_time_to_ns(odp_time_t time) { return time_to_ns(time);
commit d2a70019d5fb5443f80a4896dd30b710d3988e8e Author: Petri Savolainen petri.savolainen@linaro.org Date: Fri Nov 24 14:00:28 2017 +0200
api: time: time difference in nsec
Added function which returns time difference in nanoseconds. This short cuts a common pattern...
t1 = odp_time_global(); foo(); t2 = odp_time_global(); printf("foo() takes %u nsec\n", odp_time_diff_ns(t2, t1);
... by combining convert and diff functions.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/time.h b/include/odp/api/spec/time.h index 29175eb5..50082f53 100644 --- a/include/odp/api/spec/time.h +++ b/include/odp/api/spec/time.h @@ -76,6 +76,16 @@ odp_time_t odp_time_global(void); */ odp_time_t odp_time_diff(odp_time_t t2, odp_time_t t1);
+/** + * Time difference in nanoseconds + * + * @param t2 Second time stamp + * @param t1 First time stamp + * + * @return Difference of time stamps (t2 - t1) in nanoseconds + */ +uint64_t odp_time_diff_ns(odp_time_t t2, odp_time_t t1); + /** * Time sum *
commit 2526489e826f49dede472782621c0e0ba8976745 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Nov 28 16:26:10 2017 +0300
api: linux-gen: ipsec: constify in/out params
Mark all input and out params as constants
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 0be9664e..d57815ed 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1027,13 +1027,13 @@ typedef struct odp_ipsec_out_param_t { int num_opt;
/** Pointer to an array of IPSEC SAs */ - odp_ipsec_sa_t *sa; + const odp_ipsec_sa_t *sa;
/** Pointer to an array of outbound operation options * * May be NULL when num_opt is zero. */ - odp_ipsec_out_opt_t *opt; + const odp_ipsec_out_opt_t *opt;
} odp_ipsec_out_param_t;
@@ -1061,7 +1061,7 @@ typedef struct odp_ipsec_in_param_t { * * May be NULL when num_sa is zero. */ - odp_ipsec_sa_t *sa; + const odp_ipsec_sa_t *sa;
} odp_ipsec_in_param_t;
diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c index b17e4cd7..18ae8ece 100644 --- a/platform/linux-generic/odp_ipsec.c +++ b/platform/linux-generic/odp_ipsec.c @@ -582,7 +582,7 @@ uint32_t ipsec_seq_no(ipsec_sa_t *ipsec_sa) static ipsec_sa_t *ipsec_out_single(odp_packet_t pkt, odp_ipsec_sa_t sa, odp_packet_t *pkt_out, - odp_ipsec_out_opt_t *opt ODP_UNUSED, + const odp_ipsec_out_opt_t *opt ODP_UNUSED, odp_ipsec_op_status_t *status) { ipsec_sa_t *ipsec_sa = NULL; @@ -998,7 +998,7 @@ int odp_ipsec_in(const odp_packet_t pkt_in[], int num_in, return in_pkt; }
-static odp_ipsec_out_opt_t default_opt = { +static const odp_ipsec_out_opt_t default_opt = { .mode = ODP_IPSEC_FRAG_DISABLED, };
@@ -1022,7 +1022,7 @@ int odp_ipsec_out(const odp_packet_t pkt_in[], int num_in, odp_ipsec_sa_t sa; ipsec_sa_t *ipsec_sa; odp_ipsec_packet_result_t *result; - odp_ipsec_out_opt_t *opt; + const odp_ipsec_out_opt_t *opt;
memset(&status, 0, sizeof(status));
@@ -1130,7 +1130,7 @@ int odp_ipsec_out_enq(const odp_packet_t pkt_in[], int num_in, odp_ipsec_sa_t sa; ipsec_sa_t *ipsec_sa; odp_ipsec_packet_result_t *result; - odp_ipsec_out_opt_t *opt; + const odp_ipsec_out_opt_t *opt; odp_queue_t queue;
memset(&status, 0, sizeof(status)); @@ -1222,7 +1222,7 @@ int odp_ipsec_out_inline(const odp_packet_t pkt_in[], int num_in, odp_ipsec_sa_t sa; ipsec_sa_t *ipsec_sa; odp_ipsec_packet_result_t *result; - odp_ipsec_out_opt_t *opt; + const odp_ipsec_out_opt_t *opt; uint32_t hdr_len, offset; const void *ptr;
commit 8ff99a64d79b6e3e350037575b9d5bc9adeca267 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Nov 28 15:37:18 2017 +0300
api: ipsec: add capabilities for fragmentation support
It is expected that implementation can support any combination of fragmentatation (after, before, both or none). Add capabilities to report such support to application.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Reviewed-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index 4a33af8e..0be9664e 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -260,6 +260,12 @@ typedef struct odp_ipsec_capability_t { /** IP Authenticated Header (ODP_IPSEC_AH) support */ odp_support_t proto_ah;
+ /** Fragment after IPsec support */ + odp_support_t frag_after; + + /** Fragment before IPsec support */ + odp_support_t frag_before; + /** * Support of pipelined classification (ODP_IPSEC_PIPELINE_CLS) of * resulting inbound packets
-----------------------------------------------------------------------
Summary of changes: include/odp/api/spec/ipsec.h | 12 +++++++++--- include/odp/api/spec/time.h | 10 ++++++++++ platform/linux-generic/odp_ipsec.c | 10 +++++----- platform/linux-generic/odp_time.c | 9 +++++++++ test/validation/api/time/time.c | 20 +++++++++++++++++++- 5 files changed, 52 insertions(+), 9 deletions(-)
hooks/post-receive