Skip to content

Conversation

zb-gong
Copy link
Owner

@zb-gong zb-gong commented Aug 5, 2025

To generate tc, there is a notable bug to fix:
Previously, when a struct member was recursive (i.e., it referenced the same type), the generator incorrectly emitted it as a std::vector. However, recursive members should be represented as a pointer.
This PR corrects the logic by using std::unique_ptr and updating the related code accordingly.

tc-related kernel (fa582ca7e187) files are copied.

zb-gong added 5 commits August 8, 2025 14:54
This patch introduces the `TypeBinaryStruct` class to handle attributes that are of binary type and
structured as a `struct` in the `rt-addr`. Unlike the standard `TypeBinary`, `TypeBinaryStruct` has
a defined structure, so the `struct_member` should be `optional<T>` and the `presence_type` is `flag`.

Signed-off-by: Zibo Gong <[email protected]>
This patch add basic support for netlink-raw protocol. The support can
correctly generate rt-addr. To test that, a rt-addr test added in samples/.

Signed-off-by: Zibo Gong <[email protected]>
Better format for C++ lambda: a space between return type and function body.

Signed-off-by: Zibo Gong <[email protected]>
rt- family can contain - in its family name. It should be correct to use c_name.

Signed-off-by: Zibo Gong <[email protected]>
The patch fixes an issue in the determination of type_consistent. It used to set type_consistent to be False when dump exists but do does not exist.
This is inaccurate and will lead to exceptions. This case should be treated as consistent but one-sided.

Signed-off-by: Zibo Gong <[email protected]>
@zb-gong zb-gong force-pushed the rt_family branch 9 times, most recently from 6a5134b to d44dc67 Compare August 11, 2025 20:11
@zb-gong zb-gong force-pushed the rt_family branch 4 times, most recently from 2bced26 to 83dcd08 Compare August 26, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant