Skip to content

Commit

Permalink
Merge ODP v1.45.0.0
Browse files Browse the repository at this point in the history
Merge ODP linux-generic v1.45.0.0 into linux-dpdk.
  • Loading branch information
MatiasElo authored Jun 5, 2024
2 parents 8063101 + 87913e6 commit 616034b
Show file tree
Hide file tree
Showing 665 changed files with 7,636 additions and 12,362 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,22 @@ jobs:
$CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH} /odp/scripts/ci/check_validation.sh
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log

Run_sanitizer:
runs-on: ubuntu-20.04
env:
OS: ubuntu_22.04
strategy:
fail-fast: false
matrix:
flags: ['-fsanitize=address,undefined -fno-sanitize-recover=all']
steps:
- uses: actions/checkout@v4
- run: sudo docker run -i -v `pwd`:/odp --privileged --shm-size 8g -e CC="${CC}" -e ARCH="${ARCH}"
-e CFLAGS="-O0 -g -Wno-error ${{matrix.flags}}"
-e CXXFLAGS="-O0 -g -Wno-error ${{matrix.flags}}"
-e LDFLAGS="-g ${{matrix.flags}}"
$CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH} /odp/scripts/ci/check.sh
- if: ${{ failure() }}
uses: ./.github/actions/run-failure-log

124 changes: 124 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,127 @@
== OpenDataPlane (1.45.0.0)

=== Backward incompatible API changes
==== Crypto
* Increase size of `all_bits` fields of `odp_crypto_cipher_algos_t` and
`odp_crypto_auth_algos_t` algorithm capability unions.

==== Packet
* Change `odp_packet_reset()` specification to use new
`odp_packet_reset_max_len()` function for maximum packet data length value.

==== Protocol Stats
* Limit length of `odp_proto_stats_create()` object name parameter to a new
`ODP_PROTO_STATS_NAME_LEN` define.

==== Traffic Manager
* Limit lengths of traffic manager object names to a new `ODP_TM_NAME_LEN`
define.

=== Backward compatible API changes
==== Common
* Make mentions of maximum string lengths clear and consistent and always state
that the null character is included.

==== CPU
* Add more specific data prefetch variants: `odp_prefetch_l1()`,
`odp_prefetch_l2()`, and `odp_prefetch_l3()`.
* Add more specific data prefetch variants for store: `odp_prefetch_store_l1()`,
`odp_prefetch_store_l2()`, and `odp_prefetch_store_l3()`.
* Add streaming prefetch functions `odp_prefetch_strm_l1()` and
`odp_prefetch_store_strm_l1()`.

==== Crypto
* Add SHA-3 based cryptographic hash functions and HMACs based on them.
* Add SNOW-V cipher algorithm and SNOW-V-GCM AEAD algorithm.
* Add SM3 cryptographic hash function and a HMAC based on it.
* Add SM4 cipher in ECB, CBC, CTR, GCM, CCM and GMAC modes.

==== Event
* Add `odp_event_user_flag_set()` function for setting/clearing event's user
flag value.

==== Packet
* Clarify `odp_packet_buf_len()` specification to state that total packet buffer
length includes also headroom and tailroom lengths.
* Clarify `odp_packet_reset()` specification to state that packet data start is
adjusted according to pool parameters, user area content is maintained, and
packet data persistence is not guaranteed.
* Add `odp_packet_reset_meta()` function for resetting only packet metadata
without modifying packet data.

==== Pool
* Clarify in `odp_pool_param_t.buf.size` specification that the actual buffer
size may be rounded up by the implementation. Also, remove the limitation that
an application will never store more than 'size' bytes in each buffer, which
conflicted with `odp_buffer_size()` API.

=== Helper (1.6.0)
==== Backward incompatible changes
* Remove unused cuckoo table API.
* Remove unused hash table API.
* Remove unused linear table API.
* Remove unused IP lookup table API.
* Remove unused table interface API.

==== Backward compatible changes
===== Stress
* Add CPU stress functions (`odph_stress_pow2_u32()`, `odph_stress_log2_u32()`,
`odph_stress_sqrt_u32()`, `odph_stress_sqrt_f32()`) which may be used in test
applications to create dummy CPU load. Functions are not highly optimized but
try to stress various parts of CPU instruction set.

===== String
* Add `odph_strcpy()` function, which guarantees termination of the destination
string.

===== Thread
* Add `odph_thread_join_result()` function which is similar to the existing
`odph_thread_join()` but outputs results of joined threads.
* Clarify in `odph_thread_create()` specification that the output thread table
elements must not be modified during the lifetime of the threads if
`odph_thread_join()` is used to wait for thread exit.

=== Example Applications
* Remove `odp_generator` application which has been made redundant by
`odp_packet_gen`.
* Remove `odp_timer_test` application which has been made redundant by
`odp_timer_accuracy`.

=== Miscellaneous Tests
==== dyn_workers
* Add a simple dynamic worker tester that can be used to verify the ability of
an ODP implementation to dynamically add and remove workers from one ODP
application to another.

=== Performance Tests
==== l2fwd
* Add `-O, --output_map` option for changing the default output port mappings
for interfaces.
* Add `-C, --tx_compl` option for configuring packet transmit completion.
* Add `-X, --flow_control` option for enabling reception and/or transmission of
Ethernet pause frames.

==== packet_gen
* Enable running the application with only RX or TX threads.
* Add support for transmitting TCP packets (`-N, --proto`). The application
doesn't implement actual TCP protocol, but simply transmits packets with valid
TCP headers at a selected rate.

==== pool_latency
* Enable running the application indefinitely with special round count (`-r`)
value `0`.

==== sched_perf
* Add `-S, --stress` option for selecting stress function(s) to be used on event
data. Functions add various amount of CPU load to each event to simulate
application data processing.
* Rename `-a` option (`--fairness`) to `-F` for better match of short and long
option names.

==== stress
* Add simple memory copy loop and square root calculation test modes
(`-m, --mode`) to generate CPU load.

== OpenDataPlane (1.44.0.0)

=== Backward compatible API changes
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.5])
# ODP API version
##########################################################################
m4_define([odp_version_generation], [1])
m4_define([odp_version_major], [44])
m4_define([odp_version_major], [45])
m4_define([odp_version_minor], [0])
m4_define([odp_version_patch], [0])

Expand All @@ -27,7 +27,7 @@ AC_SUBST(ODP_VERSION_API)
# Helper library version
##########################################################################
m4_define([odph_version_generation], [1])
m4_define([odph_version_major], [5])
m4_define([odph_version_major], [6])
m4_define([odph_version_minor], [0])

m4_define([odph_version],
Expand Down
7 changes: 2 additions & 5 deletions doc/application-api-guide/api_guide_lines.dox
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* Copyright (c) 2014-2018, Linaro Limited

* All rights reserved
*
* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2014-2018 Linaro Limited
*/

/**
Expand Down
6 changes: 2 additions & 4 deletions doc/application-api-guide/odp.dox
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* Copyright (c) 2013-2018, Linaro Limited
* All rights reserved
*
* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2013-2018 Linaro Limited
*/

/**
Expand Down
6 changes: 2 additions & 4 deletions doc/application-api-guide/release.dox
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* Copyright (c) 2015-2018, Linaro Limited
* All rights reserved
*
* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2015-2018 Linaro Limited
*/

/**
Expand Down
6 changes: 2 additions & 4 deletions doc/helper-guide/odp.dox
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* Copyright (c) 2016-2018, Linaro Limited
* All rights reserved
*
* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2016-2018 Linaro Limited
*/

/**
Expand Down
8 changes: 4 additions & 4 deletions doc/users-guide/users-guide-packet.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ to manipulate its structure.
To support packet manipulation, predefined _headroom_ and _tailroom_
areas are logically associated with a packet. Packets can be adjusted by
_pulling_ and _pushing_ these areas. Typical packet processing might consist
of stripping headers from a packet via `odp_pull_head()` calls as part of
of stripping headers from a packet via `odp_packet_pull_head()` calls as part of
receive processing and then replacing them with new headers via
`odp_push_head()` calls as the packet is being prepared for transmit. Note that
while headroom and tailroom represent reserved areas of memory, these areas
not not addressable or directly usable by ODP applications until they are
`odp_packet_push_head()` calls as the packet is being prepared for transmit.
Note that while headroom and tailroom represent reserved areas of memory, these
areas are not addressable or directly usable by ODP applications until they are
made part of the packet via associated push operations. Similarly, bytes
removed via pull operations become part of a packet's headroom or tailroom
and are again no longer accessible to the application.
Expand Down
5 changes: 2 additions & 3 deletions doc/users-guide/users-guide-utilities-examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ will stop the capturing process.

. `./configure --enable-pcapng-support`
. `sudo mkdir /var/run/odp`
. `sudo ./example/generator/odp_generator -I enp2s0 -mu --dstmac
A0:F6:FD:AE:62:6C --dstip 192.168.49.20 --srcmac 2c:56:dc:9a:8f:06 --srcip
192.168.49.4 -i0 -w1`
. `sudo ./test/performance/odp_packet_gen -i enp2s0 --eth_dst A0:F6:FD:AE:62:6C
--ipv4_dst 192.168.49.20 --ipv4_src 192.168.49.4 -g 0`
. `sudo dd if=/var/run/odp/26737-enp2s0-flow-0 of=~/test.pcap`
. `ctrl^c`
. `wireshark ~/test.pcap`
2 changes: 0 additions & 2 deletions example/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
SUBDIRS = classifier \
debug \
generator \
hello \
ipsec_api \
ipsec_crypto \
Expand All @@ -11,7 +10,6 @@ SUBDIRS = classifier \
simple_pipeline \
switch \
sysinfo \
time \
timer \
traffic_mgmt

Expand Down
48 changes: 24 additions & 24 deletions example/classifier/odp_classifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,8 @@ int main(int argc, char *argv[])
if (odp_pool_destroy(pool))
ODPH_ERR("err: odp_pool_destroy error\n");

free(args->if_name);

args_error:
odp_shm_free(shm);

Expand Down Expand Up @@ -977,16 +979,16 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)
case ODP_PMR_TCP_SPORT:
/* :<port>:<mask> */
token = strtok(NULL, ":");
strncpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN);
value = strtoul(token, NULL, 0);
u16 = value;
u16 = odp_cpu_to_be_16(u16);
memcpy(stats[policy_count].rule.value_be, &u16, sizeof(u16));

token = strtok(NULL, ":");
strncpy(stats[policy_count].mask, token,
DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].mask, token,
DISPLAY_STRING_LEN);
mask = strtoul(token, NULL, 0);
u16 = mask;
u16 = odp_cpu_to_be_16(u16);
Expand All @@ -999,8 +1001,8 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)
case ODP_PMR_SIP_ADDR:
/* :<IP addr>:<mask> */
token = strtok(NULL, ":");
strncpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN);

if (odph_ipv4_addr_parse(&ip_addr, token)) {
ODPH_ERR("Bad IP address\n");
Expand All @@ -1011,8 +1013,8 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)
memcpy(stats[policy_count].rule.value_be, &u32, sizeof(u32));

token = strtok(NULL, ":");
strncpy(stats[policy_count].mask, token,
DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].mask, token,
DISPLAY_STRING_LEN);
mask = strtoul(token, NULL, 0);
u32 = mask;
u32 = odp_cpu_to_be_32(u32);
Expand All @@ -1023,8 +1025,8 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)
case ODP_PMR_DMAC:
/* :<MAC addr>:<mask> */
token = strtok(NULL, ":");
strncpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN);

/* Replace hyphens in the MAC string with colons to be compatible with
* odph_eth_addr_parse(). */
Expand All @@ -1041,7 +1043,7 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)
stats[policy_count].rule.val_sz = 6;

token = strtok(NULL, ":");
strncpy(stats[policy_count].mask, token, DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].mask, token, DISPLAY_STRING_LEN);
mask_sz = parse_custom(token, stats[policy_count].rule.mask_be, ODPH_ETHADDR_LEN);
if (mask_sz != ODPH_ETHADDR_LEN) {
ODPH_ERR("Invalid mask. Provide mask without 0x prefix.\n");
Expand All @@ -1060,8 +1062,8 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)
goto error;

token = strtok(NULL, ":");
strncpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].value, token,
DISPLAY_STRING_LEN);
val_sz = parse_custom(token,
stats[policy_count].rule.value_be,
MAX_VAL_SIZE);
Expand All @@ -1070,8 +1072,8 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)
goto error;

token = strtok(NULL, ":");
strncpy(stats[policy_count].mask, token,
DISPLAY_STRING_LEN - 1);
odph_strcpy(stats[policy_count].mask, token,
DISPLAY_STRING_LEN);
mask_sz = parse_custom(token,
stats[policy_count].rule.mask_be,
MAX_VAL_SIZE);
Expand All @@ -1091,13 +1093,13 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *optarg)

if (cos1) {
stats[policy_count].has_src_cos = 1;
strncpy(stats[policy_count].src_cos_name, cos0,
ODP_COS_NAME_LEN - 1);
strncpy(stats[policy_count].cos_name, cos1,
ODP_COS_NAME_LEN - 1);
odph_strcpy(stats[policy_count].src_cos_name, cos0,
ODP_COS_NAME_LEN);
odph_strcpy(stats[policy_count].cos_name, cos1,
ODP_COS_NAME_LEN);
} else {
strncpy(stats[policy_count].cos_name, cos0,
ODP_COS_NAME_LEN - 1);
odph_strcpy(stats[policy_count].cos_name, cos0,
ODP_COS_NAME_LEN);
}

appl_args->policy_count++;
Expand Down Expand Up @@ -1281,9 +1283,7 @@ static int parse_args(int argc, char *argv[], appl_args_t *appl_args)

if (ret) {
usage();

if (appl_args->if_name)
free(appl_args->if_name);
free(appl_args->if_name);
}

/* reset optind from the getopt lib */
Expand Down
Loading

0 comments on commit 616034b

Please sign in to comment.