Skip to content
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

lib/attr: add nla functions for variable-length integers #398

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

Geywn
Copy link

@Geywn Geywn commented Aug 15, 2024

The NLA_{UINT|SINT} attributes[1] are introduced for variable-length integers, whose length are 32bits or 64bits.

So add appropriate functions to get or put NLA_{UINT|SINT} attributes.

[1] https://lore.kernel.org/netdev/[email protected]/

lib/attr.c Outdated Show resolved Hide resolved
lib/attr.c Outdated Show resolved Hide resolved
@thom311
Copy link
Owner

thom311 commented Aug 15, 2024

thanks for the patch!

The NLA_{SINT|UINT} were introduced to kernel (see [1]). So add the
corresponding enum value to attr.h.

[1] https://lore.kernel.org/r/[email protected]/

Signed-off-by: Wen Gu <[email protected]>
@Geywn Geywn force-pushed the nla_variable_length_integer branch from 026c516 to b107fa9 Compare August 16, 2024 03:42
@Geywn
Copy link
Author

Geywn commented Aug 16, 2024

change log:
v2->v1:

  1. add a new patch to introduce NLA_{SINT|UINT} enum value to include/netlink/attr.h, and adjust nla_attr_minlen.
  2. fix the missing return in the 2nd patch.

@Geywn Geywn requested a review from thom311 August 16, 2024 03:48
lib/attr.c Show resolved Hide resolved
The NLA_{UINT|SINT} attributes are introduced for variable-length
integers, whose length are 32bits or 64bits.

So add appropriate functions to get or put NLA_{UINT|SINT} attributes.

Signed-off-by: Wen Gu <[email protected]>
@Geywn Geywn force-pushed the nla_variable_length_integer branch from b107fa9 to b8d3cfb Compare August 17, 2024 08:27
@Geywn
Copy link
Author

Geywn commented Aug 17, 2024

change log:
v3->v2:
expose nla_{get|put}_{s|u}int ABI in libnl-3.sym.

v2->v1:
add a new patch to introduce NLA_{SINT|UINT} enum value to include/netlink/attr.h, and adjust nla_attr_minlen.
fix the missing return in the 2nd patch.

@Geywn Geywn requested a review from thom311 August 17, 2024 08:32
@thom311 thom311 merged commit 277eb32 into thom311:main Aug 19, 2024
4 checks passed
@thom311
Copy link
Owner

thom311 commented Aug 19, 2024

merged. Thank you!!

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