Install the driver of physical device for a SR-IOV virtual device
Currently, network dumping failed over a NIC that is a Single Root I/O
Virtualization (SR-IOV) virtual device. Usually the driver of the
virtual device won't specify the dependency on the driver of the
physical device. So to fix this issue, the driver of the physical device
needs to be found and installed as well.
Fixes: a65dde2d
("Reduce kdump memory consumption by only installing needed NIC drivers")
Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
parent
9726838241
commit
2fa4739f2b
@ -381,6 +381,14 @@ _get_hpyerv_physical_driver() {
|
||||
_get_nic_driver "$_physical_nic"
|
||||
}
|
||||
|
||||
_get_physical_function_driver() {
|
||||
local _physfn_dir=/sys/class/net/"$1"/device/physfn
|
||||
|
||||
if [[ -e "$_physfn_dir" ]]; then
|
||||
basename "$(readlink -f "$_physfn_dir"/driver)"
|
||||
fi
|
||||
}
|
||||
|
||||
kdump_install_nic_driver() {
|
||||
local _netif _driver _drivers
|
||||
|
||||
@ -408,6 +416,9 @@ kdump_install_nic_driver() {
|
||||
fi
|
||||
|
||||
_drivers+=("$_driver")
|
||||
# For a Single Root I/O Virtualization (SR-IOV) virtual device,
|
||||
# the driver of physical device needs to be installed as well
|
||||
_drivers+=("$(_get_physical_function_driver "$_netif")")
|
||||
done
|
||||
|
||||
[[ -n ${_drivers[*]} ]] || return
|
||||
|
Loading…
Reference in New Issue
Block a user