Front Haul Interface Library first seed code contribution
[o-du/phy.git] / fhi_lib / readme.txt
1 #/******************************************************************************
2 #*
3 #*   Copyright (c) 2019 Intel.
4 #*
5 #*   Licensed under the Apache License, Version 2.0 (the "License");
6 #*   you may not use this file except in compliance with the License.
7 #*   You may obtain a copy of the License at
8 #*
9 #*       http://www.apache.org/licenses/LICENSE-2.0
10 #*
11 #*   Unless required by applicable law or agreed to in writing, software
12 #*   distributed under the License is distributed on an "AS IS" BASIS,
13 #*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #*   See the License for the specific language governing permissions and
15 #*   limitations under the License.
16 #*
17 #*******************************************************************************/
18 1. Introduction
19 xRAN Lib performs communication between the low-layer split central unit (lls-CU) and RU, it is highly-optimized software implementation based on Intel Architecture to provide the standard interface implementation based on O-RAN front haul interface specification. 
20
21 2. Supported features
22 please refer PRD in the table <<xRAN release track table.xlsx>>, only ICC compiler was supported for this version.
23
24 3. Fixed Issues
25 It's first version of seed code for feature development, future fixed issues will be tracked here.
26
27 4. Known Issues
28 From current unit testing coverage, no Know issues was founded yet.
29
30 5. Prerequisites for install
31
32 5.1 Intel Compiler version
33 icc -v
34 icc version 18.0.1 (gcc version 4.8.5 compatibility)
35
36 5.2  DPDK version
37 dpdk_18.08
38
39 5.3   compile DPDK with command
40 [dpdk]# ./usertools/dpdk-setup.sh
41
42 select [16] x86_64-native-linuxapp-icc
43 select [18] Insert IGB UIO module
44 exit   [35] Exit Script
45
46 5.4 Find PCIe device of Fortville port 
47
48 lspci |grep Eth
49 19:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
50 19:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
51 41:00.0 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 04)
52 41:00.1 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 04)
53 d8:00.0 << Ethernet controller: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (rev 02) <<<< this one
54 d8:00.1 Ethernet controller: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (rev 02)
55
56 5.5 Corresponding Eth device via
57
58 ifconfig -a
59
60 find port Eth with correct PCIe Bus address as per list above
61
62 ethtool -i enp216s0f0
63 driver: i40e
64 version: 2.4.10  << i40e driver
65 firmware-version: 6.01 0x800034a4 1.1747.0
66 expansion-rom-version:
67 bus-info: 0000:d8:00.0 <<< this one 
68 supports-statistics: yes
69 supports-test: yes
70 supports-eeprom-access: yes
71 supports-register-dump: yes
72 supports-priv-flags: yes
73
74 5.6 install correct 2.4.10 i40e version if different (https://downloadcenter.intel.com/download/28306/Intel-Network-Adapter-Driver-for-PCIe-40-Gigabit-Ethernet-Network-Connections-Under-Linux-)
75
76 make sure firmare version is 
77
78 firmware-version: 6.01 
79
80 5.7 make sure that linux boot arguments are correct 
81
82 cat /proc/cmdline
83 BOOT_IMAGE=/vmlinuz-3.10.0-rt56 root=/dev/mapper/centos_5gnr--skx--sp-root ro crashkernel=auto rd.lvm.lv=centos_5gnr-skx-sp/root rd.lvm.lv=centos_5gnr-skx-sp/swap intel_iommu=off usbcore.autosuspend=-1 selinux=0 enforcing=0 nmi_watchdog=0 softlockup_panic=0 audit=0 intel_pstate=disable cgroup_disable=memory mce=off idle=poll hugepagesz=1G hugepages=20 hugepagesz=2M hugepages=0 default_hugepagesz=1G isolcpus=1-35 rcu_nocbs=1-35 kthread_cpus=0 irqaffinity=0 nohz_full=1-35
84  
85 5.8 enable SRIOV VF port for XRAN 
86
87 echo 2 > /sys/class/net/enp216s0f0/device/sriov_numvfs
88
89 see https://doc.dpdk.org/guides/nics/intel_vf.html
90
91 5.9 Check Virtual Function was created 
92
93 lspci |grep Eth
94 19:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
95 19:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
96 41:00.0 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 04)
97 41:00.1 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 04)
98 d8:00.0 Ethernet controller: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (rev 02)
99 d8:00.1 Ethernet controller: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (rev 02)
100 d8:02.0 Ethernet controller: Intel Corporation XL710/X710 Virtual Function (rev 02) <<<< this is XRAN port (u-plane)
101 d8:02.1 Ethernet controller: Intel Corporation XL710/X710 Virtual Function (rev 02) <<<< this is XRAN port (c-plane)
102
103 5.10 Configure VFs
104 - set mac to 00:11:22:33:44:66
105 - set Vlan tag to 2 (U-plane) for VF0
106 - set Vlan tag to 1 (C-plane) for VF1
107
108 [root@5gnr-sc12-xran app]# ip link set enp216s0f0 vf 0 mac 00:11:22:33:44:66 vlan 2
109 [root@5gnr-sc12-xran app]# ip link set enp216s0f0 vf 1 mac 00:11:22:33:44:66 vlan 1
110 [root@5gnr-sc12-xran app]# ip link show
111 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT qlen 1
112     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
113 2: enp65s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
114     link/ether a4:bf:01:3e:6b:79 brd ff:ff:ff:ff:ff:ff
115 3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
116     link/ether a4:bf:01:3e:6b:7a brd ff:ff:ff:ff:ff:ff
117 4: enp25s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
118     link/ether 90:e2:ba:d3:b2:ec brd ff:ff:ff:ff:ff:ff
119 5: enp129s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
120     link/ether 3c:fd:fe:a8:e0:70 brd ff:ff:ff:ff:ff:ff
121 6: enp129s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
122     link/ether 3c:fd:fe:a8:e0:71 brd ff:ff:ff:ff:ff:ff
123 7: enp216s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
124     link/ether 3c:fd:fe:9e:93:68 brd ff:ff:ff:ff:ff:ff
125     vf 0 MAC 00:11:22:33:44:66, vlan 2, spoof checking on, link-state auto, trust off
126     vf 1 MAC 00:11:22:33:44:66, vlan 1, spoof checking on, link-state auto, trust off
127 8: enp25s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT qlen 1000
128     link/ether 90:e2:ba:d3:b2:ed brd ff:ff:ff:ff:ff:ff
129 9: enp216s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
130     link/ether 3c:fd:fe:9e:93:69 brd ff:ff:ff:ff:ff:ff
131 12: enp216s2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
132     link/ether 96:fa:4d:04:4d:87 brd ff:ff:ff:ff:ff:ff
133 13: enp216s2f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
134     link/ether a6:67:49:bb:bd:5e brd ff:ff:ff:ff:ff:ff
135  
136 6. Install xRAN Lib 
137  
138 6.1 start matlab and run gen_test.m
139 copy ant_*.bin  to /xran/app
140
141 6.2 build xran sample application
142 export XRAN_DIR=xRAN folder
143 export RTE_SDK=dpdk folder
144 [xRAN root folder]$ ./build.sh
145
146 6.3 update Eth port used for XRAN
147 in ./app/run_lls-cu.sh
148 ports have to match VF function from step 1.11 (0000:d8:02.0 - U-plane  0000:d8:02.1 C-plane)
149
150 6.4 Run dpdk.sh to assign port to PMD 
151
152 [xran root folder]# ./app/dpdk.sh
153
154 Network devices using DPDK-compatible driver
155 ============================================
156 0000:d8:02.0 'XL710/X710 Virtual Function 154c' drv=igb_uio unused=i40evf
157 0000:d8:02.1 'XL710/X710 Virtual Function 154c' drv=igb_uio unused=i40evf
158
159
160 6.5 Run XRAN lls-CU sample app 
161 setup RU mac address in config_file_lls_cu.dat
162 [xran root folder]# ./app/run_lls-cu.sh
163