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, master has been updated via 3e3a204764ee055acb3f0ff0feff39a653362c38 (commit) via f21fc80503c72ebbd0e3286f708c7019567f8a8b (commit) via c9e8517c4945acf2c5215e0872779f00357649cf (commit) from f1e216da9011444789da716bbc258e530897da6d (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 3e3a204764ee055acb3f0ff0feff39a653362c38 Author: Petri Savolainen petri.savolainen@nokia.com Date: Tue Nov 5 16:10:23 2019 +0200
linux-gen: event: inline odp_event_type_multi()
Inline event_type_multi function. Event type functions are performance critical as those are typically used after every schedule call.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/platform/linux-generic/include/odp/api/plat/event_inlines.h b/platform/linux-generic/include/odp/api/plat/event_inlines.h index fbecd2c14..43ee5e09a 100644 --- a/platform/linux-generic/include/odp/api/plat/event_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/event_inlines.h @@ -18,11 +18,12 @@ extern const _odp_buffer_inline_offset_t _odp_buffer_inline_offset; /* Inline functions by default */ #define _ODP_INLINE static inline #define odp_event_type __odp_event_type + #define odp_event_type_multi __odp_event_type_multi #else #define _ODP_INLINE #endif
-_ODP_INLINE odp_event_type_t odp_event_type(odp_event_t event) +static inline odp_event_type_t __odp_event_type_get(odp_event_t event) { int8_t type; odp_buffer_t buf = (odp_buffer_t)event; @@ -32,6 +33,27 @@ _ODP_INLINE odp_event_type_t odp_event_type(odp_event_t event) return (odp_event_type_t)type; }
+_ODP_INLINE odp_event_type_t odp_event_type(odp_event_t event) +{ + return __odp_event_type_get(event); +} + +_ODP_INLINE int odp_event_type_multi(const odp_event_t event[], int num, + odp_event_type_t *type_out) +{ + int i; + odp_event_type_t type = __odp_event_type_get(event[0]); + + for (i = 1; i < num; i++) { + if (__odp_event_type_get(event[i]) != type) + break; + } + + *type_out = type; + + return i; +} + /** @endcond */
#endif diff --git a/platform/linux-generic/odp_event.c b/platform/linux-generic/odp_event.c index 6f6b3aa0b..677cd0dde 100644 --- a/platform/linux-generic/odp_event.c +++ b/platform/linux-generic/odp_event.c @@ -41,22 +41,6 @@ odp_event_type_t odp_event_types(odp_event_t event, return event_type; }
-int odp_event_type_multi(const odp_event_t event[], int num, - odp_event_type_t *type_out) -{ - int i; - odp_event_type_t type = odp_event_type(event[0]); - - for (i = 1; i < num; i++) { - if (odp_event_type(event[i]) != type) - break; - } - - *type_out = type; - - return i; -} - uint32_t odp_event_flow_id(odp_event_t event) { return event_flow_id(event);
commit f21fc80503c72ebbd0e3286f708c7019567f8a8b Author: Petri Savolainen petri.savolainen@nokia.com Date: Tue Nov 5 15:51:46 2019 +0200
linux-gen: buffer: inline odp_buffer_addr()
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/platform/linux-generic/include/odp/api/plat/buffer_inline_types.h b/platform/linux-generic/include/odp/api/plat/buffer_inline_types.h index 29f49f8db..f59df6705 100644 --- a/platform/linux-generic/include/odp/api/plat/buffer_inline_types.h +++ b/platform/linux-generic/include/odp/api/plat/buffer_inline_types.h @@ -23,6 +23,7 @@ extern "C" { /* Buffer header field offsets for inline functions */ typedef struct _odp_buffer_inline_offset_t { uint16_t event_type; + uint16_t base_data;
} _odp_buffer_inline_offset_t;
diff --git a/platform/linux-generic/include/odp/api/plat/buffer_inlines.h b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h index 89920510c..632ba0e69 100644 --- a/platform/linux-generic/include/odp/api/plat/buffer_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h @@ -21,6 +21,7 @@ extern const _odp_buffer_inline_offset_t _odp_buffer_inline_offset; #define _ODP_INLINE static inline #define odp_buffer_from_event __odp_buffer_from_event #define odp_buffer_to_event __odp_buffer_to_event + #define odp_buffer_addr __odp_buffer_addr #else #define _ODP_INLINE #endif @@ -35,6 +36,11 @@ _ODP_INLINE odp_event_t odp_buffer_to_event(odp_buffer_t buf) return (odp_event_t)buf; }
+_ODP_INLINE void *odp_buffer_addr(odp_buffer_t buf) +{ + return _odp_buf_hdr_field(buf, void *, base_data); +} + /** @endcond */
#endif diff --git a/platform/linux-generic/odp_buffer.c b/platform/linux-generic/odp_buffer.c index 0001e598b..4c5e72640 100644 --- a/platform/linux-generic/odp_buffer.c +++ b/platform/linux-generic/odp_buffer.c @@ -20,18 +20,12 @@ /* Fill in buffer header field offsets for inline functions */ const _odp_buffer_inline_offset_t ODP_ALIGNED_CACHE _odp_buffer_inline_offset = { - .event_type = offsetof(odp_buffer_hdr_t, event_type) + .event_type = offsetof(odp_buffer_hdr_t, event_type), + .base_data = offsetof(odp_buffer_hdr_t, base_data) };
#include <odp/visibility_end.h>
-void *odp_buffer_addr(odp_buffer_t buf) -{ - odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf); - - return hdr->base_data; -} - uint32_t odp_buffer_size(odp_buffer_t buf) { odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf);
commit c9e8517c4945acf2c5215e0872779f00357649cf Author: Petri Savolainen petri.savolainen@nokia.com Date: Tue Nov 5 15:28:16 2019 +0200
linux-gen: buffer: inline event handle conversions
Inlined API functions which convert buffer handle to/from event handle.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 0d15e53d9..58c3f4244 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -28,6 +28,7 @@ odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ include/odp/api/plat/atomic_inlines.h \ include/odp/api/plat/buffer_inline_types.h \ + include/odp/api/plat/buffer_inlines.h \ include/odp/api/plat/byteorder_inlines.h \ include/odp/api/plat/cpu_inlines.h \ include/odp/api/plat/event_inlines.h \ @@ -238,6 +239,7 @@ endif if ODP_ABI_COMPAT __LIB__libodp_linux_la_SOURCES += \ odp_atomic_api.c \ + odp_buffer_api.c \ odp_byteorder_api.c \ odp_cpu_api.c \ odp_event_api.c \ diff --git a/platform/linux-generic/include-abi/odp/api/abi/buffer.h b/platform/linux-generic/include-abi/odp/api/abi/buffer.h index 60292d502..8239e15da 100644 --- a/platform/linux-generic/include-abi/odp/api/abi/buffer.h +++ b/platform/linux-generic/include-abi/odp/api/abi/buffer.h @@ -28,6 +28,9 @@ typedef ODP_HANDLE_T(odp_buffer_t);
#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0)
+/* Inlined functions for non-ABI compat mode */ +#include <odp/api/plat/buffer_inlines.h> + /** * @} */ diff --git a/platform/linux-generic/include/odp/api/plat/buffer_inlines.h b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h new file mode 100644 index 000000000..89920510c --- /dev/null +++ b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2019, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PLAT_BUFFER_INLINES_H_ +#define ODP_PLAT_BUFFER_INLINES_H_ + +#include <odp/api/abi/buffer.h> +#include <odp/api/abi/event.h> + +#include <odp/api/plat/buffer_inline_types.h> + +/** @cond _ODP_HIDE_FROM_DOXYGEN_ */ + +extern const _odp_buffer_inline_offset_t _odp_buffer_inline_offset; + +#ifndef _ODP_NO_INLINE + /* Inline functions by default */ + #define _ODP_INLINE static inline + #define odp_buffer_from_event __odp_buffer_from_event + #define odp_buffer_to_event __odp_buffer_to_event +#else + #define _ODP_INLINE +#endif + +_ODP_INLINE odp_buffer_t odp_buffer_from_event(odp_event_t ev) +{ + return (odp_buffer_t)ev; +} + +_ODP_INLINE odp_event_t odp_buffer_to_event(odp_buffer_t buf) +{ + return (odp_event_t)buf; +} + +/** @endcond */ + +#endif diff --git a/platform/linux-generic/odp_buffer.c b/platform/linux-generic/odp_buffer.c index f39f76a57..0001e598b 100644 --- a/platform/linux-generic/odp_buffer.c +++ b/platform/linux-generic/odp_buffer.c @@ -25,16 +25,6 @@ _odp_buffer_inline_offset = {
#include <odp/visibility_end.h>
-odp_buffer_t odp_buffer_from_event(odp_event_t ev) -{ - return (odp_buffer_t)ev; -} - -odp_event_t odp_buffer_to_event(odp_buffer_t buf) -{ - return (odp_event_t)buf; -} - void *odp_buffer_addr(odp_buffer_t buf) { odp_buffer_hdr_t *hdr = buf_hdl_to_hdr(buf); diff --git a/platform/linux-generic/odp_buffer_api.c b/platform/linux-generic/odp_buffer_api.c new file mode 100644 index 000000000..01f99b158 --- /dev/null +++ b/platform/linux-generic/odp_buffer_api.c @@ -0,0 +1,11 @@ +/* Copyright (c) 2019, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <odp/api/buffer.h> + +/* Non-inlined functions for ABI compat mode */ +#define _ODP_NO_INLINE +#include <odp/api/plat/buffer_inlines.h>
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/Makefile.am | 2 + .../linux-generic/include-abi/odp/api/abi/buffer.h | 3 ++ .../include/odp/api/plat/buffer_inline_types.h | 1 + .../include/odp/api/plat/buffer_inlines.h | 46 ++++++++++++++++++++++ .../include/odp/api/plat/event_inlines.h | 24 ++++++++++- platform/linux-generic/odp_buffer.c | 20 +--------- .../{odp_cpu_api.c => odp_buffer_api.c} | 6 +-- platform/linux-generic/odp_event.c | 16 -------- 8 files changed, 80 insertions(+), 38 deletions(-) create mode 100644 platform/linux-generic/include/odp/api/plat/buffer_inlines.h copy platform/linux-generic/{odp_cpu_api.c => odp_buffer_api.c} (59%)
hooks/post-receive