Skip to content

Commit

Permalink
Merge ODP v1.45.1.0
Browse files Browse the repository at this point in the history
Merge ODP linux-generic v1.45.1.0 into linux-dpdk.
  • Loading branch information
MatiasElo authored Sep 18, 2024
2 parents 616034b + 2382a89 commit 736e1e8
Show file tree
Hide file tree
Showing 158 changed files with 20,708 additions and 1,194 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-pipeline-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
'CFLAGS=-pedantic',
'--enable-lto',
'--enable-lto --enable-abi-compat',
'--enable-pcapng-support']
'--enable-pcapng-support --enable-icache-perf-test']
steps:
- uses: OpenDataPlane/action-clean-up@main
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
'CFLAGS=-pedantic',
'--enable-lto',
'--enable-lto --enable-abi-compat',
'--enable-pcapng-support']
'--enable-pcapng-support --enable-icache-perf-test']
steps:
- uses: actions/checkout@v4
- run: sudo docker run -i -v `pwd`:/odp --privileged --shm-size 8g -e CC=gcc
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
fail-fast: false
matrix:
cc: [gcc, clang]
os: ['centos_7', 'rocky_linux_8']
os: ['rocky_linux_8']
conf: ['--enable-abi-compat']
steps:
- uses: actions/checkout@v4
Expand Down
93 changes: 93 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,96 @@
== OpenDataPlane (1.45.1.0)

=== Backward compatible API changes
==== Atomic
* Add new `odp_atomic_fetch_min_u32()` and `odp_atomic_fetch_min_u64()`
functions for fetching and updating minimum values of atomic `uint32_t` or
`uint64_t` variables.
* Add new `odp_atomic_fetch_max_u32()` and `odp_atomic_fetch_max_u64()`
functions for fetching and updating maximum values of atomic `uint32_t` or
`uint64_t` variables.
* Add functions for atomically setting and clearing bits in 32-bit atomic
variables: `odp_atomic_bit_set_u32()`, `odp_atomic_bit_fetch_set_u32()`,
`odp_atomic_bit_clr_u32()`, `odp_atomic_bit_fetch_clr_u32()`,
`odp_atomic_bit_set_rel_u32()`, `odp_atomic_bit_clr_rel_u32()`
* Add functions for atomically setting and clearing bits in 64-bit atomic
variables: `odp_atomic_bit_set_u64()`, `odp_atomic_bit_fetch_set_u64()`,
`odp_atomic_bit_clr_u64()`, `odp_atomic_bit_fetch_clr_u64()`,
`odp_atomic_bit_set_rel_u64()`, `odp_atomic_bit_clr_rel_u64()`
* Add flags for the new atomic functions into `odp_atomic_op_t`.

==== CPU
* Add instruction prefetch function `odp_prefetch_l1i()`.

==== DMA
* Add debug function `odp_dma_transfer_id_to_u64()` for getting a printable
value for a DMA transfer identifier.

==== Init
* Add debug function `odp_instance_to_u64()` for getting a printable value for
an ODP instance handle.

==== ML
* Add functions for supporting quantization of `int16_t` and `uint16_t` data
types: `odp_ml_fp32_to_uint16()`, `odp_ml_fp32_from_uint16()`,
`odp_ml_fp32_to_int16()`, `odp_ml_fp32_from_int16()`

==== Packet
* Add debug function `odp_packet_tx_compl_to_u64()` for getting a printable
value for a Tx completion handle.
* Clarify `odp_packet_reset_max_len()` documentation to state that the returned
length may be less than the current packet data length if data length has been
increased by utilizing head- or tailroom.

==== Scheduler
* Add debug function `odp_schedule_group_to_u64()` for getting a printable
value for a schedule group handle.

==== Std
* Clarify `odp_bool_t` documentation by stating how the data type can by used
with standard C booleans and what is considered true/false.
* Add a field of type `\__uint128_t` in the union in `odp_u128_t` when the
type is available, so that users that use `__uint128_t` or a compatible type do
not need to type pun.

=== ABI changes
* Change ABI type for `odp_bool_t` from `int` to `bool` to comply with the
clarified API documentation.

=== Implementation
* Add new config file option `system:cpu_id_static` for selecting whether the
implementation reads CPU identifier value from OS during every `odp_cpu_id()`
call or only once during thread initialization (default).
* Enable the `-fno-strict-aliasing` compiler option. Some sections of code in
ODP deliberately access the same data via pointers to different types, which is
undefined behavior in C. The `-fno-strict-aliasing` option prevents the compiler
from making assumptions about aliasing in these instances.

=== Example Applications
==== ml_run
* Add new example application, which loads a given ML model file, runs inference
using a given input file and compares the output to a given reference file.

=== Performance Tests
* Add the possibility to export test results into a .csv file by using
`--test-common-export` option or `TEST_COMMON_EXPORT` environment variable.
Exporting results is supported by the following applications: `atomic_perf`,
`bench_buffer`, `bench_misc`, `bench_timer`, `bench_packet`, `bench_pktio_sp`,
`dma_perf`, `lock_perf`, `pool_perf`, `sched_latency`, `sched_perf`,
`stash_perf`, `timer_accuracy`

==== bench_packet
* Add tests for new `odp_packet_reset_meta()` and `odp_packet_reset_max_len()`
functions.
* Add tests for event API fast path functions on packets.

==== icache_perf
* Add new performance test application to measure CPU performance when
application code size exceeds L1 instruction cache size.

==== packet_gen
* Add new `-U` option to define custom L3 headers.
* Add new `none` selection to the L4 protocol -N option.

== OpenDataPlane (1.45.0.0)

=== Backward incompatible API changes
Expand Down
4 changes: 2 additions & 2 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Prerequisites for building the OpenDataPlane (ODP) API

1. Linux
CentOS 7 (kernel v3.10) is the oldest Linux distributions tested by the ODP
CI. Earlier versions may or may not work.
Rocky Linux 8 (kernel v4.18) is the oldest Linux distribution tested by the
ODP CI. Earlier versions may or may not work.

For CentOS/RedHat distros, configure the system to use Fedora EPEL repos and
third-party packages:
Expand Down
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ How to build:
See DEPENDENCIES file about system requirements and dependencies to external
libraries/packages. It contains also some more detailed build instructions.

ODP requires the -fno-strict-aliasing (or equivalent) compiler option. This
option is enabled by default in ODP.

Generally, ODP and test applications are built with these three steps:
./bootstrap
./configure
Expand Down
10 changes: 9 additions & 1 deletion config/odp-linux-dpdk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# Mandatory fields
odp_implementation = "linux-dpdk"
config_file_version = "0.1.26"
config_file_version = "0.1.27"

# System options
system: {
Expand All @@ -38,6 +38,14 @@ system: {
# scaling is disabled.
cpu_hz_static = 0

# When enabled (1), implementation reads the CPU identifier values from
# OS only once during ODP initialization. Enabling this option removes
# a system call from odp_cpu_id() implementation.
#
# This option should only be used when ODP threads are not migrated
# during application lifetime.
cpu_id_static = 1

# Maximum number of ODP threads that can be created.
# odp_thread_count_max() returns this value or the build time
# maximum ODP_THREAD_COUNT_MAX, whichever is lower. This setting
Expand Down
10 changes: 9 additions & 1 deletion config/odp-linux-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# Mandatory fields
odp_implementation = "linux-generic"
config_file_version = "0.1.28"
config_file_version = "0.1.29"

# System options
system: {
Expand All @@ -38,6 +38,14 @@ system: {
# scaling is disabled.
cpu_hz_static = 0

# When enabled (1), implementation reads the CPU identifier values from
# OS only once during ODP initialization. Enabling this option removes
# a system call from odp_cpu_id() implementation.
#
# This option should only be used when ODP threads are not migrated
# during application lifetime.
cpu_id_static = 1

# Maximum number of ODP threads that can be created.
# odp_thread_count_max() returns this value or the build time
# maximum ODP_THREAD_COUNT_MAX, whichever is lower. This setting
Expand Down
7 changes: 4 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AC_PREREQ([2.5])
##########################################################################
m4_define([odp_version_generation], [1])
m4_define([odp_version_major], [45])
m4_define([odp_version_minor], [0])
m4_define([odp_version_minor], [1])
m4_define([odp_version_patch], [0])

m4_define([odp_version_api],
Expand Down Expand Up @@ -125,8 +125,8 @@ AS_IF([test "$GCC" == yes],
)
)

ODP_CFLAGS="$ODP_CFLAGS -std=c11 -D_GNU_SOURCE"
ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11"
ODP_CFLAGS="$ODP_CFLAGS -std=c11 -fno-strict-aliasing -D_GNU_SOURCE"
ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11 -fno-strict-aliasing"

# Extra flags for example to suppress certain warning types
ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA"
Expand Down Expand Up @@ -232,6 +232,7 @@ if test "x$abi_compat" = "xno" ; then

if test $? -ne 0; then
ODP_CHECK_CFLAG([-march=native])
ODP_CHECK_CXXFLAG([-march=native])
fi
fi
AM_CONDITIONAL(ODP_ABI_COMPAT, [test "x$ODP_ABI_COMPAT" = "x1"])
Expand Down
4 changes: 4 additions & 0 deletions example/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ endif
if helper_cli
SUBDIRS += cli
endif

if WITH_ML
SUBDIRS += ml
endif
1 change: 1 addition & 0 deletions example/m4/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ AC_CONFIG_FILES([example/classifier/Makefile
example/ipfragreass/Makefile
example/l2fwd_simple/Makefile
example/l3fwd/Makefile
example/ml/Makefile
example/packet/Makefile
example/ping/Makefile
example/simple_pipeline/Makefile
Expand Down
1 change: 1 addition & 0 deletions example/ml/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
odp_ml_run
5 changes: 5 additions & 0 deletions example/ml/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include $(top_srcdir)/example/Makefile.inc

bin_PROGRAMS = odp_ml_run

odp_ml_run_SOURCES = odp_ml_run.c
Loading

0 comments on commit 736e1e8

Please sign in to comment.