[openib-general] [PATCH] Only include CM and DM client in kernel build when needed (Take 3)

Hal Rosenstock halr at voltaire.com
Mon Aug 9 04:15:17 PDT 2004


Take 3:

On Roland's gen2 branch, the following patch causes CM and DM client to
be included in the kernel build only when needed. One example of this is
when only building for IPoIB.

Index: infiniband/ulp/Kconfig
===================================================================
--- infiniband/ulp/Kconfig	(revision 595)
+++ infiniband/ulp/Kconfig	(working copy)
@@ -2,7 +2,7 @@
 	tristate "IP-over-InfiniBand"
 	depends on INFINIBAND && NETDEVICES && INET
 	---help---
-	  Support for the IP-over-InfiniBand protocol (IPoIB).	This
+	  Support for the IETF IP-over-InfiniBand protocol (IPoIB). This
 	  transports IP packets over InfiniBand so you can use your IB
 	  device as a fancy NIC.  To configure interfaces on multiple
 	  InfiniBand partitions (P_Keys) you will need the ipoibcfg
@@ -14,6 +14,7 @@
 config INFINIBAND_SDP
 	tristate "Sockets Direct Protocol"
 	depends on INFINIBAND && INFINIBAND_IPOIB
+	select INFINIBAND_CM
 	---help---
 	  Support for Sockets Direct Protocol (SDP).  This provides
 	  sockets semantics over InfiniBand via address family
@@ -24,7 +25,9 @@
 config INFINIBAND_SRP
 	tristate "SCSI RDMA Protocol"
 	depends on INFINIBAND && SCSI
-	---help---
+	select INFINIBAND_CM
+	select INFINIBAND_DM_CLIENT
+		---help---
 	  Support for SCSI RDMA Protocol (SRP).	 This transports SCSI
 	  commands over InfiniBand and allows you to access storage
 	  connected via IB.
@@ -33,6 +36,7 @@
 	tristate "uDAPL helper"
 	depends on (BROKEN || m) && INFINIBAND && INFINIBAND_MELLANOX_HCA
 	select INFINIBAND_USER_CM
+	select INFINIBAND_CM
 	---help---
 	  Kernel space helper for uDAPL.  Select this and use the uDAPL
 	  library from <http://openib.org> to run uDAPL applications.
Index: infiniband/Kconfig
===================================================================
--- infiniband/Kconfig	(revision 595)
+++ infiniband/Kconfig	(working copy)
@@ -12,11 +12,25 @@
 	tristate "Userspace CM"
 	depends on INFINIBAND && INFINIBAND_MELLANOX_HCA
 	depends on BROKEN || m
+	select INFINIBAND_CM
 	---help---
 	  Userspace access to the kernel communication manager.
 	  This allows userspace protocols such as uDAPL or MPI to use
 	  the kernel's services for establishing connections.
 
+config INFINIBAND_CM
+	tristate "CM"
+	depends on INFINIBAND 
+	---help---
+	Kernel communication manager. Needed for connection oriented protocols
+	such as SRP, SDP, DAPL, or MPI.
+
+config INFINIBAND_DM_CLIENT
+	tristate "DM client"
+	depends on INFINIBAND 
+	---help---
+	Device Manager (DM) client. Needed for SRP.
+
 source "drivers/infiniband/ulp/Kconfig"
 source "drivers/infiniband/hw/Kconfig"
 
Index: infiniband/core/Makefile
===================================================================
--- infiniband/core/Makefile	(revision 595)
+++ infiniband/core/Makefile	(working copy)
@@ -10,12 +10,16 @@
 obj-$(CONFIG_INFINIBAND) += \
     ib_core.o \
     ib_mad.o \
-    ib_cm.o \
     ib_client_query.o \
     ib_sa_client.o \
-    ib_dm_client.o \
     ib_useraccess.o
 
+obj-$(CONFIG_INFINIBAND_CM) += \
+    ib_cm.o
+
+obj-$(CONFIG_INFINIBAND_DM_CLIENT) += \
+    ib_dm_client.o
+
 obj-$(CONFIG_INFINIBAND_USER_CM) += \
     ib_useraccess_cm.o
 
@@ -104,6 +108,7 @@
     $(obj)/pm_access.h $(obj)/pm_types.h 
 
 $(obj)/mad_static.o: $(obj)/smp_access.h $(obj)/smp_types.h
+
 $(ib_cm-objs:%=$(obj)/%): $(obj)/cm_packet.h
 
 quiet_cmd_gendecode = GEN     $@






More information about the general mailing list