netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH][v3][17/21] Add IPoIB (IP-over-InfiniBand)driver
@ 2004-12-13 20:19 Hal Rosenstock
  2004-12-14  0:14 ` Roland Dreier
  0 siblings, 1 reply; 7+ messages in thread
From: Hal Rosenstock @ 2004-12-13 20:19 UTC (permalink / raw)
  To: Roland Dreier, linux-kernel; +Cc: netdev, openib-general

Hi Roland,

[You wrote:]
> The IPoIB protocol/encapsulation is described in the Internet-Drafts
>  http://www.ietf.org/internet-drafts/draft-ietf-ipoib-architecture-04.txt
>  http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-07.txt

The latest I-D is now http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt

Also, isn't DHCP over IB (http://www.ietf.org/internet-drafts/draft-ietf-ipoib-dhcp-over-infiniband-07.txt) 
also supported ? If so, is that part of this or some other patch being submitted ?

Thanks.

-- Hal

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH][v3][16/21] IPoIB IPv6 support
@ 2004-12-13 18:09 Roland Dreier
  2004-12-13 18:09 ` [PATCH][v3][17/21] Add IPoIB (IP-over-InfiniBand) driver Roland Dreier
  0 siblings, 1 reply; 7+ messages in thread
From: Roland Dreier @ 2004-12-13 18:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: openib-general, netdev

Add ipv6_ib_mc_map() to convert IPv6 multicast addresses to IPoIB
hardware addresses, and add support for autoconfiguration for devices
with type ARPHRD_INFINIBAND.

The mapping for multicast addresses is described in
  http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-07.txt

Signed-off-by: Nitin Hande <Nitin.Hande@Sun.Com>
Signed-off-by: Roland Dreier <roland@topspin.com>


--- linux-bk.orig/include/net/if_inet6.h	2004-12-11 15:16:37.000000000 -0800
+++ linux-bk/include/net/if_inet6.h	2004-12-13 09:44:48.801536031 -0800
@@ -266,5 +266,20 @@
 {
 	buf[0] = 0x00;
 }
+
+static inline void ipv6_ib_mc_map(struct in6_addr *addr, char *buf)
+{
+	buf[0]  = 0;		/* Reserved */
+	buf[1]  = 0xff;		/* Multicast QPN */
+	buf[2]  = 0xff;
+	buf[3]  = 0xff;
+	buf[4]  = 0xff;
+	buf[5]  = 0x12;		/* link local scope */
+	buf[6]  = 0x60;		/* IPv6 signature */
+	buf[7]  = 0x1b;
+	buf[8]  = 0;		/* P_Key */
+	buf[9]  = 0;
+	memcpy(buf + 10, addr->s6_addr + 6, 10);
+}
 #endif
 #endif
--- linux-bk.orig/net/ipv6/addrconf.c	2004-12-11 15:16:33.000000000 -0800
+++ linux-bk/net/ipv6/addrconf.c	2004-12-13 09:44:48.840530286 -0800
@@ -48,6 +48,7 @@
 #include <linux/netdevice.h>
 #include <linux/if_arp.h>
 #include <linux/if_arcnet.h>
+#include <linux/if_infiniband.h>
 #include <linux/route.h>
 #include <linux/inetdevice.h>
 #include <linux/init.h>
@@ -1095,6 +1096,12 @@
 		memset(eui, 0, 7);
 		eui[7] = *(u8*)dev->dev_addr;
 		return 0;
+	case ARPHRD_INFINIBAND:
+		if (dev->addr_len != INFINIBAND_ALEN)
+			return -1;
+		memcpy(eui, dev->dev_addr + 12, 8);
+		eui[0] |= 2;
+		return 0;
 	}
 	return -1;
 }
@@ -1794,6 +1801,7 @@
 	if ((dev->type != ARPHRD_ETHER) && 
 	    (dev->type != ARPHRD_FDDI) &&
 	    (dev->type != ARPHRD_IEEE802_TR) &&
+	    (dev->type != ARPHRD_INFINIBAND) &&
 	    (dev->type != ARPHRD_ARCNET)) {
 		/* Alas, we support only Ethernet autoconfiguration. */
 		return;
--- linux-bk.orig/net/ipv6/ndisc.c	2004-12-11 15:16:13.000000000 -0800
+++ linux-bk/net/ipv6/ndisc.c	2004-12-13 09:44:48.890522921 -0800
@@ -260,6 +260,9 @@
 	case ARPHRD_ARCNET:
 		ipv6_arcnet_mc_map(addr, buf);
 		return 0;
+	case ARPHRD_INFINIBAND:
+		ipv6_ib_mc_map(addr, buf);
+		return 0;
 	default:
 		if (dir) {
 			memcpy(buf, dev->broadcast, dev->addr_len);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-12-14  0:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-13 20:19 [PATCH][v3][17/21] Add IPoIB (IP-over-InfiniBand)driver Hal Rosenstock
2004-12-14  0:14 ` Roland Dreier
  -- strict thread matches above, loose matches on Subject: below --
2004-12-13 18:09 [PATCH][v3][16/21] IPoIB IPv6 support Roland Dreier
2004-12-13 18:09 ` [PATCH][v3][17/21] Add IPoIB (IP-over-InfiniBand) driver Roland Dreier
2004-12-13 18:44   ` Tom Duffy
2004-12-13 18:49     ` Roland Dreier
2004-12-13 18:54       ` Tom Duffy
2004-12-13 19:00         ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).