Skip to contentSkip to conversation

Remove IPVlan module dependencies on IPv6 and L3 Master dev

PATCH Superseded Matteo Croce 2 participants 6 messages Feb 17, 2018 – Feb 19, 2018

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 944ec3c9282c..3234c6618d75 100644
@@ -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
#2 lore raw

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
index 944ec3c9282c..3234c6618d75 100644
@@ -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
maintainer
#3 lore raw

Re: [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 into addr_equal() and refactor series of if-else into a switch.

---
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.

#4 lore raw

PATCH v2 2/2 ipvlan: selects master_l3 device instead of depending on it

In reply to Matteo Croce

The 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
index 3234c6618d75..d88b78a17440 100644
@@ -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
#5 lore raw
In reply to Matteo Croce
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_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

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