fix(network): apply RKNN network settings through NetworkManager - #155
Merged
Conversation
Signed-off-by: wangxudong <athena_wxd@163.com>
Signed-off-by: wangxudong <athena_wxd@163.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RKNN builds save network configuration but reject applying it because the network entry points are guarded as Sophon-only. Use NetworkManager to persist and apply RKNN IP, DHCP, and DNS configuration at startup.
Related issue
No linked issue; diagnosis and scope are recorded here.
Root cause
DoNetCard, DoNetCards, and DnsEffect reject every non-Sophon backend, including RKNN, while logging that the platform is x86.
Scope
In scope
Out of scope
Device deployment and firmware changes. Existing Sophon and CPU paths are unchanged.
Risk tags
Type of change
Area
Candidate identity
3eac959ee8e15ea0834eba1904b7d357297e28330c62cfa5c9bfd78a3e042ba380bc5fd2f1daea3d9a6d075d1facd1e427d3d6efa6029f5cd9e5c8e97344ea8819659e28799138cea501b899c31badab3a5e4a6a38d709170cb7ed07The original network build/package evidence below was collected for commit 8026b67 before committing, from the same five network-related changed files. They were not subsequently modified. This is not a post-commit rebuild. The tested preserve-models package reports V1.1.94 from the parent revision and is not a newly published release.
Verification
Parent baseline
FAIL (observed startup): unsupported network configuration, with
Network Init DoNetCards Ret -1. No separate parent full-suite run was collected.Candidate checks
g++ -std=c++17 -O0 -Isrc -Itest test/test_network_manager_config.cc test/catch_amalgamated.cpp -o <test-binary>then<test-binary> '[network-manager]': 5 cases, 54 assertions.bash scripts/build_cpu_test.shin the existing x86 builder.LD_LIBRARY_PATH=/src/prebuild/ffmpeg/x86_64/lib:/src/build_cpu/thirdparty_install/openssl/lib ./build_cpu/cosmo-tests: 1018 cases, 18424 assertions. Earlier execution attempts failed to resolve FFmpeg / selected incompatible system OpenSSL; the final process-local library path resolved both, without system installation.bash scripts/build_rknn.sh -c rk3576 -r /opt/rknn -p /opt/rockchip-media/rk3576 -Tin the repository-locked Rockchip builder, using production-release, preserve-models and required RKLLM settings. Both engine and aarch64 tests compiled; hardware tests were not run.python3 scripts/verify_package_contents.py --archive <package> --build-profile production-release --target-chip rk3576 --target-policy-lock config/rockchip-build/builder-lock.json.bash scripts/format_check.sh --staged --check, clang-format 18.1.8, all four changed C++ files.git diff --check.Risk-based evidence
Command workflow tested through an injected argv runner. Post-reboot network behavior on hardware remains unverified; no device/production acceptance claim is made.
Documentation impact
Compatibility and deployment impact
RKNN configuration requires NetworkManager/nmcli and permission to change network profiles. Applying a changed address can interrupt active connections. Sophon keeps its existing implementation; CPU network writes remain unsupported.
Third-party code and assets
Security and release checklist
Acceptance and cleanup
Notes for reviewers
Review profile selection and activation/reapply behavior on supported NetworkManager-managed RK images. Build and unit tests are not hardware acceptance.
CI scheduling regression
The initial x86 workflow compiled successfully but failed
CameraServiceImpl: concurrent GetTasks reads are safe: the main thread could set stop before any reader ran, resulting inreadCount == 0. This was reproduced by repeating the original test on one CPU.Each reader now performs 100 reads and the main thread checks the exact total and empty results after joining. No production code is changed by this test correction. The test covers concurrent calls against a missing camera, not atomic updates to real task state.
Validation for the updated test source before commit:
bash scripts/build_cpu_test.shand full CPU suite: 1018 cases, 33114 assertions.git diff --check.