上传文件至 /

This commit is contained in:
ob
2023-11-08 03:13:46 +00:00
parent 94de5e39a7
commit b5da22a63f
4 changed files with 82 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Script to enable SR-IOV on boot
Before=network.target
[Service]
ExecStart=/usr/bin/sr-iov.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh
# set x520 port 1&2 up
ip link set dev enp1s0f0 up
ip link set dev enp1s0f1 up
ip link set dev enp1s0f1v0 up
ip link set dev enp1s0f1v1 up
ip link set dev enp1s0f1v2 up
ip link set dev enp1s0f1v3 up
# set x540 port 1&2 up
ip link set dev enp3s0f0 up
ip link set dev enp3s0f1 up
ip link set dev enp3s0f1v0 up
ip link set dev enp3s0f1v1 up
ip link set dev enp3s0f1v2 up
ip link set dev enp3s0f1v3 up
# set x520 vf 0-4 static mac address port1
ip link set dev enp1s0f0 vf 0 mac 00:52:6b:a5:a3:11
ip link set dev enp1s0f0 vf 1 mac 00:52:6b:a5:a3:12
ip link set dev enp1s0f0 vf 2 mac 00:52:6b:a5:a3:13
ip link set dev enp1s0f0 vf 3 mac 00:52:6b:a5:a3:14
# set x520 vf 0-4 static mac address port2
ip link set dev enp1s0f1 vf 0 mac 00:52:6b:a5:a3:21
ip link set dev enp1s0f1 vf 1 mac 00:52:6b:a5:a3:22
ip link set dev enp1s0f1 vf 2 mac 00:52:6b:a5:a3:23
ip link set dev enp1s0f1 vf 3 mac 00:52:6b:a5:a3:24
# set x540 vf 0-4 static mac address port1
ip link set dev enp3s0f0 vf 0 mac 00:54:6b:a5:a3:11
ip link set dev enp3s0f0 vf 1 mac 00:54:6b:a5:a3:12
ip link set dev enp3s0f0 vf 2 mac 00:54:6b:a5:a3:13
ip link set dev enp3s0f0 vf 3 mac 00:54:6b:a5:a3:14
# set x540 vf 0-4 static mac address port2
ip link set dev enp3s0f1 vf 0 mac 00:54:6b:a5:a3:21
ip link set dev enp3s0f1 vf 1 mac 00:54:6b:a5:a3:22
ip link set dev enp3s0f1 vf 2 mac 00:54:6b:a5:a3:23
ip link set dev enp3s0f1 vf 3 mac 00:54:6b:a5:a3:24
+28
View File
@@ -0,0 +1,28 @@
#
# /etc/sysfs.conf - Configuration file for setting sysfs attributes.
#
# The sysfs mount directory is automatically prepended to the attribute paths.
# The attribute paths support glob(7) wildcard patterns.
#
# Syntax:
# attribute = value
# mode attribute = 0600 # (any valid argument for chmod)
# owner attribute = root:wheel # (any valid argument for chown)
#
# Examples:
#
# Always use the powersave CPU frequency governor
# devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave
#
# Use userspace CPU frequency governor and set initial speed
# devices/system/cpu/cpu0/cpufreq/scaling_governor = userspace
# devices/system/cpu/cpu0/cpufreq/scaling_setspeed = 600000
#
# Set permissions of suspend control file
# mode power/state = 0660
# owner power/state = root:power
#
# 2023-11-03 edit by ob_ sr-iov xt540 xt520 max_fs=4
bus/pci/devices/0000:01:00.1/sriov_numvfs=4
bus/pci/devices/0000:03:00.0/sriov_numvfs=4
bus/pci/devices/0000:03:00.1/sriov_numvfs=4
+3
View File
@@ -0,0 +1,3 @@
options vfio_iommu_type1 allow_unsafe_interrupts=1
#options vfio-pci ids=8086:3e96,8086:a352,8086:1528
options vfio-pci ids=8086:a352,8086:1528