svn commit: r239748 - in stable/9/sys: amd64/conf conf i386/conf
modules/mlx4 modules/mlx4ib modules/mlxen modules/mthca
ofed/drivers/infiniband/core
ofed/drivers/infiniband/ulp/ipoib ofed/drivers/...
John Baldwin
jhb at FreeBSD.org
Mon Aug 27 19:37:03 UTC 2012
Author: jhb
Date: Mon Aug 27 19:37:02 2012
New Revision: 239748
URL: http://svn.freebsd.org/changeset/base/239748
Log:
MFC 233040,233198,233870,234183:
Add OFED and the associated options and drivers to x86 LINT builds:
- Fix build with INET6 disabled.
- Fix build of OFED bits with debugging options enabled.
- Fix build on i386.
- 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).
Modified:
stable/9/sys/amd64/conf/NOTES
stable/9/sys/conf/files
stable/9/sys/i386/conf/NOTES
stable/9/sys/modules/mlx4/Makefile
stable/9/sys/modules/mlx4ib/Makefile
stable/9/sys/modules/mlxen/Makefile
stable/9/sys/modules/mthca/Makefile
stable/9/sys/ofed/drivers/infiniband/core/addr.c
stable/9/sys/ofed/drivers/infiniband/core/cma.c
stable/9/sys/ofed/drivers/infiniband/core/fmr_pool.c
stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
stable/9/sys/ofed/drivers/net/mlx4/en_frag.c
stable/9/sys/ofed/drivers/net/mlx4/en_rx.c
stable/9/sys/ofed/include/linux/in.h
stable/9/sys/ofed/include/linux/in6.h
stable/9/sys/ofed/include/net/ip.h
stable/9/sys/ofed/include/net/ipv6.h
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
stable/9/sys/dev/ (props changed)
stable/9/sys/dev/e1000/ (props changed)
stable/9/sys/dev/isp/ (props changed)
stable/9/sys/dev/ixgbe/ (props changed)
stable/9/sys/fs/ (props changed)
stable/9/sys/fs/ntfs/ (props changed)
stable/9/sys/modules/ (props changed)
Modified: stable/9/sys/amd64/conf/NOTES
==============================================================================
--- stable/9/sys/amd64/conf/NOTES Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/amd64/conf/NOTES Mon Aug 27 19:37:02 2012 (r239748)
@@ -90,6 +90,19 @@ options DEVICE_POLLING
options BPF_JITTER
+# OpenFabrics Enterprise Distribution (Infiniband).
+options OFED
+options OFED_DEBUG_INIT
+
+# Sockets Direct Protocol
+options SDP
+options SDP_DEBUG
+
+# IP over Inifiband
+options IPOIB
+options IPOIB_DEBUG
+options IPOIB_CM
+
#####################################################################
# CLOCK OPTIONS
@@ -290,6 +303,9 @@ options DRM_DEBUG # Include debug print
# Requires the iwi firmware module
# iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 network adapters
# Requires the iwn firmware module
+# mlx4ib: Mellanox ConnectX HCA InfiniBand
+# mlxen: Mellanox ConnectX HCA Ethernet
+# mthca: Mellanox HCA InfiniBand
# mwl: Marvell 88W8363 IEEE 802.11 adapter
# Requires the mwl firmware module
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
@@ -305,6 +321,9 @@ options ED_SIC
device ipw # Intel 2100 wireless NICs.
device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs.
device iwn # Intel 4965/1000/5000/6000 wireless NICs.
+device mlx4ib # Mellanox ConnectX HCA InfiniBand
+device mlxen # Mellanox ConnectX HCA Ethernet
+device mthca # Mellanox HCA InfiniBand
device mwl # Marvell 88W8363 802.11n wireless NICs.
device nfe # nVidia nForce MCP on-board Ethernet
device nve # nVidia nForce MCP on-board Ethernet Networking
Modified: stable/9/sys/conf/files
==============================================================================
--- stable/9/sys/conf/files Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/conf/files Mon Aug 27 19:37:02 2012 (r239748)
@@ -3077,19 +3077,19 @@ ofed/drivers/infiniband/ulp/ipoib/ipoib_
# no-depend \
# compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/"
-ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp \
+ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp inet \
no-depend \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
-ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp \
+ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp inet \
no-depend \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
-ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp \
+ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp inet \
no-depend \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
-ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp \
+ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \
no-depend \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
-ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp \
+ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \
no-depend \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
Modified: stable/9/sys/i386/conf/NOTES
==============================================================================
--- stable/9/sys/i386/conf/NOTES Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/i386/conf/NOTES Mon Aug 27 19:37:02 2012 (r239748)
@@ -260,6 +260,19 @@ options DEVICE_POLLING
options BPF_JITTER
+# OpenFabrics Enterprise Distribution (Infiniband).
+options OFED
+options OFED_DEBUG_INIT
+
+# Sockets Direct Protocol
+options SDP
+options SDP_DEBUG
+
+# IP over Inifiband
+options IPOIB
+options IPOIB_DEBUG
+options IPOIB_CM
+
#####################################################################
# CLOCK OPTIONS
@@ -561,6 +574,9 @@ hint.mse.0.irq="5"
# Requires the iwi firmware module
# iwn: Intel Wireless WiFi Link 4965AGN 802.11 network adapters
# Requires the iwn firmware module
+# mlx4ib: Mellanox ConnectX HCA InfiniBand
+# mlxen: Mellanox ConnectX HCA Ethernet
+# mthca: Mellanox HCA InfiniBand
# mwl: Marvell 88W8363 IEEE 802.11 adapter
# Requires the mwl firmware module
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
@@ -605,6 +621,9 @@ hint.le.0.at="isa"
hint.le.0.port="0x280"
hint.le.0.irq="10"
hint.le.0.drq="0"
+device mlx4ib # Mellanox ConnectX HCA InfiniBand
+device mlxen # Mellanox ConnectX HCA Ethernet
+device mthca # Mellanox HCA InfiniBand
device mwl # Marvell 88W8363 802.11n wireless NICs.
device nfe # nVidia nForce MCP on-board Ethernet
device nve # nVidia nForce MCP on-board Ethernet Networking
Modified: stable/9/sys/modules/mlx4/Makefile
==============================================================================
--- stable/9/sys/modules/mlx4/Makefile Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/modules/mlx4/Makefile Mon Aug 27 19:37:02 2012 (r239748)
@@ -1,13 +1,28 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4
+
+.include <bsd.own.mk>
+
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 <bsd.kmod.mk>
Modified: stable/9/sys/modules/mlx4ib/Makefile
==============================================================================
--- stable/9/sys/modules/mlx4ib/Makefile Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/modules/mlx4ib/Makefile Mon Aug 27 19:37:02 2012 (r239748)
@@ -1,10 +1,26 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4
+
+.include <bsd.own.mk>
+
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 <bsd.kmod.mk>
Modified: stable/9/sys/modules/mlxen/Makefile
==============================================================================
--- stable/9/sys/modules/mlxen/Makefile Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/modules/mlxen/Makefile Mon Aug 27 19:37:02 2012 (r239748)
@@ -1,12 +1,27 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4
+
+.include <bsd.own.mk>
+
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 <bsd.kmod.mk>
Modified: stable/9/sys/modules/mthca/Makefile
==============================================================================
--- stable/9/sys/modules/mthca/Makefile Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/modules/mthca/Makefile Mon Aug 27 19:37:02 2012 (r239748)
@@ -1,14 +1,30 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mthca
+
+.include <bsd.own.mk>
+
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 <bsd.kmod.mk>
Modified: stable/9/sys/ofed/drivers/infiniband/core/addr.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/core/addr.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/infiniband/core/addr.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -136,6 +136,7 @@ int rdma_translate_ip(struct sockaddr *a
}
switch (addr->sa_family) {
+#ifdef INET
case AF_INET:
dev = ip_dev_find(NULL,
((struct sockaddr_in *) addr)->sin_addr.s_addr);
@@ -146,6 +147,7 @@ int rdma_translate_ip(struct sockaddr *a
ret = rdma_copy_addr(dev_addr, dev, NULL);
dev_put(dev);
break;
+#endif
#if defined(INET6)
case AF_INET6:
@@ -346,7 +348,9 @@ static int addr_resolve(struct sockaddr
struct sockaddr_in6 *sin6;
struct ifaddr *ifa;
struct ifnet *ifp;
+#if defined(INET) || defined(INET6)
struct llentry *lle;
+#endif
struct rtentry *rte;
in_port_t port;
u_char edst[MAX_ADDR_LEN];
@@ -365,6 +369,7 @@ static int addr_resolve(struct sockaddr
ifp = NULL;
rte = NULL;
switch (dst_in->sa_family) {
+#ifdef INET
case AF_INET:
sin = (struct sockaddr_in *)dst_in;
if (sin->sin_addr.s_addr == INADDR_BROADCAST)
@@ -383,6 +388,7 @@ static int addr_resolve(struct sockaddr
} else
src_in = NULL;
break;
+#endif
#ifdef INET6
case AF_INET6:
sin6 = (struct sockaddr_in6 *)dst_in;
@@ -459,12 +465,21 @@ mcast:
/*
* Resolve the link local address.
*/
- if (dst_in->sa_family == AF_INET)
+ switch (dst_in->sa_family) {
+#ifdef INET
+ case AF_INET:
error = arpresolve(ifp, rte, NULL, dst_in, edst, &lle);
+ break;
+#endif
#ifdef INET6
- else
+ case AF_INET6:
error = nd6_storelladdr(ifp, NULL, dst_in, (u_char *)edst, &lle);
+ break;
#endif
+ default:
+ /* XXX: Shouldn't happen. */
+ error = -EINVAL;
+ }
RTFREE(rte);
if (error == 0)
return rdma_copy_addr(addr, ifp, edst);
Modified: stable/9/sys/ofed/drivers/infiniband/core/cma.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/core/cma.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/infiniband/core/cma.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -96,7 +96,9 @@ static DEFINE_IDR(sdp_ps);
static DEFINE_IDR(tcp_ps);
static DEFINE_IDR(udp_ps);
static DEFINE_IDR(ipoib_ps);
+#if defined(INET)
static int next_port;
+#endif
struct cma_device {
struct list_head list;
@@ -1242,7 +1244,9 @@ static void cma_set_compare_data(enum rd
struct cma_hdr *cma_data, *cma_mask;
struct sdp_hh *sdp_data, *sdp_mask;
__be32 ip4_addr;
+#ifdef INET6
struct in6_addr ip6_addr;
+#endif
memset(compare, 0, sizeof *compare);
cma_data = (void *) compare->data;
@@ -2135,6 +2139,7 @@ err1:
static int cma_alloc_any_port(struct idr *ps, struct rdma_id_private *id_priv)
{
+#if defined(INET)
struct rdma_bind_list *bind_list;
int port, ret, low, high;
@@ -2176,6 +2181,9 @@ err2:
err1:
kfree(bind_list);
return ret;
+#else
+ return -ENOSPC;
+#endif
}
static int cma_use_port(struct idr *ps, struct rdma_id_private *id_priv)
@@ -2917,13 +2925,20 @@ static int cma_ib_mc_handler(int status,
static void cma_set_mgid(struct rdma_id_private *id_priv,
struct sockaddr *addr, union ib_gid *mgid)
{
+#if defined(INET) || defined(INET6)
unsigned char mc_map[MAX_ADDR_LEN];
struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr;
+#endif
+#ifdef INET
struct sockaddr_in *sin = (struct sockaddr_in *) addr;
+#endif
+#ifdef INET6
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) addr;
+#endif
if (cma_any_addr(addr)) {
memset(mgid, 0, sizeof *mgid);
+#ifdef INET6
} else if ((addr->sa_family == AF_INET6) &&
((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) ==
0xFF10A01B)) {
@@ -2934,11 +2949,14 @@ static void cma_set_mgid(struct rdma_id_
if (id_priv->id.ps == RDMA_PS_UDP)
mc_map[7] = 0x01; /* Use RDMA CM signature */
*mgid = *(union ib_gid *) (mc_map + 4);
+#endif
+#ifdef INET
} else {
ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map);
if (id_priv->id.ps == RDMA_PS_UDP)
mc_map[7] = 0x01; /* Use RDMA CM signature */
*mgid = *(union ib_gid *) (mc_map + 4);
+#endif
}
}
@@ -3341,12 +3359,15 @@ static void cma_remove_one(struct ib_dev
static int cma_init(void)
{
- int ret, low, high, remaining;
+ int ret;
+#if defined(INET)
+ int low, high, remaining;
get_random_bytes(&next_port, sizeof next_port);
inet_get_local_port_range(&low, &high);
remaining = (high - low) + 1;
next_port = ((unsigned int) next_port % remaining) + low;
+#endif
cma_wq = create_singlethread_workqueue("rdma_cm");
if (!cma_wq)
Modified: stable/9/sys/ofed/drivers/infiniband/core/fmr_pool.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/core/fmr_pool.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/infiniband/core/fmr_pool.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -150,7 +150,7 @@ static void ib_fmr_batch_release(struct
#ifdef DEBUG
if (fmr->ref_count !=0) {
- printk(KERN_WARNING PFX "Unmapping FMR 0x%08x with ref count %d\n",
+ printk(KERN_WARNING PFX "Unmapping FMR %p with ref count %d\n",
fmr, fmr->ref_count);
}
#endif
Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -1247,7 +1247,9 @@ static void ipoib_cm_mb_reap(struct work
cm.mb_task);
struct mbuf *mb;
unsigned long flags;
+#if defined(INET) || defined(INET6)
unsigned mtu = priv->mcast_mtu;
+#endif
uint16_t proto;
spin_lock_irqsave(&priv->lock, flags);
@@ -1260,14 +1262,20 @@ static void ipoib_cm_mb_reap(struct work
proto = htons(*mtod(mb, uint16_t *));
m_adj(mb, IPOIB_ENCAP_LEN);
- if (proto == ETHERTYPE_IP)
+ switch (proto) {
+#if defined(INET)
+ case ETHERTYPE_IP:
icmp_error(mb, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0, mtu);
+ break;
+#endif
#if defined(INET6)
- else if (proto == ETHERTYPE_IPV6)
+ case ETHERTYPE_IPV6:
icmp6_error(mb, ICMP6_PACKET_TOO_BIG, 0, mtu);
+ break;
#endif
- else
+ default:
m_freem(mb);
+ }
spin_lock_irqsave(&priv->lock, flags);
}
Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -876,7 +876,7 @@ ipoib_intf_alloc(const char *name)
dev->if_output = ipoib_output;
dev->if_input = ipoib_input;
dev->if_resolvemulti = ipoib_resolvemulti;
- dev->if_baudrate = IF_Gbps(10LL);
+ dev->if_baudrate = IF_Gbps(10UL);
dev->if_broadcastaddr = priv->broadcastaddr;
dev->if_snd.ifq_maxlen = ipoib_sendq_size * 2;
sdl = (struct sockaddr_dl *)dev->if_addr->ifa_addr;
Modified: stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -855,7 +855,7 @@ sdp_append(struct sdp_sock *ssk, struct
int ncnt;
SOCKBUF_LOCK_ASSERT(sb);
- SBLASTRECORDCHK(sb)
+ SBLASTRECORDCHK(sb);
KASSERT(mb->m_flags & M_PKTHDR,
("sdp_append: %p Missing packet header.\n", mb));
n = sb->sb_lastrecord;
Modified: stable/9/sys/ofed/drivers/net/mlx4/en_frag.c
==============================================================================
--- stable/9/sys/ofed/drivers/net/mlx4/en_frag.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/net/mlx4/en_frag.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -31,8 +31,11 @@
*
*/
+#include "opt_inet.h"
#include "mlx4_en.h"
+#ifdef INET
+
#include <net/ethernet.h>
#include <netinet/ip.h>
#include <machine/in_cksum.h>
@@ -186,3 +189,4 @@ void mlx4_en_flush_frags(struct mlx4_en_
flush_session(priv, session, IP_MF);
}
}
+#endif
Modified: stable/9/sys/ofed/drivers/net/mlx4/en_rx.c
==============================================================================
--- stable/9/sys/ofed/drivers/net/mlx4/en_rx.c Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/drivers/net/mlx4/en_rx.c Mon Aug 27 19:37:02 2012 (r239748)
@@ -31,6 +31,7 @@
*
*/
+#include "opt_inet.h"
#include "mlx4_en.h"
#include <linux/mlx4/cq.h>
@@ -287,6 +288,7 @@ int mlx4_en_activate_rx_rings(struct mlx
/* Initailize all descriptors */
for (i = 0; i < ring->size; i++)
mlx4_en_init_rx_desc(priv, ring, i);
+#ifdef INET
/* Configure lro mngr */
if (priv->dev->if_capenable & IFCAP_LRO) {
if (tcp_lro_init(&ring->lro))
@@ -294,6 +296,7 @@ int mlx4_en_activate_rx_rings(struct mlx
else
ring->lro.ifp = priv->dev;
}
+#endif
}
err = mlx4_en_fill_rx_buffers(priv);
if (err)
@@ -330,7 +333,9 @@ void mlx4_en_destroy_rx_ring(struct mlx4
void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,
struct mlx4_en_rx_ring *ring)
{
+#ifdef INET
tcp_lro_free(&ring->lro);
+#endif
mlx4_en_free_rx_buf(priv, ring);
if (ring->stride <= TXBB_SIZE)
ring->buf -= TXBB_SIZE;
@@ -446,7 +451,9 @@ int mlx4_en_process_rx_cq(struct net_dev
struct mbuf **mb_list;
struct mlx4_en_rx_desc *rx_desc;
struct mbuf *mb;
+#ifdef INET
struct lro_entry *queued;
+#endif
int index;
unsigned int length;
int polled = 0;
@@ -515,22 +522,26 @@ int mlx4_en_process_rx_cq(struct net_dev
* - without IP options
* - not an IP fragment
*/
+#ifdef INET
if (mlx4_en_can_lro(cqe->status) &&
(dev->if_capenable & IFCAP_LRO)) {
if (ring->lro.lro_cnt != 0 &&
tcp_lro_rx(&ring->lro, mb, 0) == 0)
goto next;
}
+#endif
/* LRO not possible, complete processing here */
INC_PERF_COUNTER(priv->pstats.lro_misses);
} else {
mb->m_pkthdr.csum_flags = 0;
priv->port_stats.rx_chksum_none++;
+#ifdef INET
if (priv->ip_reasm &&
cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV4) &&
!mlx4_en_rx_frags(priv, ring, mb, cqe))
goto next;
+#endif
}
/* Push it up the stack */
@@ -545,11 +556,13 @@ next:
}
/* Flush all pending IP reassembly sessions */
out:
+#ifdef INET
mlx4_en_flush_frags(priv, ring);
while ((queued = SLIST_FIRST(&ring->lro.lro_active)) != NULL) {
SLIST_REMOVE_HEAD(&ring->lro.lro_active, next);
tcp_lro_flush(&ring->lro, queued);
}
+#endif
AVG_PERF_COUNTER(priv->pstats.rx_coal_avg, polled);
mlx4_cq_set_ci(&cq->mcq);
wmb(); /* ensure HW sees CQ consumer before we post new buffers */
Modified: stable/9/sys/ofed/include/linux/in.h
==============================================================================
--- stable/9/sys/ofed/include/linux/in.h Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/include/linux/in.h Mon Aug 27 19:37:02 2012 (r239748)
@@ -28,6 +28,8 @@
#ifndef _LINUX_IN_H_
#define _LINUX_IN_H_
+#include "opt_inet.h"
+
#include <netinet/in.h>
#include <asm/byteorder.h>
Modified: stable/9/sys/ofed/include/linux/in6.h
==============================================================================
--- stable/9/sys/ofed/include/linux/in6.h Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/include/linux/in6.h Mon Aug 27 19:37:02 2012 (r239748)
@@ -29,8 +29,6 @@
#ifndef _LINUX_IN6_H_
#define _LINUX_IN6_H_
-#ifndef KLD_MODULE
#include "opt_inet6.h"
-#endif
#endif /* _LINUX_IN6_H_ */
Modified: stable/9/sys/ofed/include/net/ip.h
==============================================================================
--- stable/9/sys/ofed/include/net/ip.h Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/include/net/ip.h Mon Aug 27 19:37:02 2012 (r239748)
@@ -29,6 +29,8 @@
#ifndef _LINUX_NET_IP_H_
#define _LINUX_NET_IP_H_
+#include "opt_inet.h"
+
#include <sys/types.h>
#include <sys/socket.h>
@@ -39,6 +41,7 @@
#include <netinet/in.h>
#include <netinet/in_pcb.h>
+#ifdef INET
static inline void inet_get_local_port_range(int *low, int *high)
{
*low = V_ipport_firstauto;
@@ -73,5 +76,6 @@ ip_ib_mc_map(uint32_t addr, const unsign
buf[18] = (addr >> 8) & 0xff;
buf[19] = addr & 0xff;
}
+#endif
#endif /* _LINUX_NET_IP_H_ */
Modified: stable/9/sys/ofed/include/net/ipv6.h
==============================================================================
--- stable/9/sys/ofed/include/net/ipv6.h Mon Aug 27 19:30:21 2012 (r239747)
+++ stable/9/sys/ofed/include/net/ipv6.h Mon Aug 27 19:37:02 2012 (r239748)
@@ -29,9 +29,7 @@
#ifndef _LINUX_NET_IPV6_H_
#define _LINUX_NET_IPV6_H_
-#ifndef KLD_MODULE
#include "opt_inet6.h"
-#endif
#define ipv6_addr_loopback IN6_IS_ADDR_LOOPBACK
#define ipv6_addr_copy(dst, src) \
More information about the svn-src-stable-9
mailing list