public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: <netdev@vger.kernel.org>, <kuba@kernel.org>, <jgg@nvidia.com>,
	<leonro@nvidia.com>, <horms@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Tal Gilboa <talgi@nvidia.com>,
	"open list:LIBRARY CODE" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2] lib: Allow for the DIM library to be modular
Date: Tue, 7 May 2024 15:13:02 +0200	[thread overview]
Message-ID: <dfc2d0b4-3ff4-424f-8bdd-3e9bdedba914@intel.com> (raw)
In-Reply-To: <20240506175040.410446-1-florian.fainelli@broadcom.com>

From: Florian Fainelli <florian.fainelli@broadcom.com>
Date: Mon,  6 May 2024 10:50:40 -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.

Some bloat-o-meter -c vmlinux.{before,after} would be good to have here.
The library is small, but I personally would like to see it modular.

> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>

> ---
> Changes in v2:
> 
> - Added MODULE_DESCRIPTION()
> 
>  lib/Kconfig      | 2 +-
>  lib/dim/Makefile | 4 ++--
>  lib/dim/dim.c    | 3 +++
>  3 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/Kconfig b/lib/Kconfig
> index 4557bb8a5256..d33a268bc256 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -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
> diff --git a/lib/dim/Makefile b/lib/dim/Makefile
> index 1d6858a108cb..c4cc4026c451 100644
> --- a/lib/dim/Makefile
> +++ b/lib/dim/Makefile
> @@ -2,6 +2,6 @@
>  # DIM Dynamic Interrupt Moderation library
>  #
>  
> -obj-$(CONFIG_DIMLIB) += dim.o
> +obj-$(CONFIG_DIMLIB) += dimlib.o

I guess you renamed it due to that there's already a module named 'dim'?

>  
> -dim-y := dim.o net_dim.o rdma_dim.o
> +dimlib-objs := dim.o net_dim.o rdma_dim.o
> diff --git a/lib/dim/dim.c b/lib/dim/dim.c
> index e89aaf07bde5..83b65ac74d73 100644
> --- a/lib/dim/dim.c
> +++ b/lib/dim/dim.c
> @@ -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");

Thanks,
Olek

  reply	other threads:[~2024-05-07 13:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 17:50 [PATCH net-next v2] lib: Allow for the DIM library to be modular Florian Fainelli
2024-05-07 13:13 ` Alexander Lobakin [this message]
2024-05-07 17:08   ` Florian Fainelli
2024-05-08  9:17     ` Alexander Lobakin
2024-05-07 23:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dfc2d0b4-3ff4-424f-8bdd-3e9bdedba914@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=horms@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=talgi@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox