* Vendor driver vs Kernel, which one gets priority?
@ 2022-10-19 15:03 Do Hak Yong
2022-10-19 17:03 ` Bjørn Mork
0 siblings, 1 reply; 3+ messages in thread
From: Do Hak Yong @ 2022-10-19 15:03 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 862 bytes --]
Hello kernel experts,
I have a few questions about the priority of kernel drivers and third party
drivers.
If I install a third party vendor driver, which has the same module name as
kernel provides, for example, Qlogic driver has the same module name as
third party driver(qla2xxx).
The questions are:
Q1. Which driver has higher priority and which driver will be used? will
there any be problems?
Q2. How to control which driver the os will use?
Q3. What if the updated kernel installed and provied higher driver version
than third party? Which one will be used then?
I think third party drivers have more precedence that kernel drivers refer
to below Red Hat KB, but I'm not sure which one will be used when the
kernel has updated.
https://access.redhat.com/solutions/176213
Your advice will be much appriciated.
Thank you
Best regards,
hakyong
[-- Attachment #1.2: Type: text/html, Size: 1550 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Vendor driver vs Kernel, which one gets priority?
2022-10-19 15:03 Vendor driver vs Kernel, which one gets priority? Do Hak Yong
@ 2022-10-19 17:03 ` Bjørn Mork
2022-10-20 10:31 ` Do Hak Yong
0 siblings, 1 reply; 3+ messages in thread
From: Bjørn Mork @ 2022-10-19 17:03 UTC (permalink / raw)
To: Do Hak Yong; +Cc: kernelnewbies
Do Hak Yong <crazyraven@gmail.com> writes:
> Hello kernel experts,
>
> I have a few questions about the priority of kernel drivers and third party
> drivers.
>
> If I install a third party vendor driver, which has the same module name as
> kernel provides, for example, Qlogic driver has the same module name as
> third party driver(qla2xxx).
>
> The questions are:
>
> Q1. Which driver has higher priority and which driver will be used? will
> there any be problems?
See depmod.d(5).
Unless overridden by config, modules in /lib/modules/$(uname -r)/updates
have priority over other modules. This can be used to replace kernel
modules with a third party driver.
The third party driver could also use a startup script to forcibly
replace already loaded modules.
> Q2. How to control which driver the os will use?
If the file names are identical, then use the "updates" directory or
configure another location to have priority over the kernel modules.
If the file names are different, then you can blacklist the kernel
module to make sure the third party module is the only one available for
auto-loading. See modprobe.d(5)
> Q3. What if the updated kernel installed and provied higher driver version
> than third party? Which one will be used then?
The default is to consider only the modules in /lib/modules/$(uname -r)
Any third party module must be updated along with the kerne. Or copied
into the new location if binary compatible. But that's not likely in
general.
> I think third party drivers have more precedence that kernel drivers refer
> to below Red Hat KB, but I'm not sure which one will be used when the
> kernel has updated.
>
> https://access.redhat.com/solutions/176213
Redhat uses a more complex depmod configuration than default. You
should probably ask them about their setup. Or just look at the config
in /etc/depmod.d/*.conf
Bjørn
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Vendor driver vs Kernel, which one gets priority?
2022-10-19 17:03 ` Bjørn Mork
@ 2022-10-20 10:31 ` Do Hak Yong
0 siblings, 0 replies; 3+ messages in thread
From: Do Hak Yong @ 2022-10-20 10:31 UTC (permalink / raw)
To: Bjørn Mork; +Cc: kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 2184 bytes --]
Thank you so much for detailed advise!!
Best regards,
2022년 10월 20일 (목) 오전 2:03, Bjørn Mork <bjorn@mork.no>님이 작성:
> Do Hak Yong <crazyraven@gmail.com> writes:
>
> > Hello kernel experts,
> >
> > I have a few questions about the priority of kernel drivers and third
> party
> > drivers.
> >
> > If I install a third party vendor driver, which has the same module name
> as
> > kernel provides, for example, Qlogic driver has the same module name as
> > third party driver(qla2xxx).
> >
> > The questions are:
> >
> > Q1. Which driver has higher priority and which driver will be used? will
> > there any be problems?
>
> See depmod.d(5).
>
> Unless overridden by config, modules in /lib/modules/$(uname -r)/updates
> have priority over other modules. This can be used to replace kernel
> modules with a third party driver.
>
> The third party driver could also use a startup script to forcibly
> replace already loaded modules.
>
> > Q2. How to control which driver the os will use?
>
> If the file names are identical, then use the "updates" directory or
> configure another location to have priority over the kernel modules.
>
> If the file names are different, then you can blacklist the kernel
> module to make sure the third party module is the only one available for
> auto-loading. See modprobe.d(5)
>
> > Q3. What if the updated kernel installed and provied higher driver
> version
> > than third party? Which one will be used then?
>
> The default is to consider only the modules in /lib/modules/$(uname -r)
>
> Any third party module must be updated along with the kerne. Or copied
> into the new location if binary compatible. But that's not likely in
> general.
>
> > I think third party drivers have more precedence that kernel drivers
> refer
> > to below Red Hat KB, but I'm not sure which one will be used when the
> > kernel has updated.
> >
> > https://access.redhat.com/solutions/176213
>
> Redhat uses a more complex depmod configuration than default. You
> should probably ask them about their setup. Or just look at the config
> in /etc/depmod.d/*.conf
>
>
> Bjørn
>
[-- Attachment #1.2: Type: text/html, Size: 2882 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-20 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 15:03 Vendor driver vs Kernel, which one gets priority? Do Hak Yong
2022-10-19 17:03 ` Bjørn Mork
2022-10-20 10:31 ` Do Hak Yong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox