[openib-general] [PATCH v2 13/14] CXGB3 Makefiles/Kconfig

Steve Wise swise at opengridcomputing.com
Fri Jun 23 07:30:31 PDT 2006


The cxgb3 rdma support is broken into 2 modules:

iw_cxgb3.ko 	- the openib provider module.
cxgb3c.ko	- the cxgb3 "core" services module.
---

 drivers/infiniband/Kconfig              |    1 +
 drivers/infiniband/Makefile             |    1 +
 drivers/infiniband/hw/cxgb3/Kconfig     |   14 ++++++++++++++
 drivers/infiniband/hw/cxgb3/Makefile    |   21 +++++++++++++++++++++
 drivers/infiniband/hw/cxgb3/locking.txt |   25 +++++++++++++++++++++++++
 5 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index 04e6d4f..7dcf976 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -37,6 +37,7 @@ config INFINIBAND_ADDR_TRANS
 source "drivers/infiniband/hw/mthca/Kconfig"
 source "drivers/infiniband/hw/ipath/Kconfig"
 source "drivers/infiniband/hw/amso1100/Kconfig"
+source "drivers/infiniband/hw/cxgb3/Kconfig"
 
 source "drivers/infiniband/ulp/ipoib/Kconfig"
 
diff --git a/drivers/infiniband/Makefile b/drivers/infiniband/Makefile
index e2b93f9..1a73af0 100644
--- a/drivers/infiniband/Makefile
+++ b/drivers/infiniband/Makefile
@@ -2,5 +2,6 @@ obj-$(CONFIG_INFINIBAND)		+= core/
 obj-$(CONFIG_INFINIBAND_MTHCA)		+= hw/mthca/
 obj-$(CONFIG_IPATH_CORE)		+= hw/ipath/
 obj-$(CONFIG_INFINIBAND_AMSO1100)	+= hw/amso1100/
+obj-$(CONFIG_INFINIBAND_IWCH)         	+= hw/cxgb3/
 obj-$(CONFIG_INFINIBAND_IPOIB)		+= ulp/ipoib/
 obj-$(CONFIG_INFINIBAND_SRP)		+= ulp/srp/
diff --git a/drivers/infiniband/hw/cxgb3/Kconfig b/drivers/infiniband/hw/cxgb3/Kconfig
new file mode 100644
index 0000000..156df63
--- /dev/null
+++ b/drivers/infiniband/hw/cxgb3/Kconfig
@@ -0,0 +1,14 @@
+config INFINIBAND_IWCH
+	tristate "Chelsio OpenIB module"
+	depends on CHELSIO_T3 && INFINIBAND
+	---help---
+	   This is the Chelsio OpenIB provider module.
+
+config INFINIBAND_IWCH_DEBUG
+	bool "Verbose debugging output"
+	depends on INFINIBAND_IWCH
+	default n
+	---help---
+	  This option causes the Chelsio OpenIB provider module to produce 
+          a bunch of debug messages.  Select this if you are developing the 
+          driver or trying to diagnose a problem.
diff --git a/drivers/infiniband/hw/cxgb3/Makefile b/drivers/infiniband/hw/cxgb3/Makefile
new file mode 100644
index 0000000..ed72caa
--- /dev/null
+++ b/drivers/infiniband/hw/cxgb3/Makefile
@@ -0,0 +1,21 @@
+EXTRA_CFLAGS += \
+	-DCONFIG_CHELSIO_T3_OFFLOAD \
+	-I$(TOPDIR)/drivers/infiniband/include \
+	-I$(TOPDIR)/drivers/net/cxgb3 \
+	-I$(TOPDIR)/drivers/infiniband/hw/cxgb3/t3c \
+	-I$(TOPDIR)/drivers/infiniband/hw/cxgb3/core 
+
+obj-$(CONFIG_INFINIBAND_IWCH) += iw_cxgb3.o cxgb3c.o 
+
+iw_cxgb3-y :=  iwch_cm.o iwch_ev.o iwch_cq.o iwch_qp.o iwch_mem.o \
+	       iwch_provider.o iwch.o core/cxio_hal.o core/cxio_resource.o
+
+ifdef CONFIG_INFINIBAND_IWCH_DEBUG
+EXTRA_CFLAGS += -O1 -g -DDEBUG
+iw_cxgb3-y += core/cxio_dbg.o
+endif
+
+cxgb3c-y := \
+	t3c/t3c.o \
+	t3c/l2t.o \
+	t3c/t3cdev.o
diff --git a/drivers/infiniband/hw/cxgb3/locking.txt b/drivers/infiniband/hw/cxgb3/locking.txt
new file mode 100644
index 0000000..e5e9991
--- /dev/null
+++ b/drivers/infiniband/hw/cxgb3/locking.txt
@@ -0,0 +1,25 @@
+cq lock:
+	- spin lock
+	- used to synchronize the t3_cq
+
+qp lock:
+	- spin lock
+	- used to synchronize updates to the qp state, attrs, and the t3_wq.
+	- touched on interrupt and process context
+	
+rnicp lock:
+	- spin lock
+	- touched on interrupt and process context
+	- used around lookup tables mapping CQID and QPID to a structure.
+	- used also to bump the refcnt atomically with the lookup.
+
+poll:
+	lock+disable on cq lock
+		lock qp lock for each cqe that is polled around the call
+		to cxio_poll_cq().
+	
+post: 
+	lock+disable qp lock
+
+global mutex iwch_mutex:
+	used to maintain global device list.




More information about the general mailing list