public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: Aleksey Senin <alekseys@voltaire.com>
Cc: "general\@lists.openfabrics.org" <general@lists.openfabrics.org>,
	linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Linus <torvalds@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: linux-next: origin tree build failure
Date: Mon, 29 Dec 2008 12:18:06 -0800	[thread overview]
Message-ID: <adaljtyu45d.fsf@cisco.com> (raw)
In-Reply-To: <1230544737.4261.33.camel@alst60> (Aleksey Senin's message of "Mon, 29 Dec 2008 11:58:57 +0200")

Something like the following maybe?  (This turns off the RDMA CM if
INFINIBAND=y and IPV6=m -- another possibility would be to just turn off
RDMA CM IPv6 support in the case that IB is build-in but IPv6 is
modular, but that seems like a worse idea overall)

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index a5dc78a..538a0ba 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -36,7 +36,7 @@ config INFINIBAND_USER_MEM
 
 config INFINIBAND_ADDR_TRANS
 	bool
-	depends on INET
+	depends on INET && !(INFINIBAND = y && IPV6 = m)
 	default y
 
 source "drivers/infiniband/hw/mthca/Kconfig"
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index d98b05b..ec7abb5 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -128,6 +128,7 @@ int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr)
 		ret = rdma_copy_addr(dev_addr, dev, NULL);
 		dev_put(dev);
 		break;
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 	case AF_INET6:
 		for_each_netdev(&init_net, dev) {
 			if (ipv6_chk_addr(&init_net,
@@ -138,6 +139,7 @@ int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr)
 			}
 		}
 		break;
+#endif
 	default:
 		break;
 	}
@@ -179,10 +181,11 @@ static void addr_send_arp(struct sockaddr *dst_in)
 {
 	struct rtable *rt;
 	struct flowi fl;
-	struct dst_entry *dst;
 
 	memset(&fl, 0, sizeof fl);
-	if (dst_in->sa_family == AF_INET)  {
+
+	switch (dst_in->sa_family) {
+	case AF_INET:
 		fl.nl_u.ip4_u.daddr =
 			((struct sockaddr_in *) dst_in)->sin_addr.s_addr;
 
@@ -191,8 +194,13 @@ static void addr_send_arp(struct sockaddr *dst_in)
 
 		neigh_event_send(rt->u.dst.neighbour, NULL);
 		ip_rt_put(rt);
+		break;
+
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+	case AF_INET6:
+	{
+		struct dst_entry *dst;
 
-	} else {
 		fl.nl_u.ip6_u.daddr =
 			((struct sockaddr_in6 *) dst_in)->sin6_addr;
 
@@ -202,6 +210,9 @@ static void addr_send_arp(struct sockaddr *dst_in)
 
 		neigh_event_send(dst->neighbour, NULL);
 		dst_release(dst);
+		break;
+	}
+#endif
 	}
 }
 
@@ -254,6 +265,7 @@ out:
 	return ret;
 }
 
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 static int addr6_resolve_remote(struct sockaddr_in6 *src_in,
 			       struct sockaddr_in6 *dst_in,
 			       struct rdma_dev_addr *addr)
@@ -282,6 +294,14 @@ static int addr6_resolve_remote(struct sockaddr_in6 *src_in,
 	dst_release(dst);
 	return ret;
 }
+#else
+static int addr6_resolve_remote(struct sockaddr_in6 *src_in,
+			       struct sockaddr_in6 *dst_in,
+			       struct rdma_dev_addr *addr)
+{
+	return -EADDRNOTAVAIL;
+}
+#endif
 
 static int addr_resolve_remote(struct sockaddr *src_in,
 				struct sockaddr *dst_in,
@@ -340,7 +360,9 @@ static int addr_resolve_local(struct sockaddr *src_in,
 	struct net_device *dev;
 	int ret;
 
-	if (dst_in->sa_family == AF_INET) {
+	switch (dst_in->sa_family) {
+	case AF_INET:
+	{
 		__be32 src_ip = ((struct sockaddr_in *) src_in)->sin_addr.s_addr;
 		__be32 dst_ip = ((struct sockaddr_in *) dst_in)->sin_addr.s_addr;
 
@@ -362,7 +384,12 @@ static int addr_resolve_local(struct sockaddr *src_in,
 				memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN);
 		}
 		dev_put(dev);
-	} else {
+		break;
+	}
+
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+	case AF_INET6:
+	{
 		struct in6_addr *a;
 
 		for_each_netdev(&init_net, dev)
@@ -390,6 +417,13 @@ static int addr_resolve_local(struct sockaddr *src_in,
 			if (!ret)
 				memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN);
 		}
+		break;
+	}
+#endif
+
+	default:
+		ret = -EADDRNOTAVAIL;
+		break;
 	}
 
 	return ret;

  parent reply	other threads:[~2008-12-29 20:18 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29  0:43 linux-next: origin tree build failure Stephen Rothwell
2008-12-29  3:36 ` Roland Dreier
2008-12-29  3:44 ` Roland Dreier
2008-12-29  9:58   ` Aleksey Senin
2008-12-29 16:13     ` Roland Dreier
2008-12-29 16:52       ` Aleksey Senin
2008-12-29 20:18     ` Roland Dreier [this message]
2008-12-29 21:07       ` Linus Torvalds
2008-12-29 21:35         ` Roland Dreier
2008-12-29 21:48           ` [ofa-general] " Roland Dreier
2008-12-29  8:48 ` Aleksey Senin
2008-12-30  7:38 ` Roland Dreier
2008-12-30  8:30   ` Stephen Rothwell
2008-12-30 15:41     ` [ofa-general] " Roland Dreier
2008-12-30 15:46       ` Stephen Rothwell
2008-12-30 22:52         ` Stephen Rothwell
2008-12-30 22:56           ` Roland Dreier
2008-12-30 23:17             ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2010-01-12  1:14 Stephen Rothwell
2010-01-12  1:26 ` Linus Torvalds
2010-01-12  2:32   ` Stephen Rothwell
2010-01-12  2:39     ` Stephen Rothwell
2010-01-13  0:14       ` Phillip Lougher
2010-01-13  2:55         ` Stephen Rothwell
2010-01-11 23:58 Stephen Rothwell
2010-01-12  0:29 ` Joakim Tjernlund
2010-01-12 12:38 ` Joakim Tjernlund
2009-12-24  0:54 Stephen Rothwell
2009-12-15  5:41 Stephen Rothwell
2009-12-15  8:07 ` Ingo Molnar
2009-12-15 13:01 ` Peter Ujfalusi
2009-12-15 14:53 ` Mark Brown
2009-12-15 17:27   ` Tony Lindgren
2009-12-15 22:45     ` Stephen Rothwell
2009-12-15 23:02       ` Linus Torvalds
2009-12-15 23:37         ` Stephen Rothwell
2009-12-16  9:30       ` Samuel Ortiz
2009-12-09 23:57 Stephen Rothwell
2009-11-30 23:10 Stephen Rothwell
2009-11-12  0:23 Stephen Rothwell
2009-10-09  7:50 Stephen Rothwell
2009-07-09  0:28 Stephen Rothwell
2009-06-25  1:13 Stephen Rothwell
2009-06-25  3:24 ` Baruch Siach
2009-06-25  4:12   ` Paul Mundt
2009-06-23  6:22 Stephen Rothwell
2009-06-23 10:13 ` Mark Brown
2009-06-19  6:30 Stephen Rothwell
2009-06-12  0:46 Stephen Rothwell
2009-06-12  0:24 Stephen Rothwell
2009-06-12  0:53 ` Paul Mackerras
2009-06-12  1:00 ` Benjamin Herrenschmidt
2009-06-12  9:20   ` Ingo Molnar
2009-06-12  9:33     ` Benjamin Herrenschmidt
2009-06-12  9:43       ` Peter Zijlstra
2009-06-12  9:55         ` Ingo Molnar
2009-06-12  9:57         ` Benjamin Herrenschmidt
2009-06-12 12:53       ` Ingo Molnar
2009-06-12 13:10         ` Benjamin Herrenschmidt
2009-06-12 13:29           ` Benjamin Herrenschmidt
2009-06-12 13:49             ` Ingo Molnar
2009-06-12 14:06               ` Benjamin Herrenschmidt
2009-06-12 14:11                 ` Ingo Molnar
2009-06-12 14:23                   ` Benjamin Herrenschmidt
2009-06-13  5:06                   ` Stephen Rothwell
2009-06-12 13:44           ` Ingo Molnar
2009-06-12 13:56             ` Benjamin Herrenschmidt
2009-06-12 14:07               ` Ingo Molnar
2009-06-12 14:19                 ` Benjamin Herrenschmidt
2009-06-13  4:54             ` Stephen Rothwell
2009-04-14  7:34 Stephen Rothwell
2009-04-14  7:58 ` Jesper Nilsson
2009-04-14  4:43 Stephen Rothwell
2009-04-14  8:57 ` David Miller
2009-04-14  9:20   ` Heiko Carstens
2009-04-14  9:08 ` David Miller
2009-04-14 10:26   ` Stephen Rothwell
2009-04-08  3:28 Stephen Rothwell
2009-04-08  0:10 Stephen Rothwell
2009-03-30  0:55 Stephen Rothwell
2009-01-11 23:48 Stephen Rothwell
2009-01-12  0:10 ` Benjamin Herrenschmidt
2009-01-12  9:05   ` Ingo Molnar
2009-01-12  9:24     ` Stephen Rothwell
2009-01-12  9:32       ` Ingo Molnar
2009-01-13 16:31         ` Stephen Rothwell
2009-01-12  9:49     ` Michael Ellerman
2009-01-12 10:44       ` Ingo Molnar
2008-12-29  0:00 Stephen Rothwell
2008-12-28 23:51 Stephen Rothwell
2008-12-28 23:38 Stephen Rothwell
2008-12-29  0:31 ` Linus Torvalds
2008-10-16  0:31 Stephen Rothwell
2008-10-16 12:58 ` Ralf Baechle
2008-10-14 22:59 Stephen Rothwell
2008-10-14 23:43 ` Linus Torvalds
2008-10-14 23:52   ` David Miller
2008-10-15  0:05   ` Mark Brown
2008-10-15  0:34     ` Linus Torvalds
2008-10-14 23:51 ` Linus Torvalds
2008-10-15  9:02 ` Alan Cox
2008-10-15  9:33 ` Ingo Molnar
2008-10-15 11:01   ` Mark Brown
2008-08-26  0:37 Stephen Rothwell
2008-08-18  0:01 Stephen Rothwell
2008-08-18 12:55 ` David Howells
2008-08-18 14:03   ` James Morris
2008-07-25  0:30 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adaljtyu45d.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=alekseys@voltaire.com \
    --cc=general@lists.openfabrics.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox