This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-os-buildimage/tsg-9140-scripts/roles/system-init/templates/setup.enp130s0.ips.toml.j2
2021-05-08 06:49:19 -04:00

27 lines
720 B
Django/Jinja

#!/bin/bash
INF="$1"
STA="$2"
logger "$0 called for interface named $INF with $STA ..."
if [ "$INF" == "enp130s0" ]
then
logger "$0: Interface $INF with $STA ,Set $INF VF And Vlan ..."
echo 4 > /sys/class/net/enp130s0/device/sriov_numvfs
sleep 0.5
ip link set enp130s0 vf 0 vlan 4095
ip link set enp130s0 vf 1 vlan 4095
ip link set enp130s0 vf 2 vlan 3816
ip link set enp130s0 vf 3 vlan 3817
ip link set enp130s0 vf 0 trust on
ip link set enp130s0 vf 1 trust on
ip link set enp130s0 vf 2 trust on
ip link set enp130s0 vf 3 trust on
ip link set enp130s0 vf 0 spoofchk off
sleep 1
ip link set enp130s2 up
ip link set enp130s2f1 up
ip link set enp130s2f2 up
ip link set enp130s2f3 up
fi