diff mbox

[3/4] netatop: enable required kernel feature

Message ID 20161007203031.21528-3-ricardo.martincoski@datacom.ind.br
State Changes Requested
Headers show

Commit Message

Ricardo Martincoski Oct. 7, 2016, 8:30 p.m. UTC
When netatop is enabled, the required kernel feature is enabled.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
---
Inspired by 4c10eedc103ba9648f73439f1ab5d801da9d2ed7
---
 linux/linux.mk            | 2 ++
 package/netatop/Config.in | 2 ++
 2 files changed, 4 insertions(+)

Comments

Thomas Petazzoni Oct. 7, 2016, 9:20 p.m. UTC | #1
Hello,

On Fri,  7 Oct 2016 17:30:30 -0300, Ricardo Martincoski wrote:
> When netatop is enabled, the required kernel feature is enabled.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>

Is CONFIG_NETFILTER=y required to *build* the netatop module, or only
needed at runtime ?

Two cases:

 - If it's needed to build the netatop module, then this change should
   be part of the commit adding the netatop package.

 - If it's needed only at runtime, we have a more relaxed policy, and we
   generally don't enforce the kernel options in such a case.

Thanks,

Thomas
Ricardo Martincoski Oct. 8, 2016, 8:45 p.m. UTC | #2
Thomas,

On Fri, Oct 07, 2016 at 06:20 PM, Thomas Petazzoni wrote:

> On Fri,  7 Oct 2016 17:30:30 -0300, Ricardo Martincoski wrote:
>> When netatop is enabled, the required kernel feature is enabled.
>> 
>> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
> 
> Is CONFIG_NETFILTER=y required to *build* the netatop module, or only
> needed at runtime ?

It is required to build the module.

> 
> Two cases:
> 
>  - If it's needed to build the netatop module, then this change should
>    be part of the commit adding the netatop package.

Ok. I will send both in one commit when I respin.

> 
>  - If it's needed only at runtime, we have a more relaxed policy, and we
>    generally don't enforce the kernel options in such a case.
> 

Thank you for your review.

Regards,
Ricardo
diff mbox

Patch

diff --git a/linux/linux.mk b/linux/linux.mk
index 988427c..8f40a60 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -260,6 +260,8 @@  define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS,$(@D)/.config)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
+	$(if $(BR2_PACKAGE_NETATOP),
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_SYSTEMD),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)
diff --git a/package/netatop/Config.in b/package/netatop/Config.in
index f54a55f..3582962 100644
--- a/package/netatop/Config.in
+++ b/package/netatop/Config.in
@@ -14,6 +14,8 @@  config BR2_PACKAGE_NETATOP
 
 	  - CONFIG_NETFILTER
 
+	  This option will be automatically enabled by Buildroot.
+
 	  http://www.atoptool.nl/netatop.php
 
 comment "netatop needs a Linux kernel >= 2.6.24 to be built"