上传文件至 /
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
Reference in New Issue
Block a user