feat(networking): configure unused network ports to prevent errors and optimize boot time
treefmt / nix fmt (pull_request) Successful in 5s
pytest / pytest (pull_request) Successful in 49s
build_systems / build-bob (pull_request) Successful in 1m9s
build_systems / build-brain (pull_request) Successful in 1m12s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m15s
treefmt / nix fmt (push) Successful in 6s
pytest / pytest (push) Successful in 25s
build_systems / build-jeeves (pull_request) Successful in 2m59s
build_systems / build-brain (push) Successful in 32s
build_systems / build-bob (push) Successful in 33s
build_systems / build-rhapsody-in-green (push) Successful in 46s
build_systems / build-jeeves (push) Successful in 2m26s
treefmt / nix fmt (pull_request) Successful in 5s
pytest / pytest (pull_request) Successful in 49s
build_systems / build-bob (pull_request) Successful in 1m9s
build_systems / build-brain (pull_request) Successful in 1m12s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m15s
treefmt / nix fmt (push) Successful in 6s
pytest / pytest (push) Successful in 25s
build_systems / build-jeeves (pull_request) Successful in 2m59s
build_systems / build-brain (push) Successful in 32s
build_systems / build-bob (push) Successful in 33s
build_systems / build-rhapsody-in-green (push) Successful in 46s
build_systems / build-jeeves (push) Successful in 2m26s
This commit was merged in pull request #34.
This commit is contained in:
@@ -22,6 +22,11 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
useNetworkd = true;
|
useNetworkd = true;
|
||||||
|
# Without this, unconfigured NICs get a catch-all DHCP network and
|
||||||
|
# join the LAN uninvited (how the dead atlantic card ended up
|
||||||
|
# ARP-poisoning 192.168.99.14). Every interface must be configured
|
||||||
|
# explicitly below.
|
||||||
|
useDHCP = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
@@ -46,6 +51,20 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
networks = {
|
networks = {
|
||||||
|
# Unused second port of the onboard i350; keep it down so the dead
|
||||||
|
# PCIe link (see dmesg "PCIe link lost") stops logging Tx errors.
|
||||||
|
"01-unused-igb-port" = {
|
||||||
|
matchConfig.Name = "enp97s0f0";
|
||||||
|
linkConfig.ActivationPolicy = "always-down";
|
||||||
|
};
|
||||||
|
# Aquantia 10G card (0000:21:00.0); loses PCIe link, and its
|
||||||
|
# unicast RX path is dead while TX still works, so when it's up it
|
||||||
|
# answers ARP for the host IPs and black-holes the replies. Keep
|
||||||
|
# it down until the card is fixed or replaced.
|
||||||
|
"01-unused-atlantic-port" = {
|
||||||
|
matchConfig.Name = "enp33s0";
|
||||||
|
linkConfig.ActivationPolicy = "always-down";
|
||||||
|
};
|
||||||
"10-Primary" = {
|
"10-Primary" = {
|
||||||
matchConfig.Name = "enp97s0f1";
|
matchConfig.Name = "enp97s0f1";
|
||||||
address = [ "192.168.99.14/24" ];
|
address = [ "192.168.99.14/24" ];
|
||||||
|
|||||||
@@ -16,6 +16,20 @@ in
|
|||||||
ExecStart = "${pkgs.bash}/bin/bash ${../scripts/plex_permission.sh}";
|
ExecStart = "${pkgs.bash}/bin/bash ${../scripts/plex_permission.sh}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# The unused onboard i350 port hangs ~90s after every boot ("PCIe
|
||||||
|
# link lost", MMIO reads return all-Fs) even with pcie_aspm=off.
|
||||||
|
# Remove it from the PCI bus so nothing (hwmon temperature polls,
|
||||||
|
# networkd) touches the dead hardware. Reversible via
|
||||||
|
# `echo 1 > /sys/bus/pci/rescan`.
|
||||||
|
remove_dead_igb_port = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
description = "removes hung i350 port 0000:61:00.0 from the PCI bus";
|
||||||
|
unitConfig.ConditionPathExists = "/sys/bus/pci/devices/0000:61:00.0/remove";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.bash}/bin/bash -c 'echo 1 > /sys/bus/pci/devices/0000:61:00.0/remove'";
|
||||||
|
};
|
||||||
|
};
|
||||||
startup_validation = {
|
startup_validation = {
|
||||||
requires = [ "network-online.target" ];
|
requires = [ "network-online.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user