Hey Roland,
Do you have thoughts on this change? It is useful along with the
IBV_QPT_RAW_ETY type added to libibverbs for cxgb devices too.
Steve.
[email protected] wrote:
The patch enables usage of attach_mcast()/detach_mcast driver
specific verbs for iWARP devices.
IB path is unchanged.
iWARP path adds checking for raw ethernet QP type
Signed-off-by: Mirek Walukiewicz <[email protected]>
---
drivers/infiniband/core/verbs.c | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index a7da9be..b5023f2 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -887,9 +887,17 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid,
u16 lid)
{
if (!qp->device->attach_mcast)
return -ENOSYS;
- if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
- return -EINVAL;
+ switch (qp->device->node_type) {
+ case RDMA_TRANSPORT_IB:
+ if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
+ return -EINVAL;
+ break;
+ case RDMA_TRANSPORT_IWARP:
+ if (qp->qp_type != IB_QPT_RAW_ETY)
+ return -EINVAL;
+ break;
+ }
return qp->device->attach_mcast(qp, gid, lid);
}
EXPORT_SYMBOL(ib_attach_mcast);
@@ -898,9 +906,17 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid,
u16 lid)
{
if (!qp->device->detach_mcast)
return -ENOSYS;
- if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
- return -EINVAL;
+ switch (qp->device->node_type) {
+ case RDMA_TRANSPORT_IB:
+ if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD)
+ return -EINVAL;
+ break;
+ case RDMA_TRANSPORT_IWARP:
+ if (qp->qp_type != IB_QPT_RAW_ETY)
+ return -EINVAL;
+ break;
+ }
return qp->device->detach_mcast(qp, gid, lid);
}
EXPORT_SYMBOL(ib_detach_mcast);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html