Skip to content

[thread-tlv] simplify Ip6AddressesTlv implementation - #12965

Merged
jwhui merged 1 commit into
openthread:mainfrom
abtink:thread_tlv/ip6-addr-tlv
Apr 23, 2026
Merged

[thread-tlv] simplify Ip6AddressesTlv implementation#12965
jwhui merged 1 commit into
openthread:mainfrom
abtink:thread_tlv/ip6-addr-tlv

Conversation

@abtink

@abtink abtink commented Apr 22, 2026

Copy link
Copy Markdown
Member

This commit simplifies the Ip6AddressesTlv by removing the dedicated class definition and instead defining it as a TlvInfo for the ThreadTlv::kIp6Addresses type.

The usage of Ip6AddressesTlv is updated in BbrManager, MlrManager, and related tests to use Tlv::StartTlv() and Tlv::EndTlv() when appending the TLV to messages.

This commit simplifies the `Ip6AddressesTlv` by removing the dedicated
class definition and instead defining it as a `TlvInfo` for the
`ThreadTlv::kIp6Addresses` type.

The usage of `Ip6AddressesTlv` is updated in `BbrManager`,
`MlrManager`, and related tests to use `Tlv::StartTlv()` and
`Tlv::EndTlv()` when appending the TLV to messages.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request simplifies the implementation of the IPv6 Addresses TLV by replacing a custom class with a standard TlvInfo definition. This change streamlines how these TLVs are appended to messages across the codebase, improving consistency and reducing boilerplate code in managers and tests.

Highlights

  • Refactored Ip6AddressesTlv: Removed the dedicated class definition for Ip6AddressesTlv, converting it into a TlvInfo structure for better maintainability.
  • Updated TLV Handling: Migrated usage of Ip6AddressesTlv in BbrManager, MlrManager, and tests to utilize Tlv::StartTlv() and Tlv::EndTlv() for message construction.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions

Copy link
Copy Markdown

Merging #12965 into main

name branch text data bss total
ot-cli-ftd 8fbe09e 483128 860 66548 550536
4a71fd0 483128 860 66548 550536
+/- +0 +0 +0 +0
ot-ncp-ftd 8fbe09e 448948 764 61784 511496
4a71fd0 448948 764 61784 511496
+/- +0 +0 +0 +0
ot-cli-mtd 8fbe09e 375104 764 50972 426840
4a71fd0 375120 764 50972 426856
+/- +16 +0 +0 +16
ot-ncp-mtd 8fbe09e 356180 764 46240 403184
4a71fd0 356180 764 46240 403184
+/- +0 +0 +0 +0
ot-cli-ftd-br 8fbe09e 599920 864 136732 737516
4a71fd0 599936 864 136732 737532
+/- +16 +0 +0 +16
ot-rcp 8fbe09e 63344 568 20804 84716
4a71fd0 63344 568 20804 84716
+/- +0 +0 +0 +0
Library files
name branch text data bss total
libopenthread-ftd.a 8fbe09e 251171 95 40327 291593
4a71fd0 251171 95 40327 291593
+/- +0 +0 +0 +0
libopenthread-cli-ftd.a 8fbe09e 61765 0 8091 69856
4a71fd0 61765 0 8091 69856
+/- +0 +0 +0 +0
libopenthread-ncp-ftd.a 8fbe09e 33583 0 5948 39531
4a71fd0 33583 0 5948 39531
+/- +0 +0 +0 +0
libopenthread-mtd.a 8fbe09e 169775 0 24783 194558
4a71fd0 169779 0 24783 194562
+/- +4 +0 +0 +4
libopenthread-cli-mtd.a 8fbe09e 41462 0 8059 49521
4a71fd0 41462 0 8059 49521
+/- +0 +0 +0 +0
libopenthread-ncp-mtd.a 8fbe09e 25807 0 5948 31755
4a71fd0 25807 0 5948 31755
+/- +0 +0 +0 +0
libopenthread-ftd-br.a 8fbe09e 368965 99 110471 479535
4a71fd0 368977 99 110471 479547
+/- +12 +0 +0 +12
libopenthread-cli-ftd-br.a 8fbe09e 80972 0 8131 89103
4a71fd0 80972 0 8131 89103
+/- +0 +0 +0 +0
libopenthread-rcp.a 8fbe09e 9946 0 5060 15006
4a71fd0 9946 0 5060 15006
+/- +0 +0 +0 +0
libopenthread-radio.a 8fbe09e 19939 0 238 20177
4a71fd0 19939 0 238 20177
+/- +0 +0 +0 +0

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the Ip6AddressesTlv implementation, replacing the specialized class with a standard TlvInfo definition and transitioning to the Tlv::StartTlv/Tlv::EndTlv API using Tlv::Bookmark. These updates are applied across the Backbone Router manager, MLR manager, and relevant test cases to streamline TLV processing. I have no feedback to provide.

@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.66%. Comparing base (8fbe09e) to head (7ea5ae9).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/core/backbone_router/bbr_manager.cpp 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12965      +/-   ##
==========================================
- Coverage   73.87%   68.66%   -5.21%     
==========================================
  Files         699      695       -4     
  Lines      100073   104404    +4331     
==========================================
- Hits        73929    71693    -2236     
- Misses      26144    32711    +6567     
Files with missing lines Coverage Δ
src/core/thread/mlr_manager.cpp 88.88% <100.00%> (+13.98%) ⬆️
src/core/backbone_router/bbr_manager.cpp 86.82% <60.00%> (+0.21%) ⬆️

... and 237 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@abtink
abtink marked this pull request as ready for review April 22, 2026 13:39
@jwhui
jwhui merged commit db7fd23 into openthread:main Apr 23, 2026
147 of 153 checks passed
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.

2 participants