Date: Thu, 19 Feb 2015 11:48:01 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278995 - head/sys/ofed/drivers/infiniband/core Message-ID: <201502191148.t1JBm1a8021337@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Thu Feb 19 11:48:00 2015 New Revision: 278995 URL: https://svnweb.freebsd.org/changeset/base/278995 Log: Try to unbreak NOIP and NOINET6 LINT builds after r278886 by placing appropriate #ifdefs around otherwise unused variables or sections with functions called which are not available without IPv6 support in the kernel. Modified: head/sys/ofed/drivers/infiniband/core/cma.c Modified: head/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cma.c Thu Feb 19 11:44:50 2015 (r278994) +++ head/sys/ofed/drivers/infiniband/core/cma.c Thu Feb 19 11:48:00 2015 (r278995) @@ -2558,8 +2558,10 @@ int rdma_bind_addr(struct rdma_cm_id *id { struct rdma_id_private *id_priv; int ret; +#if defined(INET6) int ipv6only; size_t var_size = sizeof(int); +#endif if (addr->sa_family != AF_INET && addr->sa_family != AF_INET6) return -EAFNOSUPPORT; @@ -3222,10 +3224,13 @@ static void cma_set_mgid(struct rdma_id_ unsigned char mc_map[MAX_ADDR_LEN]; struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr; struct sockaddr_in *sin = (struct sockaddr_in *) addr; +#if defined(INET6) struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) addr; +#endif if (cma_any_addr(addr)) { memset(mgid, 0, sizeof *mgid); +#if defined(INET6) } else if ((addr->sa_family == AF_INET6) && ((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) == 0xFF10A01B)) { @@ -3236,6 +3241,7 @@ 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 } else { ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map); if (id_priv->id.ps == RDMA_PS_UDP)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502191148.t1JBm1a8021337>