]> git.dujemihanovic.xyz Git - linux.git/commitdiff
lib: Allow for the DIM library to be modular
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Mon, 6 May 2024 17:50:40 +0000 (10:50 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 May 2024 23:42:45 +0000 (16:42 -0700)
Allow the Dynamic Interrupt Moderation (DIM) library to be built as a
module. This is particularly useful in an Android GKI (Google Kernel
Image) configuration where everything is built as a module, including
Ethernet controller drivers. Having to build DIMLIB into the kernel
image with potentially no user is wasteful.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://lore.kernel.org/r/20240506175040.410446-1-florian.fainelli@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
lib/Kconfig
lib/dim/Makefile
lib/dim/dim.c

index 4557bb8a5256516e95019a5dc683d1e0617749aa..d33a268bc256e904cf803941ed923a05b73bd5e1 100644 (file)
@@ -628,7 +628,7 @@ config SIGNATURE
          Implementation is done using GnuPG MPI library
 
 config DIMLIB
-       bool
+       tristate
        help
          Dynamic Interrupt Moderation library.
          Implements an algorithm for dynamically changing CQ moderation values
index 1d6858a108cb8f0a4c859f354c23ae3244bfbd8a..c4cc4026c4511de2b608ddf1128aaf5bbc0c63d6 100644 (file)
@@ -2,6 +2,6 @@
 # DIM Dynamic Interrupt Moderation library
 #
 
-obj-$(CONFIG_DIMLIB) += dim.o
+obj-$(CONFIG_DIMLIB) += dimlib.o
 
-dim-y := dim.o net_dim.o rdma_dim.o
+dimlib-objs := dim.o net_dim.o rdma_dim.o
index e89aaf07bde502ec4def08d1775f925c62de7838..83b65ac74d733301ef659ed6cf629b6a018c1d2d 100644 (file)
@@ -82,3 +82,6 @@ bool dim_calc_stats(struct dim_sample *start, struct dim_sample *end,
        return true;
 }
 EXPORT_SYMBOL(dim_calc_stats);
+
+MODULE_DESCRIPTION("Dynamic Interrupt Moderation (DIM) library");
+MODULE_LICENSE("Dual BSD/GPL");