-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathinit_nic.sh
More file actions
executable file
·34 lines (29 loc) · 1.27 KB
/
init_nic.sh
File metadata and controls
executable file
·34 lines (29 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/bash
if [ -f /lib/systemd/system/nfp-sdk6-rte.service ]; then
cp /lib/systemd/system/nfp-sdk6-rte.service /lib/systemd/system/nfp-sdk6-rte.service.backup
cp nic/scripts/nfp-sdk6-rte.service /lib/systemd/system/nfp-sdk6-rte.service
else
echo "Cannot find /lib/systemd/system/nfp-sdk6-rte.service.. please check if NFP SDK and BSP is installed"
exit 1
fi
if [ -f /opt/nfp_pif/scripts/pif_ctl_nfd.sh ]; then
cp /opt/nfp_pif/scripts/pif_ctl_nfd.sh /opt/nfp_pif/scripts/pif_ctl_nfd.sh.backup
cp nic/scripts/pif_ctl_nfd.sh /opt/nfp_pif/scripts/pif_ctl_nfd.sh
cp nic/scripts/dpdk-devbind.py /opt/nfp_pif/scripts/dpdk-devbind.py
else
echo "Cannot find /opt/nfp_pif/scripts/pif_ctl_nfd.sh.. please check if NFP SDK and BSP is installed"
exit 1
fi
cd nic/setup_teardown; ./build_p4; cd ../..
if [ ! -f nic/setup_teardown/src/build/dataplane.nffw ]; then
echo "Failed to build NIC dataplane for connection setup and teardown offload"
exit 1
fi
cd nic/splice; ./build_p4; cd ../..
if [ ! -f nic/splice/src/build/splice.nffw ]; then
echo "Failed to build NIC dataplane for connection splicing offload"
exit 1
fi
echo "---------------------------------------"
echo "Finished initializing runtime services/scripts and building NIC dataplane"
echo "---------------------------------------"