浏览代码

mpls: Allow mpls_gso and mpls_router to be built as modules

CONFIG_MPLS=m doesn't result in a kernel module being built because it
applies to the net/mpls directory, rather than to .o files.

So revert the MPLS menuitem to being a boolean and make MPLS_GSO and
MPLS_ROUTING tristates to allow mpls_gso and mpls_router modules to be
produced as desired.

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Robert Shearman <rshearma@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Shearman 10 年之前
父节点
当前提交
8a08919f43
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 3 3
      net/mpls/Kconfig
  2. 3 1
      net/mpls/Makefile

+ 3 - 3
net/mpls/Kconfig

@@ -3,7 +3,7 @@
 #
 #
 
 
 menuconfig MPLS
 menuconfig MPLS
-	tristate "MultiProtocol Label Switching"
+	bool "MultiProtocol Label Switching"
 	default n
 	default n
 	---help---
 	---help---
 	  MultiProtocol Label Switching routes packets through logical
 	  MultiProtocol Label Switching routes packets through logical
@@ -16,14 +16,14 @@ menuconfig MPLS
 if MPLS
 if MPLS
 
 
 config NET_MPLS_GSO
 config NET_MPLS_GSO
-	bool "MPLS: GSO support"
+	tristate "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.
 
 
 config MPLS_ROUTING
 config MPLS_ROUTING
-	bool "MPLS: routing support"
+	tristate "MPLS: routing support"
 	help
 	help
 	 Add support for forwarding of mpls packets.
 	 Add support for forwarding of mpls packets.
 
 

+ 3 - 1
net/mpls/Makefile

@@ -2,4 +2,6 @@
 # Makefile for MPLS.
 # Makefile for MPLS.
 #
 #
 obj-$(CONFIG_NET_MPLS_GSO) += mpls_gso.o
 obj-$(CONFIG_NET_MPLS_GSO) += mpls_gso.o
-obj-$(CONFIG_MPLS_ROUTING) += af_mpls.o
+obj-$(CONFIG_MPLS_ROUTING) += mpls_router.o
+
+mpls_router-y := af_mpls.o