Remove IPVlan module dependencies on IPv6 and L3 Master dev
Subsystems (2)
v2 cover Remove IPVlan module dependencies on IPv6 and L3 Master dev
The IPVlan module currently depends on IPv6 and L3 Master dev. Refactor the code to allow building IPVlan module regardless of the value of CONFIG_IPV6 and CONFIG_NETFILTER, and change the CONFIG_NET_L3_MASTER_DEV dependency into a select, as compiling L3 Master device alone has no sense.
$ grep -wE 'CONFIG_(IPV6|IPVLAN)' .config CONFIG_IPV6=y CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 48K drivers/net/ipvlan/ipvlan.ko
$ grep -wE 'CONFIG_(IPV6|IPVLAN)' .config # CONFIG_IPV6 is not set CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 44K drivers/net/ipvlan/ipvlan.ko
Matteo Croce (2):
ipvlan: drop ipv6 dependency
ipvlan: selects master_l3 device instead of depending on it
drivers/net/Kconfig | 3 +- drivers/net/ipvlan/ipvlan_core.c | 71 ++++++++++++++++++++++++++++++---------- drivers/net/ipvlan/ipvlan_main.c | 48 +++++++++++++++++---------- 3 files changed, 85 insertions(+), 37 deletions(-)
Signature · 1 line
2.14.3
PATCH v2 1/2 ipvlan: drop ipv6 dependency
IPVlan has an hard dependency on IPv6.
Refactor the ipvlan code to allow compiling it with IPv6 disabled.
--- drivers/net/Kconfig | 1 - drivers/net/ipvlan/ipvlan_core.c | 71 ++++++++++++++++++++++++++++++---------- drivers/net/ipvlan/ipvlan_main.c | 48 +++++++++++++++++---------- 3 files changed, 84 insertions(+), 36 deletions(-)
drivers/net/Kconfig +0 -1
@@ -149,7 +149,6 @@ config MACVTAP config IPVLAN tristate "IP-VLAN support" depends on INET - depends on IPV6 depends on NETFILTER depends on NET_L3_MASTER_DEV ---help---
drivers/net/ipvlan/ipvlan_core.c +53 -18
169 lines not on this page · raw message
drivers/net/ipvlan/ipvlan_main.c +31 -17
125 lines not on this page · raw message
Signature · 1 line
2.14.3
PATCH v3 1/2 ipvlan: drop ipv6 dependency
IPVlan has an hard dependency on IPv6.
Refactor the ipvlan code to allow compiling it with IPv6 disabled, move duplicate code into addr_equal() and refactor series of if-else into a switch.
---
v3: more descriptive commit message and fix checkpatch.pl warnings
drivers/net/Kconfig | 1 - drivers/net/ipvlan/ipvlan_core.c | 72 ++++++++++++++++++++++++++++++---------- drivers/net/ipvlan/ipvlan_main.c | 48 +++++++++++++++++---------- 3 files changed, 85 insertions(+), 36 deletions(-)
drivers/net/Kconfig +0 -1
@@ -149,7 +149,6 @@ config MACVTAP config IPVLAN tristate "IP-VLAN support" depends on INET - depends on IPV6 depends on NETFILTER depends on NET_L3_MASTER_DEV ---help---
drivers/net/ipvlan/ipvlan_core.c +54 -18
170 lines not on this page · raw message
drivers/net/ipvlan/ipvlan_main.c +31 -17
125 lines not on this page · raw message
Signature · 1 line
2.14.3
David Miller
maintainerRe: [PATCH v3 net-next 1/2] ipvlan: drop ipv6 dependency
From: Matteo Croce <[email protected]>
Date: Mon, 19 Feb 2018 11:33:37 +0100
Quoted 7 lines
IPVlan has an hard dependency on IPv6.
Refactor the ipvlan code to allow compiling it with IPv6 disabled, move duplicate code intoaddr_equal()and refactor series of if-else into a switch.Signed-off-by Matteo Croce <[email protected]>---
v3: more descriptive commit message and fix checkpatch.pl warnings
Please, when making a change to a patch in a series, always resubmit the entire series.
Thank you.
PATCH v2 2/2 ipvlan: selects master_l3 device instead of depending on it
In reply to Matteo CroceThe L3 Master device is just a glue between the core networking code and device drivers, so it should be selected automatically rather than requiring to be enabled explicitly.
--- drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/Kconfig +1 -1
@@ -150,7 +150,7 @@ config IPVLAN tristate "IP-VLAN support" depends on INET depends on NETFILTER - depends on NET_L3_MASTER_DEV + select NET_L3_MASTER_DEV ---help--- This allows one to create virtual devices off of a main interface and packets will be delivered based on the dest L3 (IPv6/IPv4 addr)
Signature · 1 line
2.14.3
Quoted 21 lines · Matteo Croce
The IPVlan module currently depends on IPv6 and L3 Master dev. Refactor the code to allow building IPVlan module regardless of the value of
CONFIG_IPV6andCONFIG_NETFILTER, and change theCONFIG_NET_L3_MASTER_DEVdependency into a select, as compiling L3 Master device alone has no sense.$ grep -wE 'CONFIG_(IPV6|IPVLAN)' .config CONFIG_IPV6=y CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 48K drivers/net/ipvlan/ipvlan.ko$ grep -wE 'CONFIG_(IPV6|IPVLAN)' .config # CONFIG_IPV6 is not set CONFIG_IPVLAN=m $ ll drivers/net/ipvlan/ipvlan.ko 44K drivers/net/ipvlan/ipvlan.koMatteo Croce (2):
ipvlan: drop ipv6 dependency
ipvlan: selectsmaster_l3device instead of depending on it
Quoted 8 lines
drivers/net/Kconfig | 3 +- drivers/net/ipvlan/ipvlan_core.c | 71 ++++++++++++++++++++++++++++++---------- drivers/net/ipvlan/ipvlan_main.c | 48 +++++++++++++++++---------- 3 files changed, 85 insertions(+), 37 deletions(-)--
2.14.3
Just noticed the wrong subject, really it's 0/2
Regards,
Signature · 2 lines
Matteo Croce per aspera ad upstream