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

Regular OpenThread upmerge to e10a925 #162

Merged
merged 65 commits into from
Jul 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
9cc1cd9
[mdns] add support for legacy unicast response feature (#10053)
Cristib05 Jun 7, 2024
22ee728
[ncp] add property to instruct NCP to leave gracefully (#10337)
Irving-cl Jun 7, 2024
dd1e5f4
[mle] add `Mle::RxMessage::ReadAndSave{Active/Pending}Dataset()` (#10…
abtink Jun 7, 2024
a8f07b5
github-actions: bump docker/login-action from 3.1.0 to 3.2.0 (#10356)
dependabot[bot] Jun 10, 2024
5dbbab1
[dnssd-server] implement DNS-SD discovery proxy functionality in core…
abtink Jun 10, 2024
d9bb516
[routing-manager] schedule all timers in `RxRaTracker` together (#10343)
abtink Jun 11, 2024
7ba7fb2
[srp-client] use sequential message IDs & allow older response IDs (#…
abtink Jun 11, 2024
fe0037e
[mle] add `Mle::RxMessage::ReadAndSetNetworkDataTlv()` (#10358)
abtink Jun 11, 2024
b2141a6
[style] unify using member variable (#10360)
bukepo Jun 11, 2024
32f462f
[cmake] add option for `OPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US` (…
maciejbaczmanski Jun 11, 2024
185b0e1
[posix] improve the logging in netif (#10362)
superwhd Jun 12, 2024
9c1f1f3
[key-manager] update how the "Key Switch Guard Timer" is reset (#10347)
abtink Jun 5, 2024
4a0d6b7
[test] update key-increment test scripts to align with cert test (#10…
abtink Jun 11, 2024
cb1220d
[cli] fix unused retval warning on `otPlatLogCrashDump()` call (#10369)
abtink Jun 13, 2024
fa71a8a
[diag] specify sending frame (#10359)
bukepo Jun 13, 2024
6bc3b4d
[mdns] use `NextFireTime` for scheduling timers (#10371)
abtink Jun 13, 2024
69924ea
[cli] update `service add` command to allow empty server data (#10377)
abtink Jun 14, 2024
fb24bec
[mle] add `TxMessage::AppendLinkAndMleFrameCounterTlvs()` (#10378)
abtink Jun 14, 2024
3b589b3
[routing-manager] add `RxRaTracker::Router::IsReachable()` (#10379)
abtink Jun 14, 2024
a98b60e
[udp] clear all properties in `SocketHandle` from `Udp::Open()` (#10380)
abtink Jun 14, 2024
18e635d
[dataset] move secure storage methods to `DatasetManager` (#10381)
abtink Jun 14, 2024
503bca0
[mle] add `GetLeaderRloc16()` helper method (#10383)
abtink Jun 14, 2024
cba0f5c
[mle] use `RouterIdMatch()` to compare Router IDs of two RLOC16 value…
abtink Jun 14, 2024
3315c44
[mle] rename mesh local address methods to use `Rloc` and `Eid` (#10385)
abtink Jun 14, 2024
282f54c
[ip6] fix warning when logging enabled (#10375)
brian-level Jun 14, 2024
8a8a4d8
[netif] remove multicast promiscuous mode configuration (#10338)
konradderda Jun 14, 2024
5127e7e
[mle] enhance RLOC and ALOC address generation (#10391)
abtink Jun 17, 2024
1837b64
github-actions: bump codecov/codecov-action from 4.3.1 to 4.5.0 (#10395)
dependabot[bot] Jun 17, 2024
0fac5dc
[child-supervision] remove unused method declarations (#10394)
zhanglongxia Jun 17, 2024
4749aa2
[routing-manager] add `mIsReachable` to `otBorderRoutingRouterEntry` …
abtink Jun 17, 2024
54afce9
[udp] add template `SocketIn` class for easier socket usage (#10392)
abtink Jun 18, 2024
fad66e2
[posix] add OT sys API to get the spinel driver (#10393)
Irving-cl Jun 18, 2024
a46786b
[cli] `udp bind` doc update to clarify that multicast address cannot …
EskoDijk Jun 18, 2024
fc0646c
[simulation] fix tiny issue of infra if (#10402)
Irving-cl Jun 18, 2024
4e8f3c0
[posix] check whether the RCP support specified Spinel properties (#1…
zhanglongxia Jun 18, 2024
4978e58
[otci] add ADB USB connection support for OTCI (#10406)
zhanglongxia Jun 19, 2024
3345af0
[otci] fix the `setDaemon() is deprecated` warning (#10409)
zhanglongxia Jun 19, 2024
e581f07
[ip6] add `Ip6::Address::IsLinkLocalUnicastOrMulticast()` (#10405)
abtink Jun 19, 2024
31e512a
[mle] replace `Mle::GetNextHop()` with `GetParentRloc16()` (#10407)
abtink Jun 19, 2024
215c23f
[diag] add diag output callback (#10354)
zhanglongxia Jun 20, 2024
387831b
[routing-manager] simplify `RxRaTracker::HandleRouterTimer()` (#10382)
abtink Jun 21, 2024
1b87190
[cli] output service ID when listing services in network data (#10408)
abtink Jun 21, 2024
89b54dc
[mle] remove `GetNextHop()` and directly use `RouterTable` method (#1…
abtink Jun 21, 2024
473fbca
[child-table] add `HasMinimalChild()` and move logic from `MleRouter`…
abtink Jun 21, 2024
8370a82
[mesh-forwarder] remove unused `SetDiscoverParameters()` method (#10420)
abtink Jun 24, 2024
a9f34d9
[child] use `Array<Ip6::Address>` to track registered addresses (#10422)
abtink Jun 24, 2024
336984b
[mle] add `IsRouterRloc16()` and `IsChildRloc16()` (#10423)
abtink Jun 24, 2024
5d3764d
[doc] fix the broken link of `meshdiag topology` in CLI README (#10430)
superwhd Jun 24, 2024
35847e1
github-actions: bump step-security/harden-runner from 2.7.0 to 2.8.1 …
dependabot[bot] Jun 24, 2024
ea25f09
[mesh-forwarder] move `CheckReachability()` to `MeshForwarder` (#10421)
abtink Jun 24, 2024
9232ead
[posix] fix build with custom netif prefix route set (#10431)
agners Jun 24, 2024
8bd427b
[spinel] log sent Spinel frames (#10429)
zhanglongxia Jun 24, 2024
7d61987
[mesh-forwarder] update forwarding messages to ALOC destination (#10419)
abtink Jun 24, 2024
ec69ad3
[posix] add rcp diag command to check RCP's radio and spinel capabili…
zhanglongxia Jun 25, 2024
7b779a3
[child] update MLR masks when removing registered IPv6 addresses (#10…
abtink Jun 25, 2024
dc69fb1
[tcat-agent] use `Dataset` directly when setting Active Dataset (#10433)
abtink Jun 25, 2024
cc8f66c
[core] use RLOC16-related constants and methods consistently across m…
abtink Jun 25, 2024
588dfae
[posix] check the max number of RCP supported sleepy children (#10399)
zhanglongxia Jun 26, 2024
c8681ff
[routing-manager] centralize `RxRaTracker` decision logic and signali…
abtink Jun 26, 2024
21b5764
[child] add `GetIp6Addresses()` and simplify MLR state tracking (#10424)
abtink Jun 26, 2024
975ffd7
[meshcop] simplify appending and parsing of `NetworkNameTlv` (#10441)
abtink Jun 26, 2024
7252cad
[posix] skip 0x00 bytes at the start of the received SPI frame (#10442)
zhanglongxia Jun 26, 2024
f2ed3e9
[dns-client] switch to separate SRV/TXT queries on response timeout (…
abtink Jun 27, 2024
7ca21a3
[tlv] ensure handling of extended TLVs when iterating over sub-TLVs (…
abtink Jun 27, 2024
e10a925
[srp] fix `otSrpClientStart` documentation (#10435)
jrhodie Jun 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[posix] check the max number of RCP supported sleepy children (#10399)
This commit adds a diag command to rcp capbility diag module to check
the max number of RCP supported sleepy children.
  • Loading branch information
zhanglongxia authored Jun 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 588dfae6f4be08106b355b18835241291497c08a
12 changes: 12 additions & 0 deletions src/posix/platform/README_RCP_CAPS_DIAG.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ This module provides diag commands for checking RCP capabilities.

- [capflags](#capflags)
- [spinel](#spinel)
- [srcmatchtable](#srcmatchtable)

## Command Details

@@ -112,3 +113,14 @@ PROP_VALUE_SET PHY_TX_POWER ------------------------------- OK
PROP_VALUE_SET RADIO_COEX_ENABLE -------------------------- OK
Done
```

### srcmatchtable

Check the source match table size supported by the RCP.

```bash
> diag rcpcaps srcmatchtable
ShortSrcMatchTableSize ------------------------------------ 128
ExtendedSrcMatchTableSize --------------------------------- 128
Done
```
73 changes: 73 additions & 0 deletions src/posix/platform/rcp_caps_diag.cpp
Original file line number Diff line number Diff line change
@@ -457,6 +457,10 @@ otError RcpCapsDiag::DiagProcess(char *aArgs[], uint8_t aArgsLength)
{
ProcessCapabilityFlags();
}
else if (strcmp(aArgs[1], "srcmatchtable") == 0)
{
ProcessSrcMatchTable();
}
else if (strcmp(aArgs[1], "spinel") == 0)
{
ProcessSpinel();
@@ -616,6 +620,66 @@ bool RcpCapsDiag::IsSpinelCapabilitySupported(const uint8_t *aCapsData, spinel_s
return ret;
}

void RcpCapsDiag::ProcessSrcMatchTable(void)
{
OutputShortSrcMatchTableSize();
OutputExtendedSrcMatchTableSize();
}

void RcpCapsDiag::OutputShortSrcMatchTableSize(void)
{
constexpr uint8_t kRouterIdOffset = 10;
constexpr uint8_t kRouterId = 5;
uint16_t num = 0;
uint16_t shortAddress;

SuccessOrExit(mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_ENABLED, SPINEL_DATATYPE_BOOL_S, true /* aEnable */));
SuccessOrExit(mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES, nullptr));

for (num = 0; num < kMaxNumChildren; num++)
{
shortAddress = num | (kRouterId << kRouterIdOffset);
SuccessOrExit(
mRadioSpinel.Insert(SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES, SPINEL_DATATYPE_UINT16_S, shortAddress));
}

exit:
if (num != 0)
{
IgnoreReturnValue(mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES, nullptr));
IgnoreReturnValue(
mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_ENABLED, SPINEL_DATATYPE_BOOL_S, false /* aEnable */));
}

OutputFormat("ShortSrcMatchTableSize", num);
}

void RcpCapsDiag::OutputExtendedSrcMatchTableSize(void)
{
otExtAddress extAddress = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88};
uint16_t num = 0;

SuccessOrExit(mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_ENABLED, SPINEL_DATATYPE_BOOL_S, true /* aEnable */));
SuccessOrExit(mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES, nullptr));

for (num = 0; num < kMaxNumChildren; num++)
{
*reinterpret_cast<uint16_t *>(extAddress.m8) = num;
SuccessOrExit(
mRadioSpinel.Insert(SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES, SPINEL_DATATYPE_EUI64_S, extAddress.m8));
}

exit:
if (num != 0)
{
IgnoreReturnValue(mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES, nullptr));
IgnoreReturnValue(
mRadioSpinel.Set(SPINEL_PROP_MAC_SRC_MATCH_ENABLED, SPINEL_DATATYPE_BOOL_S, false /* aEnable */));
}

OutputFormat("ExtendedSrcMatchTableSize", num);
}

void RcpCapsDiag::OutputFormat(const char *aName, const char *aValue)
{
static constexpr uint8_t kMaxNameLength = 56;
@@ -628,6 +692,15 @@ void RcpCapsDiag::OutputFormat(const char *aName, const char *aValue)
Output("%.*s %s %s\r\n", kMaxNameLength, aName, &kPadding[paddingOffset], aValue);
}

void RcpCapsDiag::OutputFormat(const char *aName, uint32_t aValue)
{
static constexpr uint16_t kValueLength = 11;
char value[kValueLength];

snprintf(value, sizeof(value), "%u", aValue);
OutputFormat(aName, value);
}

void RcpCapsDiag::OutputResult(const SpinelEntry &aEntry, otError error)
{
static constexpr uint8_t kSpaceLength = 1;
6 changes: 6 additions & 0 deletions src/posix/platform/rcp_caps_diag.hpp
Original file line number Diff line number Diff line change
@@ -108,8 +108,11 @@ class RcpCapsDiag
RcpCapsDiag::SpinelCommandHandler mHandler;
};

static constexpr uint16_t kMaxNumChildren = 512;

void ProcessSpinel(void);
void ProcessCapabilityFlags(void);
void ProcessSrcMatchTable(void);
void TestSpinelCommands(Category aCategory);
void TestRadioCapbilityFlags(void);
void OutputRadioCapFlags(Category aCategory, uint32_t aRadioCaps, const uint32_t *aFlags, uint16_t aNumbFlags);
@@ -120,7 +123,10 @@ class RcpCapsDiag
const uint32_t *aFlags,
uint16_t aNumbFlags);
bool IsSpinelCapabilitySupported(const uint8_t *aCapsData, spinel_size_t aCapsLength, uint32_t aCapability);
void OutputExtendedSrcMatchTableSize(void);
void OutputShortSrcMatchTableSize(void);
void OutputFormat(const char *aName, const char *aValue);
void OutputFormat(const char *aName, uint32_t aValue);
void OutputResult(const SpinelEntry &aEntry, otError error);
void Output(const char *aFormat, ...);