powerpc-utils/SOURCES/powerpc-utils-1.3.8-0b59d4a372aa266caa75f3b6a253b8f5aeaf3802.patch
2021-11-25 11:51:35 +00:00

34 lines
1.1 KiB
Diff

commit 0b59d4a372aa266caa75f3b6a253b8f5aeaf3802
Author: Mingming Cao <mmc@linux.vnet.ibm.com>
Date: Mon Mar 1 19:34:29 2021 -0800
hcnmgr: Avoid cleanup of bond interface at boot time when no HNV exists
At boot time, hcn scans the device tree and discovers if there was a new
HNV being added while lpar was inactive. It also cleans up the old hnv
interfaces. This patch avoids cleaning up bonding interface when no HNV
network devices exists.
Signed-off-by: Mingming Cao <mmc@linux.vnet.ibm.com>
[tyreld: fixup commit log]
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
diff --git a/scripts/hcnmgr b/scripts/hcnmgr
index a76505e..c95edba 100644
--- a/scripts/hcnmgr
+++ b/scripts/hcnmgr
@@ -575,7 +575,13 @@ scanhcn() {
done
fi
+ if [ ${HcnIds[@]} -eq 0 ]; then
+ hcnlog DEBUG "scanhcn: scan for hybrid virtual network finished"
+ return $E_SUCCESS
+ fi
+
# Next clean up dead connections left from orgitinal LPAR after inactive miration
+ # Only do this when the HNV ID array is not empty
# list of all HCN ids
ids="${HcnIds[*]}"