[ewg] [PATCH v6] IB CORE: RAW ETH support

Walukiewicz, Miroslaw Miroslaw.Walukiewicz at intel.com
Tue Jun 15 05:06:18 PDT 2010


Hello Aleksey, 

This patch is not working for iWARP. There is no change from ETY to ETH for ibv_attach_mcast/ibv_detach_mcast() for RDMA_TRANSPORT_IWARP

Mirek

-----Original Message-----
From: ewg-bounces at lists.openfabrics.org [mailto:ewg-bounces at lists.openfabrics.org] On Behalf Of Aleksey Senin
Sent: Monday, June 14, 2010 2:39 PM
To: vlad at dev.mellanox.co.il; eli at dev.mellanox.co.il; ewg at openfabrics.org
Cc: monis at voltaire.com; eli at mellanox.co.il
Subject: [ewg] [PATCH v6] IB CORE: RAW ETH support

This patch add RAW ETH support to IB core.


Signed-off-by: Aleksey Senin <alekseys at voltaire.com>
---
 .../fixes/core_0560_raw_eth_common.patch           |   66 ++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 kernel_patches/fixes/core_0560_raw_eth_common.patch

diff --git a/kernel_patches/fixes/core_0560_raw_eth_common.patch b/kernel_patches/fixes/core_0560_raw_eth_common.patch
new file mode 100644
index 0000000..52d7be7
--- /dev/null
+++ b/kernel_patches/fixes/core_0560_raw_eth_common.patch
@@ -0,0 +1,66 @@
+From b76993213461212cfdb40817b454513a91ee4e6e Mon Sep 17 00:00:00 2001
+From: Aleksey Senin <alekseys at voltaire.com>
+Date: Mon, 14 Jun 2010 15:20:40 +0300
+Subject: [PATCH 1/2] Verbs RAW ETH support
+
+This patch add RAW ETH support in IB core.
+
+Signed-off-by: Aleksey Senin <alekseys at voltaire.com>
+---
+ drivers/infiniband/core/verbs.c |   13 +++++++++++--
+ include/rdma/ib_verbs.h         |    1 +
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
+index 881850e..bb4dcd5 100644
+--- a/drivers/infiniband/core/verbs.c
++++ b/drivers/infiniband/core/verbs.c
+@@ -382,6 +382,7 @@ static const struct {
+ 				[IB_QPT_UD]  = (IB_QP_PKEY_INDEX		|
+ 						IB_QP_PORT			|
+ 						IB_QP_QKEY),
++				[IB_QPT_RAW_ETH] = IB_QP_PORT,
+ 				[IB_QPT_UC]  = (IB_QP_PKEY_INDEX		|
+ 						IB_QP_PORT			|
+ 						IB_QP_ACCESS_FLAGS),
+@@ -1004,7 +1005,11 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
+ 
+ 	switch (rdma_node_get_transport(qp->device->node_type)) {
+ 	case RDMA_TRANSPORT_IB:
+-		if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
++		if (qp->qp_type == IB_QPT_RAW_ETH) {
++			/* In raw Etherent mgids the 63 msb's should be 0 */
++			if (gid->global.subnet_prefix & cpu_to_be64(~1ULL))
++				return -EINVAL;
++		} else if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
+ 			return -EINVAL;
+ 		break;
+ 	case RDMA_TRANSPORT_IWARP:
+@@ -1023,7 +1028,11 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
+ 
+ 	switch (rdma_node_get_transport(qp->device->node_type)) {
+ 	case RDMA_TRANSPORT_IB:
+-		if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
++		if (qp->qp_type == IB_QPT_RAW_ETH) {
++			/* In raw Etherent mgids the 63 msb's should be 0 */
++			if (gid->global.subnet_prefix & cpu_to_be64(~1ULL))
++				return -EINVAL;
++		} else if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
+ 			return -EINVAL;
+ 		break;
+ 	case RDMA_TRANSPORT_IWARP:
+diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
+index 3a5a40f..2162253 100644
+--- a/include/rdma/ib_verbs.h
++++ b/include/rdma/ib_verbs.h
+@@ -571,6 +571,7 @@ enum ib_qp_type {
+ 	IB_QPT_UD,
+ 	IB_QPT_XRC,
+ 	IB_QPT_RAW_IPV6,
++	IB_QPT_RAW_ETH,
+ 	IB_QPT_RAW_ETY
+ };
+ 
+-- 
+1.6.5.2
+
-- 
1.6.5.2

_______________________________________________
ewg mailing list
ewg at lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg



More information about the ewg mailing list