netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles
@ 2006-10-26 23:45 Glenn Grundstrom
  2006-10-26 23:58 ` Roland Dreier
  2006-10-27 14:39 ` [openib-general] " James Lentini
  0 siblings, 2 replies; 5+ messages in thread
From: Glenn Grundstrom @ 2006-10-26 23:45 UTC (permalink / raw)
  To: openib-general; +Cc: netdev

The following set of patches contain the source code for the NetEffect
NE010 iWarp adapter running under the OpenFabrics Alliance software
stack.  This is a repost.

Signed-off-by: Glenn Grundstrom <glenng@neteffect.com>

======================================================

diff -ruNp old/drivers/infiniband/Kconfig new/drivers/infiniband/Kconfig
--- old/drivers/infiniband/Kconfig	2006-10-25 09:57:43.000000000
-0500
+++ new/drivers/infiniband/Kconfig	2006-10-25 10:48:40.000000000
-0500
@@ -41,6 +41,8 @@ source "drivers/infiniband/hw/ehca/Kconf
 
 source "drivers/infiniband/hw/amso1100/Kconfig"
 
+source "drivers/infiniband/hw/nes/Kconfig"
+
 source "drivers/infiniband/hw/cxgb3/Kconfig"
 
 source "drivers/infiniband/ulp/ipoib/Kconfig"
diff -ruNp old/drivers/infiniband/hw/nes/Kconfig
new/drivers/infiniband/hw/nes/Kconfig
--- old/drivers/infiniband/hw/nes/Kconfig	1969-12-31
18:00:00.000000000 -0600
+++ new/drivers/infiniband/hw/nes/Kconfig	2006-10-25
10:50:18.000000000 -0500
@@ -0,0 +1,15 @@
+config INFINIBAND_NES
+	tristate "NetEffect RNIC support"
+	depends on PCI && INET && INFINIBAND
+	---help---
+	  This is a low-level driver for NetEffect RDMA enabled
+	  Network Interface Cards (RNIC).
+
+config INFINIBAND_NES_DEBUG
+	bool "Verbose debugging output"
+	depends on INFINIBAND_NES
+	default n
+	---help---
+	  This option causes the NetEffect RNIC driver to produce debug
+	  messages.  Select this if you are developing the driver
+	  or trying to diagnose a problem.
diff -ruNp old/drivers/infiniband/hw/nes/Makefile
new/drivers/infiniband/hw/nes/Makefile
--- old/drivers/infiniband/hw/nes/Makefile	1969-12-31
18:00:00.000000000 -0600
+++ new/drivers/infiniband/hw/nes/Makefile	2006-10-25
11:10:26.000000000 -0500
@@ -0,0 +1,27 @@
+EXTRA_CFLAGS += -Idrivers/infiniband/include
-Idrivers/infiniband/hw/nes/nes_tcpip/include
+
+ifdef CONFIG_INFINIBAND_NES_DEBUG
+EXTRA_CFLAGS += -DNES_DEBUG
+endif
+
+ifneq ($(KERNELRELEASE),)
+	obj-$(CONFIG_INFINIBAND_NES) += iw_nes.o	
+
+	iw_nes-objs := \
+		nes.o \
+		nes_hw.o \
+		nes_nic.o \
+		nes_cm.o \
+		nes_utils.o \
+		nes_verbs.o 
+else
+	KERNELDIR ?= /usr/src/linux
+	PWD := $(shell pwd)
+
+default:
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+
+clean:
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+
+endif


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles
  2006-10-26 23:45 [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles Glenn Grundstrom
@ 2006-10-26 23:58 ` Roland Dreier
  2006-10-27  0:04   ` David Miller
  2006-10-27 14:39 ` [openib-general] " James Lentini
  1 sibling, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2006-10-26 23:58 UTC (permalink / raw)
  To: glenng; +Cc: openib-general, netdev

 > +source "drivers/infiniband/hw/nes/Kconfig"
 > +
 >  source "drivers/infiniband/hw/cxgb3/Kconfig"

This patch seems to be against some non-standard tree, since cxgb3
isn't upstream yet.  And if cxgb3 were already upstream, it might be
polite to add yourself after it rather than before ;)

 > +config INFINIBAND_NES_DEBUG
 > +	bool "Verbose debugging output"
 > +	depends on INFINIBAND_NES
 > +	default n
 > +	---help---
 > +	  This option causes the NetEffect RNIC driver to produce debug
 > +	  messages.  Select this if you are developing the driver
 > +	  or trying to diagnose a problem.

I recommend making this option invisible unless EMBEDDED is set, and
having the default be 'y', and making your debugging level changeable
at run-time.  That way everyone (in particular distros) will have this
turned on and you'll be able to figure out problems without making
end-users rebuild a kernel.

 > +EXTRA_CFLAGS += -Idrivers/infiniband/include

Not needed in the kernel tree.

 > -Idrivers/infiniband/hw/nes/nes_tcpip/include

I guess this is the mysterious TCP stack module.  Anyway if you need
this in the end, I would suggest removing the C flag and using
#include "nes_tcpip/blah.h" in your source.

 > +ifdef CONFIG_INFINIBAND_NES_DEBUG
 > +EXTRA_CFLAGS += -DNES_DEBUG
 > +endif

There's no point to this -- just test CONFIG_INFINIBAND_NES_DEBUG directly.

 > +ifneq ($(KERNELRELEASE),)
 > +	obj-$(CONFIG_INFINIBAND_NES) += iw_nes.o	
 > +
 > +	iw_nes-objs := \
 > +		nes.o \
 > +		nes_hw.o \
 > +		nes_nic.o \
 > +		nes_cm.o \
 > +		nes_utils.o \
 > +		nes_verbs.o 
 > +else

This should be your whole Makefile -- we're not going to merge stuff
into the kernel tree to build your module out of the kernel tree.
Also it's more idiomatic to put all your component objects onto one
(or a few) lines.

 - R.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles
  2006-10-26 23:58 ` Roland Dreier
@ 2006-10-27  0:04   ` David Miller
  2006-10-27  0:21     ` Roland Dreier
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2006-10-27  0:04 UTC (permalink / raw)
  To: rdreier; +Cc: glenng, openib-general, netdev

From: Roland Dreier <rdreier@cisco.com>
Date: Thu, 26 Oct 2006 16:58:41 -0700

>  > -Idrivers/infiniband/hw/nes/nes_tcpip/include
> 
> I guess this is the mysterious TCP stack module.

What is this thing?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles
  2006-10-27  0:04   ` David Miller
@ 2006-10-27  0:21     ` Roland Dreier
  0 siblings, 0 replies; 5+ messages in thread
From: Roland Dreier @ 2006-10-27  0:21 UTC (permalink / raw)
  To: David Miller; +Cc: glenng, openib-general, netdev

    David> What is this thing?

Good question.  I haven't gotten a straight answer yet, which is why I
called it "mysterious".

 - R.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [openib-general] [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles
  2006-10-26 23:45 [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles Glenn Grundstrom
  2006-10-26 23:58 ` Roland Dreier
@ 2006-10-27 14:39 ` James Lentini
  1 sibling, 0 replies; 5+ messages in thread
From: James Lentini @ 2006-10-27 14:39 UTC (permalink / raw)
  To: Glenn Grundstrom; +Cc: openib-general, netdev



On Thu, 26 Oct 2006, Glenn Grundstrom wrote:

> diff -ruNp old/drivers/infiniband/hw/nes/Makefile
> new/drivers/infiniband/hw/nes/Makefile
> --- old/drivers/infiniband/hw/nes/Makefile	1969-12-31
> 18:00:00.000000000 -0600
> +++ new/drivers/infiniband/hw/nes/Makefile	2006-10-25
> 11:10:26.000000000 -0500
> @@ -0,0 +1,27 @@
> +EXTRA_CFLAGS += -Idrivers/infiniband/include
> -Idrivers/infiniband/hw/nes/nes_tcpip/include
> +
> +ifdef CONFIG_INFINIBAND_NES_DEBUG
> +EXTRA_CFLAGS += -DNES_DEBUG
> +endif

The NES_DEBUG flag is unnecessary. You can check for 
CONFIG_INFINIBAND_NES_DEBUG in the code. See 
CONFIG_INFINIBAND_MTHCA_DEBUG for an example.

> +
> +ifneq ($(KERNELRELEASE),)
> +	obj-$(CONFIG_INFINIBAND_NES) += iw_nes.o	
> +
> +	iw_nes-objs := \
> +		nes.o \
> +		nes_hw.o \
> +		nes_nic.o \
> +		nes_cm.o \
> +		nes_utils.o \
> +		nes_verbs.o 
> +else
> +	KERNELDIR ?= /usr/src/linux
> +	PWD := $(shell pwd)
> +
> +default:
> +	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
> +
> +clean:
> +	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
> +
> +endif

In tree drivers don't provide support for out-of-tree builds. See 
drivers/infiniband/hw/mthca/Makefile for an example of how to 
simplify this.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-10-27 14:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-26 23:45 [PATCH 1/9] NetEffect 10Gb RNIC Driver: kernel Kconfig and makefiles Glenn Grundstrom
2006-10-26 23:58 ` Roland Dreier
2006-10-27  0:04   ` David Miller
2006-10-27  0:21     ` Roland Dreier
2006-10-27 14:39 ` [openib-general] " James Lentini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).