diff mbox

[OpenWrt-Devel,RFC,2/2] modules/netsupport: Add MPLS support

Message ID 1454192087-11405-2-git-send-email-avalentin@marcant.net
State Changes Requested
Headers show

Commit Message

André Valentin Jan. 30, 2016, 10:14 p.m. UTC
Add needed modules for MPLS support.

Signed-off-by: André Valentin <avalentin@marcant.net>
---
 package/kernel/linux/modules/netsupport.mk | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

Felix Fietkau Jan. 30, 2016, 10:20 p.m. UTC | #1
On 2016-01-30 23:14, André Valentin wrote:
> Add needed modules for MPLS support.
> 
> Signed-off-by: André Valentin <avalentin@marcant.net>
> ---
>  package/kernel/linux/modules/netsupport.mk | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
> index 446996e..0215722 100644
> --- a/package/kernel/linux/modules/netsupport.mk
> +++ b/package/kernel/linux/modules/netsupport.mk
> @@ -1029,3 +1029,26 @@ define KernelPackage/rxrpc/description
>  endef
>  
>  $(eval $(call KernelPackage,rxrpc))
> +
> +define KernelPackage/mpls
> +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
> +  TITLE:=MPLS support
> +  KCONFIG:= \
> +	CONFIG_MPLS \
> +	CONFIG_NET_MPLS_GSO=m \
> +	CONFIG_MPLS_ROUTING=m \
> +	CONFIG_MPLS_IPTUNNEL=m
> +  FILES:= \
> +	$(LINUX_DIR)/net/mpls/mpls_gso.ko \
> +	$(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
> +	$(LINUX_DIR)/net/mpls/mpls_router.ko
> +  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
> +  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
> +endef
Since this is causing some code to be built into the kernel image,
please do a measurement of how much it adds.

Thanks,

- Felix
André Valentin Jan. 31, 2016, 12:14 a.m. UTC | #2
Hi!

Am 30.01.2016 um 23:20 schrieb Felix Fietkau:
> On 2016-01-30 23:14, André Valentin wrote:
>> Add needed modules for MPLS support.
>>
>> Signed-off-by: André Valentin <avalentin@marcant.net>
>> ---
>>  package/kernel/linux/modules/netsupport.mk | 23 +++++++++++++++++++++++
>>  1 file changed, 23 insertions(+)
>>
>> diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
>> index 446996e..0215722 100644
>> --- a/package/kernel/linux/modules/netsupport.mk
>> +++ b/package/kernel/linux/modules/netsupport.mk
>> @@ -1029,3 +1029,26 @@ define KernelPackage/rxrpc/description
>>  endef
>>  
>>  $(eval $(call KernelPackage,rxrpc))
>> +
>> +define KernelPackage/mpls
>> +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
>> +  TITLE:=MPLS support
>> +  KCONFIG:= \
>> +	CONFIG_MPLS \
>> +	CONFIG_NET_MPLS_GSO=m \
>> +	CONFIG_MPLS_ROUTING=m \
>> +	CONFIG_MPLS_IPTUNNEL=m
>> +  FILES:= \
>> +	$(LINUX_DIR)/net/mpls/mpls_gso.ko \
>> +	$(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
>> +	$(LINUX_DIR)/net/mpls/mpls_router.ko
>> +  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
>> +  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
>> +endef
> Since this is causing some code to be built into the kernel image,
> please do a measurement of how much it adds.

Sorry, forgot this. Here are the numbers:

Size of the modules:
mpls_gso.ko:    3101 Bytes
mpls_iptunnel:  4367 Bytes
mpls_router:   17451 Bytes
---------------------------
modules total: 24.3 KiB

André
Felix Fietkau Jan. 31, 2016, 12:45 a.m. UTC | #3
On 2016-01-31 01:14, Andre Valentin wrote:
> Hi!
> 
> Am 30.01.2016 um 23:20 schrieb Felix Fietkau:
>> On 2016-01-30 23:14, André Valentin wrote:
>>> Add needed modules for MPLS support.
>>>
>>> Signed-off-by: André Valentin <avalentin@marcant.net>
>>> ---
>>>  package/kernel/linux/modules/netsupport.mk | 23 +++++++++++++++++++++++
>>>  1 file changed, 23 insertions(+)
>>>
>>> diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
>>> index 446996e..0215722 100644
>>> --- a/package/kernel/linux/modules/netsupport.mk
>>> +++ b/package/kernel/linux/modules/netsupport.mk
>>> @@ -1029,3 +1029,26 @@ define KernelPackage/rxrpc/description
>>>  endef
>>>  
>>>  $(eval $(call KernelPackage,rxrpc))
>>> +
>>> +define KernelPackage/mpls
>>> +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
>>> +  TITLE:=MPLS support
>>> +  KCONFIG:= \
>>> +	CONFIG_MPLS \
>>> +	CONFIG_NET_MPLS_GSO=m \
>>> +	CONFIG_MPLS_ROUTING=m \
>>> +	CONFIG_MPLS_IPTUNNEL=m
>>> +  FILES:= \
>>> +	$(LINUX_DIR)/net/mpls/mpls_gso.ko \
>>> +	$(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
>>> +	$(LINUX_DIR)/net/mpls/mpls_router.ko
>>> +  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
>>> +  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
>>> +endef
>> Since this is causing some code to be built into the kernel image,
>> please do a measurement of how much it adds.
> 
> Sorry, forgot this. Here are the numbers:
> 
> Size of the modules:
> mpls_gso.ko:    3101 Bytes
> mpls_iptunnel:  4367 Bytes
> mpls_router:   17451 Bytes
> ---------------------------
> modules total: 24.3 KiB
I mean the kernel image size increase (before and after selecting MPLS
support), I don't care much about the modules size.

Thanks,

- Felix
diff mbox

Patch

diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index 446996e..0215722 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -1029,3 +1029,26 @@  define KernelPackage/rxrpc/description
 endef
 
 $(eval $(call KernelPackage,rxrpc))
+
+define KernelPackage/mpls
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=MPLS support
+  KCONFIG:= \
+	CONFIG_MPLS \
+	CONFIG_NET_MPLS_GSO=m \
+	CONFIG_MPLS_ROUTING=m \
+	CONFIG_MPLS_IPTUNNEL=m
+  FILES:= \
+	$(LINUX_DIR)/net/mpls/mpls_gso.ko \
+	$(LINUX_DIR)/net/mpls/mpls_iptunnel.ko \
+	$(LINUX_DIR)/net/mpls/mpls_router.ko
+  AUTOLOAD:=$(call AutoLoad,30,mpls_router mpls_iptunnel mpls_gso)
+  DEPENDS:=+@KERNEL_MPLS +@KERNEL_LWTUNNEL 
+endef
+
+define KernelPackage/mpls/description
+  Kernel support for MPLS
+endef
+
+$(eval $(call KernelPackage,mpls))
+