Skip to content

Commit b7bc498

Browse files
committed
Add manual script to enable p1 networking
Once the fxp-net_linux-networking.pkg package has been loaded, we need to enable primary networking by designating enp0s1f0d5 as the primary networking interface on the acc. By default when the ACC first comes up, this package will not be loaded (we will use the default package which enables networking on P0/P1 on the d1/d2 interfaces respectively. However after the first time we install the vsp, this will become required. Signed-off-by: Salvatore Daniele <[email protected]>
1 parent a4f2eb3 commit b7bc498

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

ipu.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ def _prepare_imc(self, server_with_key: str) -> None:
159159
nohup sh -c '
160160
while true; do
161161
sleep 30
162-
python /usr/bin/scripts/cfg_acc_apf_x2.py
162+
if [ -f /work/scripts/ipu_p1_setup.sh ]; then
163+
/work/scripts/ipu_p1_setup.sh
164+
else
165+
break
166+
fi
163167
ping -c 1 192.168.0.2
164168
if [ $? -eq 0 ]; then
165169
break
@@ -184,6 +188,10 @@ def _prepare_imc(self, server_with_key: str) -> None:
184188
imc.run("cp /etc/imc-redfish-configuration.json /work/redfish/")
185189
imc.run(f"echo {self.password} | bash /usr/bin/ipu-redfish-generate-password-hash.sh")
186190

191+
# WA: We need to manually install this file to enable networking with the fxp-net_linux-networking.pkg
192+
imc.copy_to("./manifests/dpu/ipu_port1_setup.sh", "/work/scripts/ipu_port1_setup.sh")
193+
imc.run("chmod +x /work/scripts/ipu_port1_set.sh")
194+
187195
imc.run("reboot")
188196
time.sleep(10)
189197
imc.wait_ping()

manifests/dpu/ipu_port1_setup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This script needs to be run on reboot each time in order for P1 to be used as the primary interface via enp0s1f0d5
2+
echo "Configure enp0s1f0d5 as designated primary network interface to Microshift OVS"
3+
echo "#Add to VSI Group 1 : enp0s1f0d5 [vsi: 0x0C]"
4+
devmem 0x20292002a0 64 0x800005000000000c
5+
devmem 0x2029200388 64 0x1
6+
devmem 0x20292002a0 64 0xa00005000000000c

0 commit comments

Comments
 (0)