- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly
For automated changes based on OAI PL v1.1:
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml
The rest (cmake, files with missing license, cmake) manually.
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
set -eu
|
|
|
|
pci_addr()
|
|
{
|
|
PF_IF=$1
|
|
VF_INDEX=$2
|
|
SYSFS_PATH="/sys/class/net/${PF_IF}/device/virtfn${VF_INDEX}"
|
|
|
|
if [ ! -e "$SYSFS_PATH" ]; then
|
|
echo "VF $VF_INDEX not found for interface $PF_IF"
|
|
exit 1
|
|
fi
|
|
PCI_ADDR=$(basename "$(readlink "$SYSFS_PATH")")
|
|
echo "$PCI_ADDR"
|
|
}
|
|
IF_NAME=ens1f0np0
|
|
## O-DU C Plane MAC ADDR and VLAN
|
|
C_U_PLANE_MAC_ADD=22:11:55:33:99:55
|
|
C_U_PLANE_VLAN=123
|
|
MTU=9000
|
|
DPDK_DEVBIND_PREFIX=/usr/local/bin
|
|
NUM_VFs=1
|
|
ethtool -G $IF_NAME rx 8160 tx 8160
|
|
sh -c "echo 0 > /sys/class/net/$IF_NAME/device/sriov_numvfs"
|
|
sh -c "echo $NUM_VFs > /sys/class/net/$IF_NAME/device/sriov_numvfs"
|
|
C_U_PLANE_PCI=$(pci_addr $IF_NAME 0)
|
|
# this next 2 lines is for C/U planes
|
|
ip link set $IF_NAME vf 0 mac $C_U_PLANE_MAC_ADD vlan $C_U_PLANE_VLAN spoofchk off mtu $MTU
|
|
sleep 1
|
|
modprobe iavf
|
|
${DPDK_DEVBIND_PREFIX}/dpdk-devbind.py --unbind $C_U_PLANE_PCI
|
|
modprobe vfio-pci
|
|
${DPDK_DEVBIND_PREFIX}/dpdk-devbind.py --bind vfio-pci $C_U_PLANE_PCI
|
|
echo "Successfully configured C-PLANE and U-PLANE:
|
|
- C-PLANE MAC: $C_U_PLANE_MAC_ADD, VLAN: $C_U_PLANE_VLAN, PCI: $C_U_PLANE_PCI"
|
|
exit 0
|
|
|