[v2,5/6] usertools/setup: fix loading vfio module
Checks
Commit Message
script is checking the existing of the kernel module file, but in some
distros kernel modules are stored compressed, like as 'vfio-pci.ko.xz'.
Add wildcard to cover both compressed and not compressed cases.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
usertools/dpdk-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Ferruh,
I tested this patch on Ubuntu 20.04 (5.4.0-53-generic) and
Centos 8.2 (4.18.0-193.28.1.el8_2.x86_64), load VFIO worked on both systems.
I'm not sure if this is a problem that effects either of these distros though.
Thanks,
Conor.
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Thursday 26 November 2020 14:19
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org;
> techboard@dpdk.org; Stephen Hemminger
> <stephen@networkplumber.org>; Richardson, Bruce
> <bruce.richardson@intel.com>; Walsh, Conor <conor.walsh@intel.com>
> Subject: [PATCH v2 5/6] usertools/setup: fix loading vfio module
>
> script is checking the existing of the kernel module file, but in some
> distros kernel modules are stored compressed, like as 'vfio-pci.ko.xz'.
>
> Add wildcard to cover both compressed and not compressed cases.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Conor Walsh <conor.walsh@intel.com>
On Thu, Nov 26, 2020 at 3:20 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> script is checking the existing of the kernel module file, but in some
> distros kernel modules are stored compressed, like as 'vfio-pci.ko.xz'.
Since this script expects modprobe to be installed (coming with kmod
tools), it means modinfo is available.
Checking for module availability should be "modinfo vfio-pci".
On 11/26/2020 6:31 PM, David Marchand wrote:
> On Thu, Nov 26, 2020 at 3:20 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> script is checking the existing of the kernel module file, but in some
>> distros kernel modules are stored compressed, like as 'vfio-pci.ko.xz'.
>
> Since this script expects modprobe to be installed (coming with kmod
> tools), it means modinfo is available.
> Checking for module availability should be "modinfo vfio-pci".
>
+1, that is definitely better.
I can send a new version with it if we decide to keep the script.
Mainly we are tying to decide to remove the script or keep with the changes in
this set.
There aren't still much comment on it, only comment by you in favor of removal,
I haven't seen any comment to keep the script.
Added more folks for comment, also techboard comments are welcome.
27/11/2020 10:55, Ferruh Yigit:
> On 11/26/2020 6:31 PM, David Marchand wrote:
> > On Thu, Nov 26, 2020 at 3:20 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >>
> >> script is checking the existing of the kernel module file, but in some
> >> distros kernel modules are stored compressed, like as 'vfio-pci.ko.xz'.
> >
> > Since this script expects modprobe to be installed (coming with kmod
> > tools), it means modinfo is available.
> > Checking for module availability should be "modinfo vfio-pci".
> >
>
> +1, that is definitely better.
>
> I can send a new version with it if we decide to keep the script.
It is too late to improve this old script.
We should let it die and rest in peace.
> Mainly we are tying to decide to remove the script or keep with the changes in
> this set.
I appreciate your effort Ferruh.
It shows that almost nothing is worth to keep in this script.
> There aren't still much comment on it, only comment by you in favor of removal,
> I haven't seen any comment to keep the script.
>
> Added more folks for comment, also techboard comments are welcome.
My opinion is that we should follow the deprecation notice
and remove the script in 20.11.
If someone wants to keep the same VFIO manipulations,
it is possible to copy/paste from old versions.
On 11/27/2020 1:56 PM, Thomas Monjalon wrote:
> 27/11/2020 10:55, Ferruh Yigit:
>> On 11/26/2020 6:31 PM, David Marchand wrote:
>>> On Thu, Nov 26, 2020 at 3:20 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>
>>>> script is checking the existing of the kernel module file, but in some
>>>> distros kernel modules are stored compressed, like as 'vfio-pci.ko.xz'.
>>>
>>> Since this script expects modprobe to be installed (coming with kmod
>>> tools), it means modinfo is available.
>>> Checking for module availability should be "modinfo vfio-pci".
>>>
>>
>> +1, that is definitely better.
>>
>> I can send a new version with it if we decide to keep the script.
>
> It is too late to improve this old script.
> We should let it die and rest in peace.
>
>> Mainly we are tying to decide to remove the script or keep with the changes in
>> this set.
>
> I appreciate your effort Ferruh.
> It shows that almost nothing is worth to keep in this script.
>
>> There aren't still much comment on it, only comment by you in favor of removal,
>> I haven't seen any comment to keep the script.
>>
>> Added more folks for comment, also techboard comments are welcome.
>
> My opinion is that we should follow the deprecation notice
> and remove the script in 20.11.
> If someone wants to keep the same VFIO manipulations,
> it is possible to copy/paste from old versions.
>
>
OK, there is already a patch to remove it, updating this series as rejected.
@@ -62,7 +62,7 @@ load_vfio_module()
{
remove_vfio_module
- VFIO_PATH="kernel/drivers/vfio/pci/vfio-pci.ko"
+ VFIO_PATH="kernel/drivers/vfio/pci/vfio-pci.ko*"
echo "Loading VFIO module"
/sbin/lsmod | grep -s vfio_pci > /dev/null