diff mbox

[20/21] RDS: Kconfig and Makefile

Message ID 1233022678-9259-21-git-send-email-andy.grover@oracle.com
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Andy Grover Jan. 27, 2009, 2:17 a.m. UTC
Add RDS Kconfig and Makefile, and modify infiniband's to add
us to the build.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
---
 drivers/infiniband/Kconfig          |    2 ++
 drivers/infiniband/Makefile         |    1 +
 drivers/infiniband/ulp/rds/Kconfig  |   13 +++++++++++++
 drivers/infiniband/ulp/rds/Makefile |   13 +++++++++++++
 4 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 drivers/infiniband/ulp/rds/Kconfig
 create mode 100644 drivers/infiniband/ulp/rds/Makefile

Comments

Roland Dreier Jan. 28, 2009, 10:59 p.m. UTC | #1
> +obj-$(CONFIG_INFINIBAND_ISER)		+= ulp/rds/

Typo for ..._RDS

 > +config INFINIBAND_RDS_DEBUG
 > +        bool "Debugging messages"
 > +	depends on INFINIBAND_RDS
 > +        default n

No way to enable this?  Disabled by default?

You really want debugging messages to be built by default and controlled
at runtime ... otherwise debugging end-user installations is a pain
(they just install what the distro gives them, and it's very hard for
them to rebuild just to enable debugging).

 > +ib_rds-y :=	af_rds.o bind.o cong.o connection.o info.o message.o   \
 > +			recv.o send.o stats.o sysctl.o threads.o transport.o \
 > +			loop.o page.o rdma.o
 > +
 > +ib_rds-y += ib.o ib_cm.o ib_recv.o ib_ring.o ib_send.o ib_stats.o \
 > +			ib_sysctl.o ib_rdma.o

a very strange way to write an assignment statement...

 - R.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andy Grover Jan. 29, 2009, 2:19 a.m. UTC | #2
Roland Dreier wrote:
>  > +obj-$(CONFIG_INFINIBAND_ISER)		+= ulp/rds/
> 
> Typo for ..._RDS

Whups. :)

>  > +config INFINIBAND_RDS_DEBUG
>  > +        bool "Debugging messages"
>  > +	depends on INFINIBAND_RDS
>  > +        default n
> 
> No way to enable this?  Disabled by default?
> 
> You really want debugging messages to be built by default and controlled
> at runtime ... otherwise debugging end-user installations is a pain
> (they just install what the distro gives them, and it's very hard for
> them to rebuild just to enable debugging).

So the solution is just to base debug message output on a variable,
instead of a config option? RDS actually does do this a little already,
so converting totally isn't hard. I hadn't seen mention this was
preferable -- indeed, tons of drivers and subsystems have options for
compile-time debug statements, should these be converted?

>  > +ib_rds-y :=	af_rds.o bind.o cong.o connection.o info.o message.o   \
>  > +			recv.o send.o stats.o sysctl.o threads.o transport.o \
>  > +			loop.o page.o rdma.o
>  > +
>  > +ib_rds-y += ib.o ib_cm.o ib_recv.o ib_ring.o ib_send.o ib_stats.o \
>  > +			ib_sysctl.o ib_rdma.o
> 
> a very strange way to write an assignment statement...

RDS is implemented as a core sockets layer and then a transport layer.
IB is currently the only transport so I thought it made sense to just
compile them together, but once there are >1 then RDS's IB support could
be broken out into its own module.

Regards -- Andy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roland Dreier Jan. 29, 2009, 5:14 a.m. UTC | #3
> So the solution is just to base debug message output on a variable,
 > instead of a config option? RDS actually does do this a little already,
 > so converting totally isn't hard. I hadn't seen mention this was
 > preferable -- indeed, tons of drivers and subsystems have options for
 > compile-time debug statements, should these be converted?

My experience is definitely that compile-time switches are a big pain
when you actually have to debug something that can only be reproduced on
someone else's setup (which will happen once users start using your
stuff).  You probably can use the dynamic_printk stuff that went in
recently to make this all very clean and standard.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index dd0db67..1cba524 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -54,4 +54,6 @@  source "drivers/infiniband/ulp/srp/Kconfig"
 
 source "drivers/infiniband/ulp/iser/Kconfig"
 
+source "drivers/infiniband/ulp/rds/Kconfig"
+
 endif # INFINIBAND
diff --git a/drivers/infiniband/Makefile b/drivers/infiniband/Makefile
index ed35e44..39d0203 100644
--- a/drivers/infiniband/Makefile
+++ b/drivers/infiniband/Makefile
@@ -9,3 +9,4 @@  obj-$(CONFIG_INFINIBAND_NES)		+= hw/nes/
 obj-$(CONFIG_INFINIBAND_IPOIB)		+= ulp/ipoib/
 obj-$(CONFIG_INFINIBAND_SRP)		+= ulp/srp/
 obj-$(CONFIG_INFINIBAND_ISER)		+= ulp/iser/
+obj-$(CONFIG_INFINIBAND_ISER)		+= ulp/rds/
diff --git a/drivers/infiniband/ulp/rds/Kconfig b/drivers/infiniband/ulp/rds/Kconfig
new file mode 100644
index 0000000..bbc2ba4
--- /dev/null
+++ b/drivers/infiniband/ulp/rds/Kconfig
@@ -0,0 +1,13 @@ 
+
+config INFINIBAND_RDS
+	tristate "Reliable Datagram Sockets (RDS) (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  RDS provides reliable, sequenced delivery of datagrams
+	  over Infiniband.
+
+config INFINIBAND_RDS_DEBUG
+        bool "Debugging messages"
+	depends on INFINIBAND_RDS
+        default n
+
diff --git a/drivers/infiniband/ulp/rds/Makefile b/drivers/infiniband/ulp/rds/Makefile
new file mode 100644
index 0000000..d470550
--- /dev/null
+++ b/drivers/infiniband/ulp/rds/Makefile
@@ -0,0 +1,13 @@ 
+obj-$(CONFIG_INFINIBAND_RDS) += ib_rds.o
+
+ib_rds-y :=	af_rds.o bind.o cong.o connection.o info.o message.o   \
+			recv.o send.o stats.o sysctl.o threads.o transport.o \
+			loop.o page.o rdma.o
+
+ib_rds-y += ib.o ib_cm.o ib_recv.o ib_ring.o ib_send.o ib_stats.o \
+			ib_sysctl.o ib_rdma.o
+
+ifeq ($(CONFIG_INFINIBAND_RDS_DEBUG), y)
+EXTRA_CFLAGS += -DDEBUG
+endif
+