File tree 3 files changed +32
-2
lines changed
3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 5
5
# iommu for sebastians students
6
6
../modules/vfio/iommu-intel.nix
7
7
../modules/disko-zfs.nix
8
+ ../modules/dpdk.nix
8
9
] ;
9
10
10
11
disko . rootDisk = "/dev/sdc" ;
15
16
16
17
system . stateVersion = "21.11" ;
17
18
19
+ boot . hugepages1GB . number = 20 ;
20
+ systemd . network . ignorePci = [
21
+ "0000:00:1c.0"
22
+ "0000:00:1c.1"
23
+ ] ;
18
24
}
Original file line number Diff line number Diff line change 8
8
] ;
9
9
10
10
boot . hugepages1GB . number = 8 ;
11
+ systemd . network . ignorePci = [
12
+ "0000:00:1c.0"
13
+ "0000:00:1c.1"
14
+ ] ;
11
15
12
16
networking . hostName = "christina" ;
13
17
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ with lib;
27
27
'' ;
28
28
default = true ;
29
29
} ;
30
+ systemd . network . ignorePci = mkOption {
31
+ type = types . listOf types . nonEmptyStr ;
32
+ description = ''
33
+ Pci addresses to be ignored by systemd-networkd.
34
+ '' ;
35
+ default = [ ] ;
36
+ } ;
30
37
} ;
31
38
config = {
32
39
boot . kernelParams = [
@@ -59,8 +66,21 @@ with lib;
59
66
users . groups . kvm . members = lib . optionals config . users . addAllToKvm (
60
67
builtins . attrNames ( lib . filterAttrs ( _userName : user : user . isNormalUser ) config . users . users )
61
68
) ;
62
- systemd . network . networks = {
63
- # leave container interfaces alone
69
+ systemd . network . networks = let
70
+ ignoreConfig = pciAddress : ''
71
+ [Match]
72
+ Property=DEVPATH=/devices/pci0000:00/${ pciAddress } /*
73
+
74
+ [Link]
75
+ Unmanaged = yes
76
+ '' ;
77
+ pciIgnoreRules = builtins . listToAttrs ( builtins . map (
78
+ pciAddress : {
79
+ name = "09-ignore-${ pciAddress } " ;
80
+ value = { extraConfig = ( ignoreConfig pciAddress ) ; } ;
81
+ } ) config . systemd . network . ignorePci ) ;
82
+ in pciIgnoreRules // {
83
+ # leave 100G interfaces alone
64
84
"09-ignore-e810" . extraConfig = ''
65
85
[Match]
66
86
Driver = ice
You can’t perform that action at this time.
0 commit comments