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

Feature/multipan static instances test 3 #187

Conversation

parag-silabs
Copy link

No description provided.

abtink and others added 18 commits October 6, 2023 12:09
This commit adds `RouterRoleTransition` nested class to `MleRouter`.
This class tracks the timeout and jitter intervals for router role
transitions, i.e., device upgrading to router role from REED or
downgrading from router to REED. It provides helper methods like
`IsPending()` and `StartTimeout()` to check if role transition
is pending or to start the timeout countdown. These methods help to
simplify the code and make it more readable.
As per the mbedTLS v3.5.0 release notes:

Ref: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.5.0

MBEDTLS_CIPHER_BLKSIZE_MAX is deprecated in favor of
MBEDTLS_MAX_BLOCK_LENGTH (if you intended what the name suggests:
maximum size of any supported block cipher) or the new name
MBEDTLS_CMAC_MAX_BLOCK_SIZE (if you intended the actual semantics:
maximum size of a block cipher supported by the CMAC module).

This commit fixes the build issue keeping the backward compatibility
intact.
…penthread#9495)

This commit updates `MeshForwarder::SendMessage()` on FTD to check if
the message is marked for direct transmission and/or indirect
transmission to a sleepy child. If there is no pending transmission,
the message is removed.

This situation can occur if the message destination is a multicast
address larger than realm-local scope. In such a case, `SendMessage()`
skips `SetDirectTransmission()` on the message(since such message
will be forwarded using IP-in-IP encapsulation by `Ip6` module) and
assumes the message is for a sleepy child. However, if none of the
children are subscribed to this address, the message will not be
marked for indirect transmission either. Without the fix in this
commit, such messages would have remained in the `mSendQueue` and not
been removed or freed, as messages are only checked for removal after
a direct or indirect transmission attempt.
…penthread#9499)

Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@8ca2b8b...1b05615)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit adds helper methods to the `Message` class to check if the
message origin matches a specific origin. These methods are used in
the code as syntactic sugar to simplify the code.
…ead#9488)

This commit updates the `ip6addr -v` CLI command to provide more
information about each address including origin, prefix length, and
preferred and valid flags.
…hread#9505)

This commit simplifies the `MeshForwarder::SendMessage()` method and
its logic for determining whether to send a multicast message to
sleepy children. We first determine whether the destination address
is link-local or realm-local all-nodes, meaning it is destined to all
nodes. Otherwise, we need to check whether each sleepy child is
subscribed to the address. We then iterate through the child table
and mark the message for indirect transmission accordingly.
…nthread#9393)

The posix platform is able to support the HDLC, SPI and vendor spinel
interfaces, but the spinel interface type can't be changed
dynamically. It is inconvenient to use different spinel interfaces for
Thread stack in Android. This commit enables the posix platform to
support the HDLC, SPI and vendor interface at the same time, and the
final spinel interface type is determined by the radio url protocol.

Some other changes:
1. Not use CRTP style for the radio spinel.
2. Deprecate the OT_POSIX_CONFIG_RCP_BUS and
   OPENTHREAD_POSIX_CONFIG_RCP_TIME_SYNC_INTERVAL.
This commit contains smaller changes in `HandleRetransmissionTimer()`:

- Remove nested if/else blocks and use `continue`.
- We clone the MPL message if more retx are needed, otherwise use the
  `message` directly.
- In both cases, we now use the same code path for preparing and
  sending the `message`, avoiding repeated code.
- Rename `GetTimerExpirations() to `DetermineMaxRetransmissions()`.
…penthread#9510)

With the recent addition of `GetOrigin()`, the origin of a message is
tracked by `Message` itself. With this change, we no longer need to
pass `aIsOutbound` to `Ip6::Mpl` methods, as it can be determined
from the origin of `aMessage`. This commit simplifies the code by
removing the `aIsOutbound` input parameter.
…penthread#9512)

This commit contains smaller changes in `Ip6` class:
- Rename constant `kForwardIcmpTypes` to follow naming convention
- Simplify how it it used to filter which ICMP types are forwarded
  to Thread mesh.
This commit updates `PingSender` and its config to include a
`mMulticastLoop` flag and allow the caller to set this flag. When
set, multicast ping echo request messages are looped back and
received by the device itself if it is subscribed to the same
address. The `ping` CLI command is also updated to allow setting this
flag.

This commit also updates `test-008-multicast-traffic.py` to add new
test cases to cover the multicast loop flag behavior (pinging with or
without this flag). In particular, it covers when the ping
destination is a realm-local multicast address and when it is a
larger-than-realm-local multicast address (where the `ot::Ip6` module
would use a tunnel header for forwarding the message).
…#9503)

This commit updates how `Ip6::HandleDatagram()` processes a tunneled
IP-in-IP message. Previously, if a message was marked for both
`receive` and `forwardThread`, e.g., possible for a multicast message
from host with multicast-loop flag, it would be received but not
forwarded to the Thread mesh. This commit ensures that such messages
are handled properly.

Without this change, multicast transmission still works fine due to
the MPL layer retransmitting the message, which would then be
forwarded to the Thread mesh. However, this change improves the
multicast behavior by ensuring that the original/first message is
also forwarded to the Thread mesh.

This commit changes the code so that if we need to both `receive` and
`forwardThread`, we create a copy of the message by cloning it.
Otherwise, we take ownership of the original message and use it
directly. We then remove the encapsulating header before processing
the embedded message by calling the `HandleDatagram()` recursively.
This commit adds `Ip6::PrepareMulticastToLargerThanRealmLocal()`,
which prepares to transmit a multicast message with destination
larger than realm-local address. It checks if any sleepy child of
device is subscribed to the multicast address and clones the message
for indirect tx if needed, before adding the IP-in-IP tunnel header.
The new method helps remove repeated code in `SendRaw()` and
`SenDatagram()`.
This feature allows the RCP to support multiple host stacks on different PANs
by making use of the spinel Interface ID.

Created unit tests for testing multipan feature with multiple ot-instance
support.

Based on Si-Labs PR openthread#8914 by @parag-silabs, but a little different approach.
Instead of handling everything by a single sub-mac instance, multiple
OpenThread instances are created on RCP side that map to different IID.
Thanks to this there are separate data kept for each interface. Platform
is able to determine interface by ot instance pointer passed as an argument
to most of the API functions.
Tx/scan queue was removed as it is possible to request transmission in
parallel, it is up to the platform to decide if it should fail or queue
second tx or it has two radios available.

NOTE:
Platform needs to provide different otRadioFrame of each instance and
the processing needs to take into account the instance being used.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
…d CLI

Made OT_MULTIPAN_RCP switch applied only to posix host and RCP.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants