Page MenuHomeFreeBSD

netlink: return optional metadata with the operation result.
ClosedPublic

Authored by melifaro on Jan 30 2023, 6:40 PM.
Tags
None
Referenced Files
F170627948: D38283.id116102.diff
Sat, Sep 5, 5:20 PM
F170552988: D38283.id116102.diff
Sat, Sep 5, 9:21 AM
Unknown Object (File)
Fri, Sep 4, 6:57 PM
Unknown Object (File)
Fri, Sep 4, 5:36 PM
Unknown Object (File)
Thu, Sep 3, 9:05 PM
Unknown Object (File)
Thu, Sep 3, 8:31 PM
Unknown Object (File)
Wed, Sep 2, 5:29 PM
Unknown Object (File)
Wed, Sep 2, 4:39 PM

Details

Summary

Some operations like interface creation may need to return metadata - in this case, interface name - back to the caller if the operation is successful.

This change implements attaching an NLMSGERR_ATTR_COOKIE nla to the operation reply message via nlmsg_report_cookie().
Additionally, on successful interface creation, interface index and interface name are returned in the IFLA_NEW_IFINDEX and IFLA_IFNAME TLVs, encapsulated in the NLMSGERR_ATTR_COOKIE`.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Errors
Unit
No Test Coverage
Build Status
Buildable 49334
Build 46224: arc lint + arc unit

Event Timeline

melifaro added a reviewer: network.
melifaro added a reviewer: manpages.

Fix python code formatting.

Manual page change LGTM. Can't speak to consistency with source code.

This revision is now accepted and ready to land.Jan 31 2023, 6:01 PM
This revision was landed with ongoing or failed builds.Feb 9 2023, 3:30 PM
This revision was automatically updated to reflect the committed changes.