Page MenuHomeFreeBSD

netlink: add NETLINK to the DEFAULTS for each architecture
ClosedPublic

Authored by melifaro on Mar 30 2023, 10:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 9:34 PM
Unknown Object (File)
Mon, Apr 8, 5:51 PM
Unknown Object (File)
Feb 9 2024, 12:21 PM
Unknown Object (File)
Dec 20 2023, 5:17 AM
Unknown Object (File)
Dec 15 2023, 12:59 AM
Unknown Object (File)
Dec 13 2023, 12:22 AM
Unknown Object (File)
Nov 21 2023, 5:33 AM
Unknown Object (File)
Nov 21 2023, 5:33 AM

Details

Summary

NETLINK is going to replace rtsock and a number of other ioctl/sysctl interfaces. In-base utilies such as route(8), netstat(8) and soon ifconfig(8) are being converted to use netlink sockets as a transport between kenel and userland.

In the current configuration, it still possible have the kernel without NETLINK (nooptions NETLINK) and use the aforementioned utilies by buidling the world with WITHOUT_NETLINK src.conf knob. However, this approach does not cover the cases when person unintentionally builds a custom kernel without netlink and tries to use the standard userland.

This change adds option NETLINK to the default options for each architecture, fixing the custom kernel issue.

For arm, use std.armv6 and std.armv7 (netlink already in) instead of DEFAULTS.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

melifaro retitled this revision from netlink: add NETLINK to the DEFAULTS for each arch arm. to netlink: add NETLINK to the DEFAULTS for each arch except arm..Mar 30 2023, 10:17 AM
melifaro edited the summary of this revision. (Show Details)

Don't remove NETLINK from arm/std.armv7.

What's the reason for armv6 ?

In D39339#895585, @manu wrote:

What's the reason for armv6 ?

I think, it's size concerns (but better to ask @imp):

size of RPI-B kernel:
         | unstripped | stripped |
----------------------------------
no NL    | 9753152    | 8274516  |
with NL  | 9847512    | 8359004  |
diff     |   94360    |   84488  |

e.g. there is about ~90k difference w/ netlink compiled in. I don't know if that's significant or not.
Personally I don't have any objects on including Netlink to armv6.

add NETLINK to arm/std.armv6

melifaro retitled this revision from netlink: add NETLINK to the DEFAULTS for each arch except arm. to netlink: add NETLINK to the DEFAULTS for each architecture.Mar 30 2023, 1:14 PM
melifaro edited the summary of this revision. (Show Details)
In D39339#895585, @manu wrote:

What's the reason for armv6 ?

Updated te review to include NETLINK to std.armv6.

thanks! This is what I had in mind.

This revision is now accepted and ready to land.Mar 30 2023, 1:34 PM

I really have no position one way or another on how this netlink transition occurs, and have only loosely followed the reviews/commits/discussions. Yet it seems to me this has done a complete circle back to where it started in D39047.

What is the point of NETLINK being a config option at all if it is added to DEFAULTS? If it is added to DEFAULTS do we need to have an auto-loaded kernel module? It does not seem there are any #ifdef NETLINK present in the kernel yet, will there be?

I think the justification to move it to DEFAULTS is not that strong considering we keep INET out of it -- how many standard user tools break if one forgets this option in their custom config?

Do not consider this an objection, there are already too many voices in this discussion. But I find myself totally confused trying to follow the changing decisions around this.

What is the point of NETLINK being a config option at all if it is added to DEFAULTS?

This is primarily driven by people raising concerns and/or a desire to be conservative. IMO in the fullness of time this support for making it optional etc. should be removed, but would like to have it remain as an option in stable branches. I'd also like to see more fuzzing and review.