Page MenuHomeFreeBSD

netlink: add netlink to GENERIC
ClosedPublic

Authored by melifaro on Dec 22 2022, 3:07 PM.
Tags
None
Referenced Files
F81575913: D37783.diff
Thu, Apr 18, 8:55 AM
F81565645: D37783.id115028.diff
Thu, Apr 18, 4:24 AM
Unknown Object (File)
Wed, Apr 17, 3:06 PM
Unknown Object (File)
Tue, Apr 16, 6:27 AM
Unknown Object (File)
Thu, Mar 28, 2:05 PM
Unknown Object (File)
Tue, Mar 26, 3:43 AM
Unknown Object (File)
Feb 12 2024, 7:02 PM
Unknown Object (File)
Feb 12 2024, 7:02 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 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.