-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat(netif): Allow setting interface's routing priority #11617
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
Conversation
👋 Hello me-no-dev, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 13m 11s ⏱️ Results for commit 306dc46. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the NetworkInterface class to provide better route priority management capabilities. The changes rename an existing method for clarity, add new functionality to set route priorities programmatically, and improve debugging output.
- Renamed
route_prio()
togetRoutePrio()
with comprehensive documentation explaining priority values - Added
setRoutePrio()
method for ESP-IDF 5.5.0+ to allow programmatic priority setting - Enhanced debug output to display route priority information
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
NetworkInterface.h | Updates method declarations with renamed getter and new conditional setter |
NetworkInterface.cpp | Implements renamed method with documentation, adds new setter method, and enhances debug output |
|
||
bytes += out.print(" PRIO: "); | ||
bytes += out.print(getRoutePrio()); | ||
bytes += out.println(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using out.println("")
to print a newline is less clear than using out.println()
without arguments, which serves the same purpose.
bytes += out.println(""); | |
bytes += out.println(); |
Copilot uses AI. Check for mistakes.
This pull request introduces enhancements to the
NetworkInterface
class in thelibraries/Network
module, focusing on improving route priority management and aligning with ESP-IDF version updates. The key changes include renaming and documenting theroute_prio
method, adding a new method to set route priority, and updating the class interface accordingly.Enhancements to route priority management:
Renamed and documented
route_prio
method: Theroute_prio
method was renamed togetRoutePrio
for clarity, and detailed documentation was added to explain its purpose and the default priority values for different network interfaces. (NetworkInterface.cpp
[1]NetworkInterface.h
[2]Added
setRoutePrio
method: A newsetRoutePrio
method was introduced (conditionally compiled for ESP-IDF versions 5.5.0 and above) to allow setting the route priority of a network interface programmatically. (NetworkInterface.cpp
[1]NetworkInterface.h
[2]