From 7e0aa0e933d2293b0968bdc27ace3e873c7a9230 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 12 Apr 2012 14:01:06 +0000 Subject: Add OFED and the associated options and drivers to x86 LINT builds: - Mark 'sdp' as requiring 'inet'. - Always include "opt_inet.h" and "opt_inet6.h" and modify the IB driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options to determine what should be enabled during a module build. - Fix the mlxen(4) driver and the core IB code to compile without if INET is disabled (including when both INET and INET6 are disabled). Reviewed by: bz MFC after: 2 weeks --- sys/modules/mlx4/Makefile | 17 ++++++++++++++++- sys/modules/mlx4ib/Makefile | 18 +++++++++++++++++- sys/modules/mlxen/Makefile | 17 ++++++++++++++++- sys/modules/mthca/Makefile | 18 +++++++++++++++++- 4 files changed, 66 insertions(+), 4 deletions(-) (limited to 'sys/modules') diff --git a/sys/modules/mlx4/Makefile b/sys/modules/mlx4/Makefile index 8ea3340..ccaf3c3 100644 --- a/sys/modules/mlx4/Makefile +++ b/sys/modules/mlx4/Makefile @@ -1,13 +1,28 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4 + +.include + KMOD = mlx4 SRCS = device_if.h bus_if.h pci_if.h vnode_if.h SRCS+= alloc.c catas.c cmd.c cq.c eq.c fw.c icm.c intf.c main.c mcg.c mr.c SRCS+= pd.c port.c profile.c qp.c reset.c sense.c srq.c xrcd.c +SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ -CFLAGS+= -DINET6 + +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif .include diff --git a/sys/modules/mlx4ib/Makefile b/sys/modules/mlx4ib/Makefile index 5fe01e7..3ab6d6f 100644 --- a/sys/modules/mlx4ib/Makefile +++ b/sys/modules/mlx4ib/Makefile @@ -1,10 +1,26 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 + +.include + KMOD = mlx4ib SRCS = device_if.h bus_if.h pci_if.h vnode_if.h SRCS+= ah.c cq.c doorbell.c mad.c main.c mr.c qp.c srq.c wc.c +SRCS+= opt_inet.h opt_inet6.h + +CFLAGS+= -I${.CURDIR}/../../ofed/include/ + +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif -CFLAGS+= -I${.CURDIR}/../../ofed/include/ -DINET6 +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif .include diff --git a/sys/modules/mlxen/Makefile b/sys/modules/mlxen/Makefile index b83b4a5..cf05cdd 100644 --- a/sys/modules/mlxen/Makefile +++ b/sys/modules/mlxen/Makefile @@ -1,12 +1,27 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4 + +.include + KMOD = mlxen SRCS = device_if.h bus_if.h pci_if.h vnode_if.h SRCS += en_cq.c en_frag.c en_main.c en_netdev.c en_port.c en_resources.c SRCS += en_rx.c en_tx.c +SRCS += opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ -CFLAGS+= -DINET6 + +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif .include diff --git a/sys/modules/mthca/Makefile b/sys/modules/mthca/Makefile index de860fe..9b56499 100644 --- a/sys/modules/mthca/Makefile +++ b/sys/modules/mthca/Makefile @@ -1,14 +1,30 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mthca + +.include + KMOD = mthca SRCS = device_if.h bus_if.h pci_if.h vnode_if.h SRCS+= mthca_allocator.c mthca_av.c mthca_catas.c mthca_cmd.c mthca_cq.c SRCS+= mthca_eq.c mthca_mad.c mthca_main.c mthca_mcg.c mthca_memfree.c SRCS+= mthca_mr.c mthca_pd.c mthca_profile.c mthca_provider.c mthca_qp.c SRCS+= mthca_reset.c mthca_srq.c mthca_uar.c +SRCS+= opt_inet.h opt_inet6.h + +CFLAGS+= -I${.CURDIR}/../../ofed/include + +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif -CFLAGS+= -I${.CURDIR}/../../ofed/include/ -DINET6 +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif .include -- cgit v1.1