Page MenuHomeFreeBSD

netlink: add netlink to GENERIC
ClosedPublic

Authored by melifaro on Dec 22 2022, 3:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 4:06 AM
Unknown Object (File)
Wed, Nov 6, 1:23 PM
Unknown Object (File)
Tue, Oct 29, 2:53 PM
Unknown Object (File)
Fri, Oct 25, 8:59 PM
Unknown Object (File)
Fri, Oct 25, 3:47 PM
Unknown Object (File)
Oct 2 2024, 10:59 PM
Unknown Object (File)
Oct 2 2024, 8:42 PM
Unknown Object (File)
Oct 2 2024, 8:41 PM

Details

Summary

Overview

Netlink is a communication protocol defined in RFC 3549. It is async, TLV-based protocol, providing 1-1 and 1-many communications between kernel and userland. Netlink is currently used in Linux kernel to modify, read and subscribe for nearly all networking states. Interface state, addresses, routes, firewall, rules, fibs, etc, are controlled via Netlink.
Netlink support was added in D36002. It has got a number of improvements and first customers since then.

  • First third-party application - net/bird2 got netlink support
  • There is WIP for netlink-based devd notifications in D37574.
  • Linux(4) now depends on netlink.

Netlink in GENERIC

I would like to enable it in GENERIC for two reasons.
The first one is to provide some stability for the third-party userland applications, so they can rely on the fact that netlink always exists since 14/13.2. Loadable module makes it notably harder to account for. For example, net/bird2 can be either build with netlink or rtsock support.

The second one is to enable the gradual conversion of the base userland tools to use netlink(4) interfaces. Converting tools like netstat (D36529), route, ifconfig one-by-one simplifies the testing/fixing cycle. Othewise, switching all base to use netlink at once may be too big of a leap.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 48794
Build 45683: arc lint + arc unit

Event Timeline

zlei retitled this revision from netlink: add to netlink to GENERIC to netlink: add netlink to GENERIC.Dec 22 2022, 3:35 PM
melifaro retitled this revision from netlink: add netlink to GENERIC to netlink: add to netlink to GENERIC.Dec 22 2022, 4:07 PM
melifaro edited the summary of this revision. (Show Details)
melifaro added a reviewer: network.
melifaro retitled this revision from netlink: add to netlink to GENERIC to netlink: add netlink to GENERIC.Dec 22 2022, 5:33 PM

Netlinks is a communication protocol ...

Netlink

currently used in Linux kernel to modify, read and subscribe for nearly all networking state.

Maybe we can specify RFC 3549 first? Sure it originated in Linux, but the fact that it has an RFC gives additional credence to implementing it, and enabling it by default, IMO.

Netlink support was added in D36002.

When committing this ought to be the git hash instead of original review

Netlinks is a communication protocol ...

Netlink

currently used in Linux kernel to modify, read and subscribe for nearly all networking state.

Maybe we can specify RFC 3549 first? Sure it originated in Linux, but the fact that it has an RFC gives additional credence to implementing it, and enabling it by default, IMO.

I updated the description, thank you! I hope it reads better now.

Netlink support was added in D36002.

When committing this ought to be the git hash instead of original review

Sure!

If there are no objections, I will commit it on Monday, December 26.

Is NETLINK ready for PowerPC and RISC-V ?

This revision was not accepted when it landed; it landed in state Needs Review.Jan 13 2023, 10:42 AM
This revision was automatically updated to reflect the committed changes.