1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/kmm-setting-soft-dependencies-between-kernel-modules.adoc
2024-04-22 17:52:22 +00:00

38 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * hardware_enablement/kmm-kernel-module-management.adoc
:_mod-docs-content-type: CONCEPT
[id="kmm-setting-soft-dependencies-between-kernel-modules_{context}"]
= Set soft dependencies between kernel modules
Some configurations require that several kernel modules be loaded in a specific order to work properly, even though the modules do not directly depend on each other through symbols. These are called soft dependencies. `depmod` is usually not aware of these dependencies, and they do not appear in the files it produces. For example, if `mod_a` has a soft dependency on `mod_b`, `modprobe mod_a` will not load `mod_b`.
You can resolve these situations by declaring soft dependencies in the Module custom resource definition (CRD) using the `modulesLoadingOrder` field.
[source,yaml]
----
# ...
spec:
moduleLoader:
container:
modprobe:
moduleName: mod_a
dirName: /opt
firmwarePath: /firmware
parameters:
- param=1
modulesLoadingOrder:
- mod_a
- mod_b
----
In the configuration above, the worker pod will first try to unload the in-tree `mod_b` before loading `mod_a` from the kmod image.
When the worker pod is terminated and `mod_a` is unloaded, `mod_b` will not be loaded again.
[NOTE]
====
The first value in the list, to be loaded last, must be equivalent to the `moduleName`.
====