Skip to content

Commit 0712bbd

Browse files
committed
Event Machine (EM) on ODP v3.6.0
See changes in CHANGE_NOTES, README and include/event_machine/README_API
1 parent 1af46d6 commit 0712bbd

File tree

133 files changed

+7530
-2664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+7530
-2664
lines changed

.github/workflows/ci-pipeline.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout EM-ODP
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
# Full git history is needed to get a proper list of changed files
1919
# within `super-linter`
@@ -35,7 +35,7 @@ jobs:
3535
Build-Doxygen:
3636
runs-on: ubuntu-20.04
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- name: Install dependencies
4040
run: |
4141
sudo apt-get update
@@ -62,7 +62,7 @@ jobs:
6262
sudo apt-get install libcli-dev
6363
sudo apt-get install telnet
6464
- name: Checkout EM-ODP
65-
uses: actions/checkout@v3
65+
uses: actions/checkout@v4
6666
- name: Build EM-ODP
6767
run: ./scripts/build.sh
6868
- name: Run Robot Tests
@@ -74,7 +74,7 @@ jobs:
7474
Cross-Compile-for-arm64:
7575
runs-on: ubuntu-20.04
7676
steps:
77-
- uses: actions/checkout@v3
77+
- uses: actions/checkout@v4
7878
- name: Cross-compile EM-ODP for arm64
7979
run: >
8080
sudo docker run

.github/workflows/gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
Documentation:
1515
runs-on: ubuntu-20.04
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Install dependencies
1919
run: |
2020
sudo apt-get update

CHANGE_NOTES

+82-9
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,78 @@ Examples:
5252
- See em-odp/README for usage and compilation instructions.
5353
- See em-odp/include/event_machine/README_API for API changes
5454

55+
--------------------------------------------------------------------------------
56+
Event Machine (EM) on ODP v3.6.0
57+
--------------------------------------------------------------------------------
58+
- Support for EM API v3.6 (em-odp/include/),
59+
see API additions and changes in em-odp/include/event_machine/README_API.
60+
Summary:
61+
* Packet event APIs: new API module for manipulation of packet events
62+
* Timer API: moved from add-ons to the base EM API
63+
* Event: em_event_pointer_and_size()
64+
* Deprecation macros/defines
65+
66+
- Add support for using ODP API 1.45
67+
Update EM to be able to run against ODP API v1.45.
68+
69+
- Deprecated EM API enable/disable configuration option
70+
- Add a new configure-script option that enables/disables decprecated EM APIs.
71+
Old EM APIs can be deprecated in new EM releases through the use of
72+
deprecation macros and defines found in event_machine_deprecated.h(.in)
73+
(additionally see include/event_machine/README_API for API v3.6 description
74+
of deprecation macros).
75+
The deprecation of an API will cause any use of it to fail the compilation.
76+
The user may, however, decide to enable the deprecated APIs (by using
77+
--enable-deprecated) during a transition period until the deprecated API
78+
usage has been replaced.
79+
80+
configure.ac:
81+
-------------
82+
New configure option:
83+
--enable-deprecated enable deprecated EM API definitions [default=disabled]
84+
85+
- Event State Verification (ESV) changes
86+
- Added ESV compile-time vs. runtime configuration checks.
87+
Verifies that ESV was activated also during
88+
compile time (with configure option: '--enable_esv')
89+
when enabling it during runtime (via the EM config file: esv.enable = true).
90+
Warn the user otherwise.
91+
The user might not notice that the run time config file option has no effect
92+
if ESV has been disabled during compilation.
93+
Example:
94+
build> ../configure --disable-esv … (set the define EM_ESV_ENABLE to 0)
95+
vs.
96+
<em-odp>/config/em-odp.conf:
97+
esv: {
98+
# Runtime ESV enable/disable option.
99+
# Allows the user to disable ESV without recompilation when
100+
# 'configure --enable-esv'.
101+
enable = true
102+
103+
}
104+
will show the following warning at startup:
105+
106+
EM ESV config: (EM_ESV_ENABLE=0)
107+
ESV disabled
108+
esv.enable: true(1)
109+
WARNING: ESV disabled (build-time) - config file option IGNORED!
110+
111+
Note that the warning is only printed, no other action is taken.
112+
113+
- EM Termination
114+
- Move functionality from em_term_core() to em_term().
115+
Now em_term_core() only flushes events stashed locally on the core
116+
and em_term() flushes the rest of the events at the end.
117+
Additionally, em_term() joins all available queue groups to be able to
118+
flush all events from the scheduler before terminating.
119+
120+
- Programs
121+
- New performance test programs added
122+
- programs/performance/queues_output.c
123+
Event Machine performance test for output queues.
124+
- programs/performance/loop_vectors.c
125+
Event Machine performance test for vector events
126+
55127
--------------------------------------------------------------------------------
56128
Event Machine (EM) on ODP v3.5.0
57129
--------------------------------------------------------------------------------
@@ -556,7 +628,7 @@ Event Machine (EM) on ODP v2.9.0
556628
- EM Command Line Interface (EM CLI) update
557629
- Further EM CLI commands added, use the command "help" to see all available
558630
commands:
559-
(<em-odp.conf>: cli.enable = true)
631+
(<em-odp.conf>: cli.enable = true)
560632
$> telnet localhost 55555
561633
EM-ODP> help
562634
Commands available:
@@ -621,7 +693,7 @@ Event Machine (EM) on ODP v2.8.0
621693
em_eo_start_sync(), em_queue_group_modify_sync() etc. are allowed.
622694
Previously only one sync-operation at a time was permitted, now there is
623695
no limit.
624-
One restriction remains: conserned cores need to be dispatching
696+
One restriction remains: concerned cores need to be dispatching
625697
(or processing other sync-API calls) for the operations to complete.
626698
A core that has left the dispatch loop or is sleeping etc. will not allow
627699
the sync-API operation to complete.
@@ -879,10 +951,10 @@ Event Machine on ODP v2.5.0
879951
"
880952
Note: ESV-errors are always reported with the same error-code:​
881953
EM_FATAL(EM_ERR_EVENT_STATE) = 0x80000010​
882-
'prev-state' shows the previous good state of the event. i.e. the
883-
previous place where EM observed the event in a valid state.
884-
'new-state' shows the current detected illegal state that
885-
caused the error.
954+
'prev-state' shows the previous good state of the event. i.e. the
955+
previous place where EM observed the event in a valid state.
956+
'new-state' shows the current detected illegal state that
957+
caused the error.
886958

887959
Using ESV has an impact on performance.
888960
Each event-state transition updates an atomic counter and stores further
@@ -1158,9 +1230,10 @@ Event Machine on ODP v1.3.0
11581230
--------------------------------------------------------------------------------
11591231
- Support for EM API v1.3 (em-odp/include), see API changes in
11601232
em-odp/include/event_machine/README_API
1161-
- Support for EM add-ons APIs, here the EM event timer API v1.0, read about
1162-
add-on APIs in em-odp/include/event_machine/add-ons/README.
1163-
See new event timer examples/tests in em-odp/programs/example/add-ons/
1233+
- Support for EM add-ons APIs, read about add-on APIs in
1234+
em-odp/include/event_machine/add-ons/README.
1235+
- EM event timer API v1.0.
1236+
See new event timer examples/tests in em-odp/programs/example/timer/
11641237

11651238
--------------------------------------------------------------------------------
11661239
Event Machine on ODP v1.2.3

README

-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,6 @@ Usually EM work better with the following config changes:
120120
outside of EM can't be tracked, thus disable this.
121121
sched_basic.order_stash_size = 512 -> 0
122122

123-
- Stash: Disable strict stash size.
124-
Rely on stash 'put' return value to determine operation status.
125-
stash.strict_size = 1 -> 0
126-
127123
===============================================================================
128124
CPU Architecture specific options
129125
===============================================================================

configure.ac

+23-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AC_PREREQ([2.69])
33
# Version
44
############################
55
m4_define([em_version_api_major], [3])
6-
m4_define([em_version_api_minor], [5])
6+
m4_define([em_version_api_minor], [6])
77
m4_define([em_version_implementation], [0])
88
m4_define([em_version_fix], [0])
99

@@ -169,6 +169,7 @@ EM_CHECK_CFLAG([-Wformat-security])
169169
EM_CHECK_CFLAG([-Wundef])
170170
EM_CHECK_CFLAG([-Wwrite-strings])
171171
EM_CHECK_CFLAG([-Wno-vla]) # Allow variable-length arrays (vla), for clang.
172+
EM_CHECK_CFLAG([-Wshadow=local])
172173

173174
# GCC 10,11 sometimes gets confused about object sizes and gives bogus warnings.
174175
# Make the affected warnings generate only warnings, not errors.
@@ -298,6 +299,20 @@ AC_ARG_ENABLE([debug-print],
298299
# Substitute @EM_DEBUG_PRINT@ into the pkgconfig file libemodp.pc.in
299300
AC_SUBST([EM_DEBUG_PRINT])
300301

302+
##########################################################################
303+
# Enable/disable deprecated API definitions
304+
##########################################################################
305+
EM_DEPRECATED_API=0
306+
deprecated=no
307+
AC_ARG_ENABLE([deprecated],
308+
[AS_HELP_STRING([--enable-deprecated],
309+
[enable deprecated API definitions [default=disabled]])],
310+
[if test "x$enableval" = "xyes"; then
311+
EM_DEPRECATED_API=1
312+
deprecated=yes
313+
fi])
314+
AC_SUBST(EM_DEPRECATED_API)
315+
301316
#########################################################################
302317
# Override EM-define value 'EM_DEBUG_TIMESTAMP_ENABLE' to 0...2
303318
# --enable-debug-timestamps=0...2 Set 'EM_DEBUG_TIMESTAMP_ENABLE' to the given
@@ -459,7 +474,7 @@ AC_CONFIG_FILES([
459474
programs/common/Makefile
460475
programs/example/Makefile
461476
programs/example/hello/Makefile
462-
programs/example/add-ons/Makefile
477+
programs/example/timer/Makefile
463478
programs/example/api-hooks/Makefile
464479
programs/example/dispatcher/Makefile
465480
programs/example/error/Makefile
@@ -474,6 +489,7 @@ AC_CONFIG_FILES([
474489

475490
AC_CONFIG_FILES([
476491
include/event_machine/api/event_machine_version.h
492+
include/event_machine/api/event_machine_deprecated.h
477493
])
478494

479495
##########################################################################
@@ -641,7 +657,10 @@ AS_IF([test "x$enable_doxygen" != "xno"],
641657
[DX_HTML_FEATURE(ON)
642658
DX_PDF_FEATURE(OFF)
643659
DX_PS_FEATURE(OFF)
644-
DX_INIT_DOXYGEN($PACKAGE_NAME, ${srcdir}/doc/Doxyfile, ${builddir}/doc/event_machine_api)
660+
DX_DOT_FEATURE(ON)
661+
DX_INIT_DOXYGEN($PACKAGE_NAME,
662+
${srcdir}/doc/Doxyfile,
663+
${builddir}/doc/event_machine_api)
645664
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Makefile])])
646665
])
647666

@@ -704,6 +723,7 @@ AC_MSG_RESULT([
704723
example programs: ${with_programs}
705724
example static linkage: ${enable_static_applications}
706725
default config-file: ${default_config_file}
726+
deprecated APIs: ${deprecated}
707727
708728
EM Compile Time Options
709729
=======================

doc/Doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2359,7 +2359,7 @@ HIDE_UNDOC_RELATIONS = YES
23592359
# set to NO
23602360
# The default value is: YES.
23612361

2362-
HAVE_DOT = YES
2362+
HAVE_DOT = $(HAVE_DOT)
23632363

23642364
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
23652365
# to run in parallel. When set to 0 doxygen will base this on the number of

0 commit comments

Comments
 (0)