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

[infra if] add platform infra if module #2501

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

Irving-cl
Copy link
Contributor

This PR adds the InfraIf module on the host side.

This is to support border routing for NCP case. See this #2398 (comment) for the whole picture of this series of changes.

In this PR, InfraIf module only implements SetInfraIf method. This method is intended to be called by NcpHost during initialization or through ThreadHost API (for example, for the android case, where the infra if is ready later). This method will initialize the infra if and the border routing module on NCP.

This PR adds a unit test to verify the InfraIfDependency is called correctly.

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 58.97436% with 32 lines in your changes missing coverage. Please review.

Project coverage is 45.75%. Comparing base (2b41187) to head (2836f97).
Report is 822 commits behind head on main.

Files with missing lines Patch % Lines
src/ncp/posix/infra_if.cpp 52.72% 24 Missing and 2 partials ⚠️
tests/gtest/test_infra_if.cpp 73.91% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2501       +/-   ##
===========================================
- Coverage   55.77%   45.75%   -10.03%     
===========================================
  Files          87      102       +15     
  Lines        6890    11971     +5081     
  Branches        0      876      +876     
===========================================
+ Hits         3843     5477     +1634     
- Misses       3047     6203     +3156     
- Partials        0      291      +291     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/ncp/posix/infra_if.cpp Show resolved Hide resolved
src/ncp/posix/infra_if.hpp Outdated Show resolved Hide resolved
src/ncp/posix/infra_if.cpp Outdated Show resolved Hide resolved
src/ncp/posix/infra_if.cpp Outdated Show resolved Hide resolved
src/ncp/posix/infra_if.hpp Outdated Show resolved Hide resolved
src/ncp/posix/infra_if.hpp Show resolved Hide resolved
src/ncp/posix/infra_if.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@superwhd superwhd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall with minor suggestions

src/ncp/posix/infra_if.cpp Show resolved Hide resolved
src/ncp/posix/infra_if.cpp Outdated Show resolved Hide resolved
tests/gtest/CMakeLists.txt Outdated Show resolved Hide resolved
tests/gtest/test_infraif.cpp Outdated Show resolved Hide resolved
tests/gtest/test_infraif.cpp Outdated Show resolved Hide resolved
@Irving-cl Irving-cl force-pushed the add_infra_if_module branch 2 times, most recently from 84d4b2d to b358f5b Compare September 27, 2024 08:37
src/ncp/posix/infra_if.cpp Outdated Show resolved Hide resolved
src/ncp/posix/infra_if.hpp Outdated Show resolved Hide resolved
src/ncp/posix/infra_if.hpp Outdated Show resolved Hide resolved
@Irving-cl Irving-cl force-pushed the add_infra_if_module branch 2 times, most recently from 458fa95 to 48cda61 Compare October 8, 2024 03:34
@Irving-cl Irving-cl requested a review from bukepo October 8, 2024 03:34
@Irving-cl Irving-cl requested a review from jwhui October 9, 2024 02:43
Copy link
Member

@abtink abtink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jwhui jwhui merged commit 3e9be20 into openthread:main Oct 10, 2024
32 checks passed
@Irving-cl Irving-cl deleted the add_infra_if_module branch October 11, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants