Skip to content

Conversation

zb-gong
Copy link
Contributor

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

This PR adds code generation support for rt-link, with most of the logic ported from ynl_gen_c.py. The main feature introduced is sub-message handling, along with fixes for several minor formatting issues.

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]>
op attribute lists are referenced without checking if they are present.
Attibute list can be a optional property so this patch add them initially
if missing.

Signed-off-by: Zibo Gong <[email protected]>
rt-link spec has multi binary attribute with struct.
This patch adds support for that.

Signed-off-by: Zibo Gong <[email protected]>
@zb-gong zb-gong force-pushed the rt_family branch 5 times, most recently from 6a5134b to d44dc67 Compare August 11, 2025 20:11
@kuba-moo
Copy link
Contributor

Hi Zibo! Sorry I completely missed this PR!
Code looks good but it doesn't build for me: https://gist.github.com/kuba-moo/c780b6c656648d1f9240e2e93230395c

IPv6 are expressed as binary with exact len. This patch adds support for that.
Also, the patch re-generate the source files due to an additional header.

Signed-off-by: Zibo Gong <[email protected]>
rt-link operation can have its fixed header, which may not be the
same as the the family one.

Signed-off-by: Zibo Gong <[email protected]>
The notification op should use crud-style op when it is classic
netlink-raw family.

Signed-off-by: Zibo Gong <[email protected]>
The patch adds header specified in attribute-set.

Signed-off-by: Zibo Gong <[email protected]>
A operation can have multiple values with random order. The value of max_num
in array should use the max value after traversing the ops.

Signed-off-by: Zibo Gong <[email protected]>
Prepare for construting Struct that represent sub messages.

Signed-off-by: Zibo Gong <[email protected]>
This patch enables generation for rt-link and adds a simple application test in samples/.

Signed-off-by: Zibo Gong <[email protected]>
@zb-gong
Copy link
Contributor Author

zb-gong commented Aug 24, 2025

Ah I forgot to regenerate the source files due to a previous change. Could you try it again?

@kuba-moo
Copy link
Contributor

Looks good now, thanks!

@kuba-moo kuba-moo merged commit 9971598 into linux-netdev:main Aug 25, 2025
1 check passed
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.

2 participants