Skip to content

net: Cherry pick net_mgmt API changes #2990

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Jun 26, 2025

There was an API breaking change in net_mgmt upstream, cherry-pick the change to align NCS codebase and catch any potential breakages early.

@rlubos rlubos changed the title net: Cherry pick net_mgmt APIchanges net: Cherry pick net_mgmt API changes Jun 26, 2025
jukkar and others added 6 commits June 27, 2025 10:13
Instead of using 32 bit enum values for event numbers, convert
the code to use 64 bit long bit fields. This means that the
user API is changed to use 64 bit event values instead of 32
bit event values.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 5a9a39caf3bf5195a38194bb844a428eaa7f2bb8)
Signed-off-by: Robert Lubos <[email protected]>
…t_mgmt sockets

We cannot use the network management event number directly as
a socket option value because the management value is uint64_t
and that cannot be mapped directly to 32 bit integer.
So have an intermediate socket option that is mapped to actual
network management request number in getsockopt() and setsockopt().

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 2ed2232f17f732bcf8b21db70e6dfb4e49782be1)
Signed-off-by: Robert Lubos <[email protected]>
…I changes

Add information how the net_mgmt request handler is changed.
The event number type is changed from uint32_t to uint64_t to allow
the event command to be a bit mask instead of enum value.

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit 6b0597f631338b2193a57c91a1093b0aeb8dd1d2)
Signed-off-by: Robert Lubos <[email protected]>
As per API overview documentation, a braking API change must
increment major version number.

https://docs.zephyrproject.org/latest/develop/api/overview.html#api-overview

Signed-off-by: Jukka Rissanen <[email protected]>
(cherry picked from commit b1a8655bf0d8fb64ce1034e7b7efd2e983360874)
Signed-off-by: Robert Lubos <[email protected]>
This has been missed in net_mgmt rework in commit
5a9a39caf3bf5195a38194bb844a428eaa7f2bb8.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 3e704256e308fed36dfea82b1e897439eecc49fe)
net_event.h header makes use of macros defined in net_mgmt.h, therefore
it should include that header.

Upstream PR #: 92246

Signed-off-by: Robert Lubos <[email protected]>
@rlubos rlubos force-pushed the ncs/cherry-pick-net-mgmt-api-changes branch from cfa86ad to bf5df2a Compare June 27, 2025 08:13
Copy link

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