stx-config: add extra command to bring sriov pf device up

Extra command is needed to bring up the interface whose
inet configuration type is 'manual'.

Signed-off-by: Litao Gao <litao.gao@windriver.com>
Signed-off-by: Babak Sarashki <Babak.SarAshki@windriver.com>
This commit is contained in:
Litao Gao 2020-05-19 09:19:38 +00:00 committed by Babak Sarashki
parent 7b499fec6c
commit 3ce012269b
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff -ruN a/sysinv/sysinv/sysinv/sysinv/puppet/interface.py b/sysinv/sysinv/sysinv/sysinv/puppet/interface.py
--- a/sysinv/sysinv/sysinv/sysinv/puppet/interface.py 2020-05-19 09:09:32.685727476 +0000
+++ b/sysinv/sysinv/sysinv/sysinv/puppet/interface.py 2020-05-19 09:10:34.225727195 +0000
@@ -938,8 +938,10 @@
# others share the same pci-sriov sysfs enabling mechanism
sriovfs_path = ("/sys/class/net/%s/device/sriov_numvfs" %
get_interface_port_name(context, iface))
- options['pre_up'] = "echo 0 > %s; echo %s > %s" % (
- sriovfs_path, iface['sriov_numvfs'], sriovfs_path)
+ sriovpf_up_cmd = ("ifconfig %s up" %
+ get_interface_port_name(context, iface))
+ options['pre_up'] = "echo 0 > %s; echo %s > %s; %s" % (
+ sriovfs_path, iface['sriov_numvfs'], sriovfs_path, sriovpf_up_cmd)
elif interface_class == constants.INTERFACE_CLASS_PCI_PASSTHROUGH:
sriovfs_path = ("/sys/class/net/%s/device/sriov_numvfs" %
get_interface_port_name(context, iface))

View File

@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
SRC_URI += "file://0001-stx-config-remove-argparse-requirement-from-sysinv.patch \
file://0002-cgts-client-handle-exceptions-other-than-CalledProcessErr.patch;striplevel=4 \
file://sriovph-bring-up.patch;striplevel=4 \
"
RDEPENDS_${PN}_append = " python bash"