diff --git a/powerpc-utils-1.3.9-fix-hexdump-format.patch b/powerpc-utils-1.3.9-fix-hexdump-format.patch new file mode 100644 index 0000000..9b7b2bb --- /dev/null +++ b/powerpc-utils-1.3.9-fix-hexdump-format.patch @@ -0,0 +1,39 @@ +diff -up powerpc-utils-1.3.9/scripts/hcnmgr.me powerpc-utils-1.3.9/scripts/hcnmgr +--- powerpc-utils-1.3.9/scripts/hcnmgr.me 2021-11-11 11:38:33.293898966 +0100 ++++ powerpc-utils-1.3.9/scripts/hcnmgr 2021-11-11 11:39:19.302587637 +0100 +@@ -168,7 +168,7 @@ search_dev() { + # Look at pci ethernet devices + for pci_dev in "$DT_PATH"/pci*; do + [ -d "$pci_dev" ] || continue +- index=$(hexdump -n 4 -e '/1 "%02x"' "$pci_dev"/ibm,my-drc-index) ++ index=$(hexdump -n 4 -ve '/1 "%02x"' "$pci_dev"/ibm,my-drc-index) + if [[ $index != "$1" ]]; then + continue + fi +@@ -189,7 +189,7 @@ search_dev() { + hcnlog DEBUG "search vnic device with drc_index $1" + for dev in "$DT_PATH"/vdevice/vnic*; do + [ -d "$dev" ] || continue +- index=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,my-drc-index) ++ index=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,my-drc-index) + if [[ $index == "$1" ]]; then + hcnlog DEBUG "found matching drc_index $index in $dev" + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +@@ -205,7 +205,7 @@ search_dev() { + hcnlog DEBUG "search ibmveth device with drc_index $1" + for dev in "$DT_PATH"/vdevice/l-lan*; do + [ -d "$dev" ] || continue +- index=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,my-drc-index) ++ index=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,my-drc-index) + if [[ $index == "$1" ]]; then + hcnlog DEBUG "found matching drc_index $index in $dev" + if [ -e "$dev"/ibm,hcn-id ] && get_dev_hcn "$dev"; then +@@ -233,7 +233,7 @@ get_dev_hcn() { + local dev=$1 + + hcnlog DEBUG "get_dev_hcn: enter $1" +- HCNID=$(hexdump -n 4 -e '/1 "%02x"' "$dev"/ibm,hcn-id) ++ HCNID=$(hexdump -n 4 -ve '/1 "%02x"' "$dev"/ibm,hcn-id) + MODE=$(tr -d '\0' <"$dev"/ibm,hcn-mode) + PHYSLOC=$(tr -d '\0' <"$dev"/ibm,loc-code) + DEVPATH=$1 diff --git a/powerpc-utils-support-vnic-as-backup-device-for-HNV.patch b/powerpc-utils-support-vnic-as-backup-device-for-HNV.patch new file mode 100644 index 0000000..f93d611 --- /dev/null +++ b/powerpc-utils-support-vnic-as-backup-device-for-HNV.patch @@ -0,0 +1,22 @@ +diff -up powerpc-utils-1.3.8/scripts/hcnmgr.me powerpc-utils-1.3.8/scripts/hcnmgr +--- powerpc-utils-1.3.8/scripts/hcnmgr.me 2021-11-11 11:10:37.800910318 +0100 ++++ powerpc-utils-1.3.8/scripts/hcnmgr 2021-11-11 11:12:10.597104063 +0100 +@@ -21,7 +21,7 @@ + # support live partition migration with SR_IOV + # + +-VERSION="1.0" ++VERSION="1.1" + PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin + BOND_BASEPATH="/sys/class/net" + BONDOPTIONS="mode=1,miimon=100,fail_over_mac=2" +@@ -630,6 +630,9 @@ fi + if ! nmcli --version >/dev/null 2>&1; then + err $E_ENETUNREACH + fi ++# HNV can support VNIC or Veth as backup device. ++# In the first HNV version 1.0, the vNIC as backup support was turned off ++# HNV VERSION greater than 1.0 starts to support vNIC as the backup device + if [[ $VERSION == "1.0" ]]; then + VNIC_SPT="OFF" + fi diff --git a/powerpc-utils.spec b/powerpc-utils.spec index c89e4b7..4fdcc02 100644 --- a/powerpc-utils.spec +++ b/powerpc-utils.spec @@ -1,6 +1,6 @@ Name: powerpc-utils Version: 1.3.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: PERL-based scripts for maintaining and servicing PowerPC systems License: GPLv2 @@ -31,7 +31,10 @@ Patch3: powerpc-utils-1.3.5-pseries_platform-man.patch Patch4: powerpc-utils-1.3.5-update_flash_nv.patch Patch5: powerpc-utils-1.3.8-install-man.patch Patch7: powerpc-utils-1.3.8-hcnmgr.patch - +# enable support for vnic as backup device +Patch8: powerpc-utils-support-vnic-as-backup-device-for-HNV.patch +# fixed hexdump format +Patch9: powerpc-utils-1.3.9-fix-hexdump-format.patch %description PERL-based scripts for maintaining and servicing PowerPC systems. @@ -207,6 +210,11 @@ systemctl daemon-reload >/dev/null 2>&1 || : %changelog +* Thu Nov 11 2021 Than Ngo - 1.3.9-4 +- enable support vnic as backend for HNV interface +- fixed hexdump format + Resolves: #2022235 + * Wed Oct 20 2021 Than Ngo - 1.3.9-3 - Resolves: #2014916, marked smt.state as %%ghost