Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp584053lqh; Sat, 4 May 2024 13:17:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxkM0Dyg285INeD9G0FX9EhlIF2Hpg0wJuZnGOKTExPdI6uLTApBSqG2iramsrcw34fuD01ulc2g95Sg1CdrZaMoe2o22yeekJ0evY/g== X-Google-Smtp-Source: AGHT+IGHTbsYIHk6z716Z+OfHhcKTOj7k1mC54i5iLptApjOK7GFxejKbgpW+hnNxwAWNDJFCZRh X-Received: by 2002:a05:6214:29c2:b0:6a0:d21b:c914 with SMTP id gh2-20020a05621429c200b006a0d21bc914mr8172688qvb.51.1714853874225; Sat, 04 May 2024 13:17:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714853874; cv=pass; d=google.com; s=arc-20160816; b=G0Qcptb7zhbr9rcWwWBhvJkEt4ZaxNuOwsWjjXNk8lmeJxmC3Zw6NYhF9jONaUy2CJ +q0mY3uApWkpiRu6J6ZDbKAgwxZYzHqBFCrusi6IYL0fD11yYl+GcU03NaD4dxJM0/9h CAog/Ghlk1V22IDJZjlXgihPK5JfCDgYOi5WC5y8TrqhOVhVWwrDuQ5uldk9M29u0n6P Kih+AU0HVczLucRPNjf/3FS3b9kMiWDaFRl4+hkRL6LaVnoZ15MZHxAXiGTXGrSgVz+7 KvTcz3hA19qyT+wHEQixw4RSapwtL+DNBGCY9/mgd/eWZl9AuZL6mcx5gXrxrXenvH3C kGKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QEmIIou8aWMkPO+dXLbXNtwhK7P7VzXeJe62fOvk3fw=; fh=HjZZb/OBN8TnvLX9Mpl/SIz1h34uk3b+rL6HeXJKTa0=; b=LDAD85ekT4IpdtT9WgmBDB6n1VOHRWqch5+AD4GXRrksOHJX5Ej0NmKtflIQPT5jMJ rtPgk7RED9fdLiJvdJqn9pr/DrpvQQXa13+Z33zJOenaukIi+B048zVT/iNVExX3k5UT gpDgCSJoi0wK30IbH/WT7/ZCf9xlpGa+QmJl6WAImyT8dm5WySaQp1KXxt5iZBkFUYqE Wr+Ot21+mDaru//bS1BNxaeT7E8IfzER9nEhND5t7OM+4aKA9gS+pwAvL+zxEbiTBd2B 6AZvcmmhBrh5pxoTfQoh3AwqN0dkK0s52NoknWCLq+Gf3wmx8tj13UYyt/im20P5FM/b io5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e06MpcWj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id kl18-20020a056214519200b006a0a4cf9f69si5967729qvb.443.2024.05.04.13.17.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 13:17:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e06MpcWj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168814-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id ECF061C20BF6 for ; Sat, 4 May 2024 20:17:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0602084A52; Sat, 4 May 2024 20:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e06MpcWj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26F5B1BF3F; Sat, 4 May 2024 20:17:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714853863; cv=none; b=SlkW6A8i5R+RcpU66miT/3GKffGj2V8LqrUoV/NzbJmw/35w0P1FFt2nckLPgSFglMGdzcPhSTU1Jo3t2jvSJVucniZmNgv258Ft9w4o+99NLiVkxHmaTqjkSyAg9ry0cNLxliEu0WFkLLTpWjZL6Ud3/VdMtnaMFaVzmyTOCDo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714853863; c=relaxed/simple; bh=S7FTYcnhSj3UJkYyuYb6sPZpihdcm5gOjX8Oss6SzmI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=k7l0cE1IrzqitrXRWGNShmiwAP31/HsNhO0SfqwN+wWV6frKdohWtW9haJtyHMPMD6YsxV5L4lF1gtvjgHXHtz1Bentray11+Altw+8VXFEfp5WvnL+me1uAcj35tmhgP7q2CorQEPvMDrLLSMFJTyE6UJ6kZK36FBFcR+P+ce0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=e06MpcWj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7760C072AA; Sat, 4 May 2024 20:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714853862; bh=S7FTYcnhSj3UJkYyuYb6sPZpihdcm5gOjX8Oss6SzmI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e06MpcWjt3OAfVFB3793pMU6WPfPlcYWFM1pxTTwLY9Y2qRO8ySfu/24EaSkxznJ+ lYgTOqG1nFXqvQc2VREARpFu8juJhNd6EB4RW4S6lGGyMEWnp1ahUcWqriWvPe2j+a EVJymBBx1EQk8SkfSWJ7IfmmGxk9/LRnJV7KS/ORL1IznmzHHOQirPsPsCKCG2voU0 YAZTfpWRo5E2dOK56X7ymcpNr03Akra4rV9Hf4eLj+3uNLavNmtrQbYWbBdG/BKDZ/ rBlcsSTp7eN/N6dk+KWCX9M11mn1/TlVUCavVRZ0vuh4KsBpQPwUhoD+EEouCHd6yV li++2WaYZw4Zg== Date: Sat, 4 May 2024 21:16:08 +0100 From: Simon Horman To: Florian Fainelli Cc: netdev@vger.kernel.org, kuba@kernel.org, jgg@nvidia.com, leonro@nvidia.com, Andrew Morton , Tal Gilboa , "open list:LIBRARY CODE" Subject: Re: [PATCH net-next] lib: Allow for the DIM library to be modular Message-ID: <20240504201608.GJ2279@kernel.org> References: <20240503002540.7154-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240503002540.7154-1-florian.fainelli@broadcom.com> On Thu, May 02, 2024 at 05:25:40PM -0700, Florian Fainelli wrote: > 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 > --- > lib/Kconfig | 2 +- > lib/dim/Makefile | 4 ++-- > lib/dim/dim.c | 2 ++ > 3 files changed, 5 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 > > -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..c50e5b4dc46e 100644 > --- a/lib/dim/dim.c > +++ b/lib/dim/dim.c > @@ -82,3 +82,5 @@ bool dim_calc_stats(struct dim_sample *start, struct dim_sample *end, > return true; > } > EXPORT_SYMBOL(dim_calc_stats); > + > +MODULE_LICENSE("Dual BSD/GPL"); nit: If we follow this route then MODULE_DESCRIPTION should be added too, right?