Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump OT to the latest main to include timing fixes. #113

Merged
merged 73 commits into from
Sep 18, 2023

Conversation

ghost
Copy link

@ghost ghost commented Sep 12, 2023

Includes upstream timestamp fixes, namely 6da6e09 and d62167e .

The accompanying continuity PR to update the module via west is zephyrproject-rtos/zephyr#61430.

@edmont That's probably for you...

dependabot bot and others added 30 commits July 17, 2023 08:54
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@f4ef78c...465a078)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit fixes the netlink ACK error logging by extracting error
messages from the `NLMSGERR_ATTR_MSG` attribute. The key point is that
the error code in the `nlmsgerr` header is not necessary `errno` and
can't be used with `strerror()`.
…nswers (#9281)

This commit updates `Dns::ServiceDiscovery::Server` such that when
answering a PTR query with more than one answer, it does not include
additional records. This is to keep the size of the response small.

This commit also updates the test scripts validating browse (PTR
query) function to check the new behavior. In particular, a common
python function `_parse_dns_service_info()` is added to parse service
info in CLI output of "dns browse" or "dns service" commands and
handle if output of "dns browse" does not include service info.
This commit simplifies the definition of CMake configurations by
adding new macros:
- `ot_string_option` for string-valued options (`OT_VENDOR_NAME`)
- `ot_int_option` for int-valued options (`OT_MLE_MAX_CHILDREN`)
- `ot_multi_option` for multi-valued options (`OT_LOG_LEVEL`)

The option definitions have also been moved to the `options.cmake`
file from `./CMakeLists.txt`.
Currently to support Link Metrics Subject, we pre-allocate 128
entries. But this is unnecessary for MTD since it will only have one
neighbor. This commit minimizes the number to 2 - one for Enhanced-ACK
Probing and one for Forward Tracking Series.
This commit simplifies the `MleRouter::HandleChildIdRequest()` method
by directly tracking the list of MLE TLVs to be included in the
response in a `TlvList`. This replaces the previous approach of using
boolean flags to track which TLVs should be included. The use of
`TlvList` also protects against the case where the child may have
included the same TLV type in the "TLV Request TLV" and ensures
that we do not include duplicate TLVs in the response.
When trying to opaquely bind to the public facing API, including
<mbedtls/ctr_drbg.h> forces an external dependency on mbedtls.
…d (#9241)

This change updates the mechanism used by vendor.cmake to include a
cmake file to define the required vendor targets used by the rcp
vendor interface library instead of the find_package command that was
previously used.

The find_package command would allow for a package to be searched for
and a target to be linked unconditionally if defined by the CMake
project. This would lead to problems if the target was already
defined, perhaps as a subdirectory of a super project, and the cache
variable is still set for the openthread build. Additionally, this
change also brings the vendor extension of the posix library more in
line with the cli vendor extension, which was created after
find_package was used in vendor.cmake.
…NDOR_INTERFACE` (#9297)

This commit fixes the name of the vendor supplied target to
OT_POSIX_CONFIG_RCP_VENDOR_INTERFACE so that this target name and the
misspelled target name do not both need to be defined by vendors.
`NETLINK_EXT_ACK` and `NETLINK_CAP_ACK` are for getting netlink reply
details from the kernel and we can still function without the two
options.

This commit loose the check of enabling the two options to make
ot-posix works on platforms where the features are missing.
This commit simplifies the `Sever::RemoveHost()` method by removing
the input parameter `aNotifyServiceHandler`. This is because, unlike
the `RemoveService()` method, the `RemoveHost()` method always needs
to notify the service handler.
This commit simplifies tracking of host key in `Srp::Server` by saving
the `Key` directly in a `Host` instead of the saving the `KeyRecord`.
This commit updates public APIs for getting and setting CSL period to
use microseconds unit instead of the internal ten symbols unit. This
makes the APIs easier to use.

The CSL APIs have been renamed to follow the `otLinkGet/SetCsl{Item}()`
pattern, which is the common naming style of OpenThread. This
renaming will make the APIs more consistent and avoid potential
confusion with the now-removed APIs, which used a different unit for
CSL period.

This commit also updates the related CLI CSL commands:
- The `csl period` expects the given period to be in microseconds.
- The `csl` command (which outputs all CSL parameter) shows the CSL
  period in microsecond unit (e.g., "Period: 160000us").

The NCP spinel `SPINEL_PROP_THREAD_CSL_PERIOD` is also updated to use
microsecond unit for CSL period.

The related test script are updated to use the new unit, in particular
the test harness `setCSLperiod()` in `harness-thci/OpenThread.py` is
updated (no need to convert from msec).
This commit defines two types to track challenge or response TLV data
in MLE messages:

- `TxChallenge` represents the maximum-sized challenge data to include
  and send in MLE messages. OpenThread always uses the maximum size
  of 8 bytes for challenge data in the messages it sends.
- `RxChallenge` represents variable-length challenge data read from a
  received MLE message.

The two separate types help to simplify their use in code.
This commit updates and enhances the specification of OT core config
header files. It adds `OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`, which
can be used by platforms to provide a core config header file name.

The project and platform specific config header files are included in
the following order:

1. Project specific header (`OPENTHREAD_PROJECT_CORE_CONFIG_FILE`)
2. Platform specific header (`OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`)
3. Default config values as specified by `config/{module}.h`

CMake config options `OT_PROJECT_CONFIG` and `OT_PLATFORM_CONFIG` are
also defined, which can be used to specify project and platform
config headers. Platforms can define a default config header for
`OT_PLATFORM_CONFIG`. The existing `OT_CONFIG` CMake option is marked
as deprecated (with a warning message which recommends use of the new
configs).

This commit also updates the default simulation and POSIX core config
headers to remove extra Doxygen-style documentation and ensure that
all definitions have an `#ifndef` guard check.
…se (#9309)

This commit updates `CommitSrpUpdate()` to ensure that `aHost` is
freed when granted key lease is zero and host is fully removed.

This commit also updates unit test `test_srp_server` (which checks the
heap allocations by server) to cover the situations where client sends
an update to remove host and all its services with or without
clearing key-lease.
…(#9310)

Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.3.1 to 2.4.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@6b3083a...55d479f)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit adds `SetIfIndex` method to `RoutingManager` class. This
method allows the infrastructure interface to be changed. The user may
initialize multiple interfaces and choose one interface as
infrastructure interface. During run time, there might be some
networking congestion or other network issue. The user can change the
infrastructure interface via this function.

This commit also adds docs for the `init` command.
…t (#9307)

This commit updates the `TrickleTimer` to allow `IntervalMax` and
`IntervalMin` to be changed while the timer is running. In particular,
when `IntervalMax` is changed to a value that is shorter than the
current interval being used by the timer, the timer will adapt the
new shorter interval and may fire immediately.

A unit test `test_trickle_timer` has been added to validate the
behavior of `TrickleTimer` in detail. All different scenarios where
`IntervalMax` or `IntervalMin` are changed are covered by the
unit test.

The new mechanism to change the trickle timer `IntervalMax` is
used to update the MLE Advertisement trickle timer. The `IntervalMax`
is determined based on the number of router neighbors of the device
with link quality 2 or better. If the device has fewer router neighbors,
it will use a shorter `IntervalMax`. As new links are established
with routers, the `IntervalMax` is recalculated and updated on the
Advertisement trickle timer.

This commit also adds a new test `test-024-mle-adv-imax-change.py` to
validate updates to the `IntervalMax` value based on the number of
router neighbors.

Co-authored-by: David Smith <[email protected]>
This commit updates the `Mac::TxFrame::GenerateEnhAck()` method to
check the security level of the received frame. If the security level
is not `kSecurityEncMic32`, it will return `kErrorParse`. This should
help prevent radio platform implementations from trying to perform tx
security on an invalid generated enhanced ack frame. Specifically, it
can help prevent radio platforms from calling `ProcessTxSecurity()`
on an enhanced ack frame with a security level of `kSecurityNone`
which can cause an assert in `AesCcm::Init()` due to the tag length
being zero.
This commit changes the `protected` declarations in the `Mle` class to
be `private` since `Mle` class and its subclass, the `MleRouter`, are
declared as `friend` classes.

The commit also re-arranges the `private` definitions in the `Mle`
class into five sections: constants, enumerations, nested classes,
methods declarations, and member variable definitions.

With the change to `private`, this commit also removes the redundant
documentation of methods.
…(#9325)

Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@55d479f...cba0d00)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
After recent reference device release, two THCI issues
have been found.

This commit adds `"` around command arguments that have
escapable characters (like `ot networkname aa\ bb`),
and skips lines containing only ANSI escape codes
in commissioning logs.

Signed-off-by: Maciej Baczmanski <[email protected]>
This commit reorders member variables in the `Mle` class, bringing
booleans and `uint`s of the same size close to each other to avoid
alignment gaps.
…#9327)

Current implementation of RestoreProperties() assumes there's always a
networkInfo structure stored in the settings.  But, it's possible the
RCP device needs to be recovered before this structure is populated.

Signed-off-by: Axel Le Bourhis <[email protected]>
abtink and others added 20 commits August 25, 2023 11:29
This commit updates the `check-size` script and how the OpenThread
size report is generated and reported.

The size report now includes four device types:
- FTD (not acting as a BR)
- MTD (including SED)
- Border Router (BR)
- RCP

Each type uses its own example config header file (e.g., BR uses
`examples/config/ot-core-config-check-size-br.h`). These header files
specify all the OT configs and enable/disable the set of features
that make sense for the given type.

This replaces the previous model where the same set of configs were
used for all types. This change allows us to track the code size of a
typical BR build, as well as the code size of other device types.

In order to build and generate a size report for the BR configuration
example with BR-specific features enabled (such as Border Routing
Manager or NAT64), we need an implementation of the related platform
APIs that are used by these features (e.g. `otPlatInfraIf` APIs).
This commit adds mock empty implementations of these APIs, which are
only included in the size-report builds.
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.3 to 2.21.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@46ed16d...a09933a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…376)

This commit adds separate files for `Neighbor`, `Child`, and `Router`
classes.
If macro OPENTHREAD_UART_RTT_ENABLE is not enabled, the file
SEGGER_RTT.h and related should not be included.
…` (#9387)

This commit adds a build configuration flag for the feature to set and
get device properties, which are then used to calculate the local
leader weight on a device. The feature is enabled by default on
Thread 1.3.1 or later. The new configuration flag allows OpenThread
project integrators to enable this feature on earlier versions if
desired.
This commit implements a new module LinkMetricsManager, which utilizes
the Link Metrics feature to get the Link Metrics data from neighboring
devices.

The commit also adds a few tests to the module:
- Unit Test: tests/unit/test_link_metrics_manager.cpp, will be run in
  `unit-tests` in `unit.yml`.
- Expect Test: tests/scripts/expect/v1_2-linkmetricsmgr.exp, will be
  run in `expects` in `simulation-1.2.yml`.
- Simulation Test:
  tests/scripts/thread-cert/v1_2_LowPower_test_link_metrics_manager.py,
  will be run in `packet-verification-low-power` in
  `simulation-1.2.yml`.
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@c85c95e...f43a0e5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Whenever an indirect/CSL transmitted frame is being purged or replaced,
make sure that both indirect and CSL transmission attempts counts are
reset in order to avoid issues like considering a new frame as a
retransmission.
This commit updates the `check-size` script to generate a formatted
table on a branch push. The table will first include the code size
difference for all binary files, followed by the difference for all
library files. This allows us to use the `check-size` script on local
machines during development to get a full size impact report, similar
to what will be reported on the GitHub Action branch push.

This commit also generates a size report for posting on a pull request
in Markdown format. In particular, the table with the size difference
for all library files is added as a collapsible section after the
main table for binary files.
This commit enhances `Srp::Server` to process and commit the completed
`UpdateMetadata` entries (signaled by the "proxy service handler"
calling `HandleServiceUpdateResult()`) from a `Tasklet`. This change
is helpful in the case where the `HandleServiceUpdateResult
()` callback is invoked directly from the "update service handler"
itself. While `Srp::Server` can handle this situation, the change
makes it easier for platform implementations of advertising proxy.

In particular, it addresses an issue with the `otbr` advertising proxy
implementation. This implementation can potentially access an already
freed `Host` object. This can happen because the implementation may
hold on to the `Host` object while iterating over its `Service`
entries as advertising an earlier `Service` of the same `Host` may
fail immediately and invoke the callback directly. This would then
cause the `Host` to be freed by `Srp::Server`.
…PAN ID (#9388)

This commit updates MLE to skip sending an Announce response when
receiving an Announce message from a detached/orphan device and the
included channel and PAN ID in the received Announce message are the
same as the current network's channel and PAN ID.
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@fac708d...93397be)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds a precise specification for the local radio clock that is at the
core of all timing-sensitive aspects of the IEEE 802.15.4 protocol
(currently mostly CSL) and refers to this definition for fields that
reference the radio clock.

Specifies the reference planes and message timestamp points for RX
timestamps, RX windows and timed TX.

Documents the Thread-specific interpretation of the CSL Phase and
derives the formula for CSL TX timestamps from it.

Based on the standard based definitions given, the TX timestamp used
for timed TX now refers to the start of PHR. This change needs to be
synchronized with the platform radio driver implementations. An
appropriate change set has been prepared for Zephyr.
Ignore a CSL IE with period set to 0.

Accepting it would eventually lead to a division by 0 fault in
`CslTxScheduler::GetNextCslTransmissionDelay`.
@ghost ghost changed the title Bump upstream version to include timestamp fixes. Bump OT version to include timestamp fixes. Sep 12, 2023
@ghost ghost changed the title Bump OT version to include timestamp fixes. Bump OT to the latest main to include timing fixes Sep 12, 2023
@ghost ghost changed the title Bump OT to the latest main to include timing fixes Bump OT to the latest main to include timing fixes. Sep 12, 2023
@ghost
Copy link
Author

ghost commented Sep 12, 2023

@jciupis @rlubos Maybe a second ACK from you?

@rlubos rlubos merged commit d62167e into zephyrproject-rtos:main Sep 18, 2023
@ghost ghost deleted the feat/ot-timing-fixes branch September 18, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.