Explorar o código

mpls: Refactor how the mpls module is built

This refactoring is needed to allow more than just mpls gso
support to be built into the mpls moddule.

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman %!s(int64=10) %!d(string=hai) anos
pai
achega
cec9166ca4
Modificáronse 2 ficheiros con 18 adicións e 2 borrados
  1. 1 1
      net/Makefile
  2. 17 1
      net/mpls/Kconfig

+ 1 - 1
net/Makefile

@@ -69,7 +69,7 @@ obj-$(CONFIG_BATMAN_ADV)	+= batman-adv/
 obj-$(CONFIG_NFC)		+= nfc/
 obj-$(CONFIG_NFC)		+= nfc/
 obj-$(CONFIG_OPENVSWITCH)	+= openvswitch/
 obj-$(CONFIG_OPENVSWITCH)	+= openvswitch/
 obj-$(CONFIG_VSOCKETS)	+= vmw_vsock/
 obj-$(CONFIG_VSOCKETS)	+= vmw_vsock/
-obj-$(CONFIG_NET_MPLS_GSO)	+= mpls/
+obj-$(CONFIG_MPLS)		+= mpls/
 obj-$(CONFIG_HSR)		+= hsr/
 obj-$(CONFIG_HSR)		+= hsr/
 ifneq ($(CONFIG_NET_SWITCHDEV),)
 ifneq ($(CONFIG_NET_SWITCHDEV),)
 obj-y				+= switchdev/
 obj-y				+= switchdev/

+ 17 - 1
net/mpls/Kconfig

@@ -1,9 +1,25 @@
 #
 #
 # MPLS configuration
 # MPLS configuration
 #
 #
+
+menuconfig MPLS
+	tristate "MultiProtocol Label Switching"
+	default n
+	---help---
+	  MultiProtocol Label Switching routes packets through logical
+	  circuits.  Originally conceved as a way of routing packets at
+	  hardware speeds (before hardware was capable of routing ipv4 packets),
+	  MPLS remains as simple way of making tunnels.
+
+	  If you have not heard of MPLS you probably want to say N here.
+
+if MPLS
+
 config NET_MPLS_GSO
 config NET_MPLS_GSO
-	tristate "MPLS: GSO support"
+	bool "MPLS: GSO support"
 	help
 	help
 	 This is helper module to allow segmentation of non-MPLS GSO packets
 	 This is helper module to allow segmentation of non-MPLS GSO packets
 	 that have had MPLS stack entries pushed onto them and thus
 	 that have had MPLS stack entries pushed onto them and thus
 	 become MPLS GSO packets.
 	 become MPLS GSO packets.
+
+endif # MPLS