Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers
@ 2022-08-12 16:07 Stefan Agner
  2022-08-13 11:51 ` Yann E. MORIN
  2022-08-15  9:36 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Agner @ 2022-08-12 16:07 UTC (permalink / raw)
  To: buildroot, christian; +Cc: stefan

Docker network driver "overlay", "macvlan" and "ipvlan" are not used
by default. Make them a module.

The main aim here is to get rid of the dummy0 network interface which
is generated by the dummy driver by default. For consistency, make
all kernel drivers required for Docker network drivers a module. Also
add the currently missing CONFIG_BRIDGE_VLAN_FILTERING (mandatory
for the Docker network driver "overlay").

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 package/docker-engine/docker-engine.mk | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk
index 293af1858c..730f2e3b86 100644
--- a/package/docker-engine/docker-engine.mk
+++ b/package/docker-engine/docker-engine.mk
@@ -124,10 +124,11 @@ define DOCKER_ENGINE_LINUX_CONFIG_FIXUPS
 	$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_DUMMY)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_MACVLAN)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_IPVLAN)
-	$(call KCONFIG_ENABLE_OPT,CONFIG_VXLAN)
+	$(call KCONFIG_SET_OPT,CONFIG_DUMMY,m)
+	$(call KCONFIG_SET_OPT,CONFIG_MACVLAN,m)
+	$(call KCONFIG_SET_OPT,CONFIG_IPVLAN,m)
+	$(call KCONFIG_SET_OPT,CONFIG_VXLAN,m)
+	$(call KCONFIG_SET_OPT,CONFIG_BRIDGE_VLAN_FILTERING,m)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_VETH)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
-- 
2.37.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers
  2022-08-12 16:07 [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers Stefan Agner
@ 2022-08-13 11:51 ` Yann E. MORIN
  2022-08-14 21:27   ` Arnout Vandecappelle
  2022-08-15  9:36 ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2022-08-13 11:51 UTC (permalink / raw)
  To: Stefan Agner; +Cc: buildroot

Stefan, All,

On 2022-08-12 18:07 +0200, Stefan Agner spake thusly:
> Docker network driver "overlay", "macvlan" and "ipvlan" are not used
> by default. Make them a module.
> 
> The main aim here is to get rid of the dummy0 network interface which
> is generated by the dummy driver by default. For consistency, make
> all kernel drivers required for Docker network drivers a module. Also
> add the currently missing CONFIG_BRIDGE_VLAN_FILTERING (mandatory
> for the Docker network driver "overlay").
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  package/docker-engine/docker-engine.mk | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk
> index 293af1858c..730f2e3b86 100644
> --- a/package/docker-engine/docker-engine.mk
> +++ b/package/docker-engine/docker-engine.mk
> @@ -124,10 +124,11 @@ define DOCKER_ENGINE_LINUX_CONFIG_FIXUPS
>  	$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE)
>  	$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE)
>  	$(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE)
> -	$(call KCONFIG_ENABLE_OPT,CONFIG_DUMMY)
> -	$(call KCONFIG_ENABLE_OPT,CONFIG_MACVLAN)
> -	$(call KCONFIG_ENABLE_OPT,CONFIG_IPVLAN)
> -	$(call KCONFIG_ENABLE_OPT,CONFIG_VXLAN)
> +	$(call KCONFIG_SET_OPT,CONFIG_DUMMY,m)
> +	$(call KCONFIG_SET_OPT,CONFIG_MACVLAN,m)
> +	$(call KCONFIG_SET_OPT,CONFIG_IPVLAN,m)
> +	$(call KCONFIG_SET_OPT,CONFIG_VXLAN,m)
> +	$(call KCONFIG_SET_OPT,CONFIG_BRIDGE_VLAN_FILTERING,m)

That entirely overrides the options from the configuration file provided
by the user, if they have and require any of those options set as =y.

I think that what we need, is to have a helper KCONFIG_ENABLE_OPT_MOD,
which only sets an option to 'm' if it is not already 'y' (i.e. the
opposite of KCONFIG_ENABLE_OPT).

Regards,
Yann E. MORIN.

>  	$(call KCONFIG_ENABLE_OPT,CONFIG_VETH)
>  	$(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
>  	$(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
> -- 
> 2.37.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers
  2022-08-13 11:51 ` Yann E. MORIN
@ 2022-08-14 21:27   ` Arnout Vandecappelle
  2022-08-14 21:46     ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2022-08-14 21:27 UTC (permalink / raw)
  To: Yann E. MORIN, Stefan Agner; +Cc: buildroot



On 13/08/2022 13:51, Yann E. MORIN wrote:
> Stefan, All,
> 
> On 2022-08-12 18:07 +0200, Stefan Agner spake thusly:
>> Docker network driver "overlay", "macvlan" and "ipvlan" are not used
>> by default. Make them a module.
>>
>> The main aim here is to get rid of the dummy0 network interface which
>> is generated by the dummy driver by default. For consistency, make
>> all kernel drivers required for Docker network drivers a module. Also
>> add the currently missing CONFIG_BRIDGE_VLAN_FILTERING (mandatory
>> for the Docker network driver "overlay").
>>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>> ---
>>   package/docker-engine/docker-engine.mk | 9 +++++----
>>   1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk
>> index 293af1858c..730f2e3b86 100644
>> --- a/package/docker-engine/docker-engine.mk
>> +++ b/package/docker-engine/docker-engine.mk
>> @@ -124,10 +124,11 @@ define DOCKER_ENGINE_LINUX_CONFIG_FIXUPS
>>   	$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE)
>>   	$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE)
>>   	$(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE)
>> -	$(call KCONFIG_ENABLE_OPT,CONFIG_DUMMY)
>> -	$(call KCONFIG_ENABLE_OPT,CONFIG_MACVLAN)
>> -	$(call KCONFIG_ENABLE_OPT,CONFIG_IPVLAN)
>> -	$(call KCONFIG_ENABLE_OPT,CONFIG_VXLAN)
>> +	$(call KCONFIG_SET_OPT,CONFIG_DUMMY,m)
>> +	$(call KCONFIG_SET_OPT,CONFIG_MACVLAN,m)
>> +	$(call KCONFIG_SET_OPT,CONFIG_IPVLAN,m)
>> +	$(call KCONFIG_SET_OPT,CONFIG_VXLAN,m)
>> +	$(call KCONFIG_SET_OPT,CONFIG_BRIDGE_VLAN_FILTERING,m)
> 
> That entirely overrides the options from the configuration file provided
> by the user, if they have and require any of those options set as =y.
> 
> I think that what we need, is to have a helper KCONFIG_ENABLE_OPT_MOD,
> which only sets an option to 'm' if it is not already 'y' (i.e. the
> opposite of KCONFIG_ENABLE_OPT).

  Actually, if they're optional, I wouldn't configure them at all. Someone who 
doesn't need this feature may very well want to build a kernel that doesn't have 
them at all, even as modules. Or you may even build a kernel that doesn't have 
module support.

  We don't have a good way to make those options "suggested", other than 
mentioning them in the help text. But I do think that that's enough.

  Regards,
  Arnout

> 
> Regards,
> Yann E. MORIN.
> 
>>   	$(call KCONFIG_ENABLE_OPT,CONFIG_VETH)
>>   	$(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
>>   	$(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
>> -- 
>> 2.37.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers
  2022-08-14 21:27   ` Arnout Vandecappelle
@ 2022-08-14 21:46     ` Yann E. MORIN
  0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2022-08-14 21:46 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: Stefan Agner, buildroot

Arnout, Stefan, All,

On 2022-08-14 23:27 +0200, Arnout Vandecappelle spake thusly:
> On 13/08/2022 13:51, Yann E. MORIN wrote:
> >On 2022-08-12 18:07 +0200, Stefan Agner spake thusly:
> >>Docker network driver "overlay", "macvlan" and "ipvlan" are not used
> >>by default. Make them a module.
[--SNIP--]
>  Actually, if they're optional, I wouldn't configure them at all. Someone
> who doesn't need this feature may very well want to build a kernel that
> doesn't have them at all, even as modules. Or you may even build a kernel
> that doesn't have module support.
> 
>  We don't have a good way to make those options "suggested", other than
> mentioning them in the help text. But I do think that that's enough.

Agreed.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers
  2022-08-12 16:07 [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers Stefan Agner
  2022-08-13 11:51 ` Yann E. MORIN
@ 2022-08-15  9:36 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-15  9:36 UTC (permalink / raw)
  To: Stefan Agner; +Cc: Yann E. MORIN, buildroot

On Fri, 12 Aug 2022 18:07:01 +0200
Stefan Agner <stefan@agner.ch> wrote:

> Docker network driver "overlay", "macvlan" and "ipvlan" are not used
> by default. Make them a module.
> 
> The main aim here is to get rid of the dummy0 network interface which
> is generated by the dummy driver by default. For consistency, make
> all kernel drivers required for Docker network drivers a module. Also
> add the currently missing CONFIG_BRIDGE_VLAN_FILTERING (mandatory
> for the Docker network driver "overlay").
> 
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  package/docker-engine/docker-engine.mk | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Based on the feedback from Yann and Arnout, I have marked this patch as
Changes Requested in our patch tracking system.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-15  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-12 16:07 [Buildroot] [PATCH] package/docker-engine: use kernel modules for extra network drivers Stefan Agner
2022-08-13 11:51 ` Yann E. MORIN
2022-08-14 21:27   ` Arnout Vandecappelle
2022-08-14 21:46     ` Yann E. MORIN
2022-08-15  9:36 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox