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)
Sat, Jun 22, 2:31 AM
Unknown Object (File)
Mon, Jun 3, 4:21 PM
Unknown Object (File)
Fri, May 31, 2:30 PM
Unknown Object (File)
Mon, May 27, 6:35 AM
Unknown Object (File)
May 6 2024, 9:59 PM
Unknown Object (File)
Apr 25 2024, 4:57 PM
Unknown Object (File)
Apr 25 2024, 12:22 AM
Unknown Object (File)
Apr 22 2024, 10:53 AM

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 Not Applicable
Unit
Tests Not Applicable

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.