Re: [ewg] [PATCH] Make multicast and path record queue flexible.
On Tue, 2010-10-05 at 14:12 -0500, Christoph Lameter wrote: On Tue, 5 Oct 2010, Jason Gunthorpe wrote: On Tue, Oct 05, 2010 at 06:07:37PM +0200, Aleksey Senin wrote: When using slow SM allow more packets to be buffered before answer comming back. This patch based on idea of Christoph Lameter. http://lists.openfabrics.org/pipermail/general/2009-June/059853.html IMHO, I think it is better to send multicasts to the broadcast MLID than to queue them.. More like ethernet that way. I agree. We had similar ideas. However, the kernel does send igmp reports to the MC address not to 244.0.0.2. We would have to redirect at the IB layer until multicast via MLID becomes functional. We cannot tell when that will be the case. But what if it will not be available from some reason? How long should we wait? Do we need implement another queue/counter/timeout? ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
Re: [ewg] [PATCH] Make multicast and path record queue flexible.
On Tue, 2010-10-05 at 14:18 -0500, Christoph Lameter wrote: On Tue, 5 Oct 2010, Aleksey Senin wrote: When using slow SM allow more packets to be buffered before answer comming back. This patch based on idea of Christoph Lameter. I agree, I think we need to have those things configurable. Reviewed-by: Christoph Lameter c...@linux.com How do you handle the situation of the SM responding before the fabric has been reconfigured? I do not see any delay on join. So they will be dropped if the fabric was not reconfigured fast enough? Or does the SM somehow delay the response? I think this issue, that should solve the problem of sending or delaying packets after obtaining MLID should be solved in another patch. Proposed code improve today situation, when you can't change it at all. Relating to broadcast, I don't think that this is a good solution it will bring unwarranted load, specially in the case if no MLID received. The way of adding delay before we start to send packages, seems to me better. ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
[ewg] [PATCH v3] IB Core: RAW ETH support
This patch adds support to RAW ETH QP in ib core. 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 000..ae43298 --- /dev/null +++ b/kernel_patches/fixes/core_0560_raw_eth_common.patch @@ -0,0 +1,63 @@ + Add new RAW_ETY QP type in order to build RAW Ethernet packets + over iWARP and RoCEE. + + +Signed-off-by: Aleksey Senin aleks...@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 + ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
[ewg] [PATCH v3] MLX4: RAW ETH support
This patch adds RAW ETH support to mlx4 driver. diff --git a/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch b/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch new file mode 100644 index 000..66a1c54 --- /dev/null +++ b/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch @@ -0,0 +1,251 @@ +Add RAW ETH QP support to Mellanox adapters +This patch relies on the RAW ETH patch to the ib core. + +Signed-off-by: Aleksey Senin aleks...@voltaire.com +--- + drivers/infiniband/hw/mlx4/main.c | 13 + + drivers/infiniband/hw/mlx4/qp.c | 22 ++ + drivers/net/mlx4/mcg.c| 22 +- + include/linux/mlx4/device.h |7 +-- + include/linux/mlx4/driver.h |5 + + 5 files changed, 50 insertions(+), 19 deletions(-) + +diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c +index c146b84..43d0ccc 100644 +--- a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c +@@ -684,7 +684,9 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + struct mlx4_ib_qp *mqp = to_mqp(ibqp); + + err = mlx4_multicast_attach(mdev-dev, mqp-mqp, gid-raw, !!(mqp-flags +- MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK)); ++ MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK), ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + if (err) + return err; + +@@ -695,7 +697,9 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + return 0; + + err_add: +- mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw); ++ mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw, ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + return err; + } + +@@ -724,8 +728,9 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + struct net_device *ndev; + struct gid_entry *ge; + +- err = mlx4_multicast_detach(mdev-dev, +- mqp-mqp, gid-raw); ++ err = mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw, ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + if (err) + return err; + +diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c +index 422d367..c50e110 100644 +--- a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c +@@ -811,6 +811,7 @@ struct ib_qp *mlx4_ib_create_qp(struct ib_pd *pd, + case IB_QPT_RC: + case IB_QPT_UC: + case IB_QPT_UD: ++ case IB_QPT_RAW_ETH: + { + qp = kzalloc(sizeof *qp, GFP_KERNEL); + if (!qp) +@@ -902,6 +903,7 @@ static int to_mlx4_st(enum ib_qp_type type) + case IB_QPT_RAW_ETY: + case IB_QPT_SMI: + case IB_QPT_GSI:return MLX4_QP_ST_MLX; ++ case IB_QPT_RAW_ETH:return MLX4_QP_ST_MLX; + default:return -1; + } + } +@@ -1064,8 +1066,9 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, + break; + } + } +- +- if (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || ++ if (ibqp-qp_type == IB_QPT_RAW_ETH) ++ context-mtu_msgmax = 0xff; ++ else if (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || + ibqp-qp_type == IB_QPT_RAW_ETY) + context-mtu_msgmax = (IB_MTU_4096 5) | 11; + else if (ibqp-qp_type == IB_QPT_UD) { +@@ -1237,7 +1240,8 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, + if (cur_state == IB_QPS_INIT + new_state == IB_QPS_RTR + (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || +- ibqp-qp_type == IB_QPT_UD || ibqp-qp_type == IB_QPT_RAW_ETY)) { ++ ibqp-qp_type == IB_QPT_UD || ibqp-qp_type == IB_QPT_RAW_ETY || ++ ibqp-qp_type == IB_QPT_RAW_ETH)) { + context-pri_path.sched_queue = (qp-port - 1) 6; + if (is_qp0(dev, qp)) + context-pri_path.sched_queue |= MLX4_IB_DEFAULT_QP0_SCHED_QUEUE; +@@ -1356,7 +1360,7 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, + goto out; + } + +- if ((attr_mask IB_QP_PORT) ++ if ((attr_mask IB_QP_PORT) (ibqp-qp_type != IB_QPT_RAW_ETH) + (attr-port_num == 0 || attr-port_num dev-num_ports)) { + mlx4_ib_dbg(qpn 0x%x: invalid port number (%d) specified + for transition %d to %d. qp_type %d, +@@ -1365,6 +1369,16 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, + goto out; + } + ++ if ((attr_mask IB_QP_PORT) (ibqp-qp_type
[ewg] [PATCH v4] IB Core: RAW ETH support
This patch adds support to RAW ETH QP in ib core. 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 000..ae43298 --- /dev/null +++ b/kernel_patches/fixes/core_0560_raw_eth_common.patch @@ -0,0 +1,63 @@ + Add new RAW_ETH QP type in order to build RAW Ethernet packets + over iWARP and RoCEE. + + +Signed-off-by: Aleksey Senin aleks...@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 + ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
[ewg] [PATCH v4] MLX4: RAW ETH support
This patch adds RAW ETH support to mlx4 driver. diff --git a/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch b/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch new file mode 100644 index 000..66a1c54 --- /dev/null +++ b/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch @@ -0,0 +1,251 @@ +Add RAW ETH QP support to Mellanox adapters +This patch relies on the RAW ETH patch to the ib core. + +Signed-off-by: Aleksey Senin aleks...@voltaire.com +--- + drivers/infiniband/hw/mlx4/main.c | 13 + + drivers/infiniband/hw/mlx4/qp.c | 22 ++ + drivers/net/mlx4/mcg.c| 22 +- + include/linux/mlx4/device.h |7 +-- + include/linux/mlx4/driver.h |5 + + 5 files changed, 50 insertions(+), 19 deletions(-) + +diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c +index c146b84..43d0ccc 100644 +--- a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c +@@ -684,7 +684,9 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + struct mlx4_ib_qp *mqp = to_mqp(ibqp); + + err = mlx4_multicast_attach(mdev-dev, mqp-mqp, gid-raw, !!(mqp-flags +- MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK)); ++ MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK), ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + if (err) + return err; + +@@ -695,7 +697,9 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + return 0; + + err_add: +- mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw); ++ mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw, ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + return err; + } + +@@ -724,8 +728,9 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + struct net_device *ndev; + struct gid_entry *ge; + +- err = mlx4_multicast_detach(mdev-dev, +- mqp-mqp, gid-raw); ++ err = mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw, ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + if (err) + return err; + +diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c +index 422d367..c50e110 100644 +--- a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c +@@ -811,6 +811,7 @@ struct ib_qp *mlx4_ib_create_qp(struct ib_pd *pd, + case IB_QPT_RC: + case IB_QPT_UC: + case IB_QPT_UD: ++ case IB_QPT_RAW_ETH: + { + qp = kzalloc(sizeof *qp, GFP_KERNEL); + if (!qp) +@@ -902,6 +903,7 @@ static int to_mlx4_st(enum ib_qp_type type) + case IB_QPT_RAW_ETY: + case IB_QPT_SMI: + case IB_QPT_GSI:return MLX4_QP_ST_MLX; ++ case IB_QPT_RAW_ETH:return MLX4_QP_ST_MLX; + default:return -1; + } + } +@@ -1064,8 +1066,9 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, + break; + } + } +- +- if (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || ++ if (ibqp-qp_type == IB_QPT_RAW_ETH) ++ context-mtu_msgmax = 0xff; ++ else if (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || + ibqp-qp_type == IB_QPT_RAW_ETY) + context-mtu_msgmax = (IB_MTU_4096 5) | 11; + else if (ibqp-qp_type == IB_QPT_UD) { +@@ -1237,7 +1240,8 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, + if (cur_state == IB_QPS_INIT + new_state == IB_QPS_RTR + (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || +- ibqp-qp_type == IB_QPT_UD || ibqp-qp_type == IB_QPT_RAW_ETY)) { ++ ibqp-qp_type == IB_QPT_UD || ibqp-qp_type == IB_QPT_RAW_ETY || ++ ibqp-qp_type == IB_QPT_RAW_ETH)) { + context-pri_path.sched_queue = (qp-port - 1) 6; + if (is_qp0(dev, qp)) + context-pri_path.sched_queue |= MLX4_IB_DEFAULT_QP0_SCHED_QUEUE; +@@ -1356,7 +1360,7 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, + goto out; + } + +- if ((attr_mask IB_QP_PORT) ++ if ((attr_mask IB_QP_PORT) (ibqp-qp_type != IB_QPT_RAW_ETH) + (attr-port_num == 0 || attr-port_num dev-num_ports)) { + mlx4_ib_dbg(qpn 0x%x: invalid port number (%d) specified + for transition %d to %d. qp_type %d, +@@ -1365,6 +1369,16 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, + goto out; + } + ++ if ((attr_mask IB_QP_PORT) (ibqp-qp_type ==
[ewg] [PATCH v5] IB Core: RAW ETH support
This patch adds support to RAW ETH QP in ib core. 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 000..ae43298 --- /dev/null +++ b/kernel_patches/fixes/core_0560_raw_eth_common.patch @@ -0,0 +1,63 @@ + Add new RAW_ETH QP type in order to build RAW Ethernet packets + over iWARP and RoCEE. + + +Signed-off-by: Aleksey Senin aleks...@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 + ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
[ewg] [PATCH v5] MLX: RAW ETH support
RAW ETH Mellanox support Diffs from V4: Removed unnecessary 'return' from to_mlx4_st function Signed-off-by: Aleksey Senin aleks...@voltaire.com --- kernel_patches/fixes/mlx4_x_0050_raw_eth.patch | 255 1 files changed, 255 insertions(+), 0 deletions(-) create mode 100644 kernel_patches/fixes/mlx4_x_0050_raw_eth.patch diff --git a/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch b/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch new file mode 100644 index 000..8e72d3c --- /dev/null +++ b/kernel_patches/fixes/mlx4_x_0050_raw_eth.patch @@ -0,0 +1,255 @@ +From 37e6adf1ff039e13242636e988299e53099798d1 Mon Sep 17 00:00:00 2001 +From: Aleksey Senin aleks...@voltaire.com +Date: Mon, 14 Jun 2010 13:32:37 +0300 +Subject: [PATCH] Mellanox RAW ETH support + +This patch adds RAW ETH support for Mellanox drivers + +Signed-off-by: Aleksey Senin aleks...@voltaire.com +--- + drivers/infiniband/hw/mlx4/main.c | 13 + + drivers/infiniband/hw/mlx4/qp.c | 24 +++- + drivers/net/mlx4/mcg.c| 20 + include/linux/mlx4/device.h |7 +-- + include/linux/mlx4/driver.h |5 + + 5 files changed, 50 insertions(+), 19 deletions(-) + +diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c +index c146b84..43d0ccc 100644 +--- a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c +@@ -684,7 +684,9 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + struct mlx4_ib_qp *mqp = to_mqp(ibqp); + + err = mlx4_multicast_attach(mdev-dev, mqp-mqp, gid-raw, !!(mqp-flags +- MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK)); ++ MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK), ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + if (err) + return err; + +@@ -695,7 +697,9 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + return 0; + + err_add: +- mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw); ++ mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw, ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + return err; + } + +@@ -724,8 +728,9 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) + struct net_device *ndev; + struct gid_entry *ge; + +- err = mlx4_multicast_detach(mdev-dev, +- mqp-mqp, gid-raw); ++ err = mlx4_multicast_detach(mdev-dev, mqp-mqp, gid-raw, ++ (ibqp-qp_type == IB_QPT_RAW_ETH) ? ++ MLX4_MCAST_PROT_EN : MLX4_MCAST_PROT_IB); + if (err) + return err; + +diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c +index 1fe4d77..a0dd1d5 100644 +--- a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c +@@ -811,6 +811,7 @@ struct ib_qp *mlx4_ib_create_qp(struct ib_pd *pd, + case IB_QPT_RC: + case IB_QPT_UC: + case IB_QPT_UD: ++ case IB_QPT_RAW_ETH: + { + qp = kzalloc(sizeof *qp, GFP_KERNEL); + if (!qp) +@@ -901,7 +902,8 @@ static int to_mlx4_st(enum ib_qp_type type) + case IB_QPT_XRC:return MLX4_QP_ST_XRC; + case IB_QPT_RAW_ETY: + case IB_QPT_SMI: +- case IB_QPT_GSI:return MLX4_QP_ST_MLX; ++ case IB_QPT_GSI: ++ case IB_QPT_RAW_ETH:return MLX4_QP_ST_MLX; + default:return -1; + } + } +@@ -1066,8 +1068,9 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, + break; + } + } +- +- if (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || ++ if (ibqp-qp_type == IB_QPT_RAW_ETH) ++ context-mtu_msgmax = 0xff; ++ else if (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || + ibqp-qp_type == IB_QPT_RAW_ETY) + context-mtu_msgmax = (IB_MTU_4096 5) | 11; + else if (ibqp-qp_type == IB_QPT_UD) { +@@ -1239,7 +1242,8 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, + if (cur_state == IB_QPS_INIT + new_state == IB_QPS_RTR + (ibqp-qp_type == IB_QPT_GSI || ibqp-qp_type == IB_QPT_SMI || +- ibqp-qp_type == IB_QPT_UD || ibqp-qp_type == IB_QPT_RAW_ETY)) { ++ ibqp-qp_type == IB_QPT_UD || ibqp-qp_type == IB_QPT_RAW_ETY || ++ ibqp-qp_type == IB_QPT_RAW_ETH)) { + context-pri_path.sched_queue = (qp-port - 1) 6; + if (is_qp0(dev, qp)) + context-pri_path.sched_queue |= MLX4_IB_DEFAULT_QP0_SCHED_QUEUE; +@@ -1358,7 +1362,7 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, +
Re: [ewg] [PATCH v4] IB Core: RAW ETH support
I tested it before on the Roland tree ( iboe branch ) and it fails, because it writen in the way suitable for OFED. If adapt the patch to the Roland tree, then appling Mellanox OFED patches will fail, because it changes the same functions in the code. Here is one example: Look at __mlx4_ib_modify_qp at the Roland tree - there is no RAW_ETY support. But in the OFED version of the same function this support is present. RAW_ETH patch modify this function and looking for RAW_ETY word and without this RAW_ETH Mellanox patch will fail. The similar thing happens with patch for the verbs. There is no iWARP present in the Roland tree. On Mon, 2010-06-14 at 13:50 +0300, Eli Cohen wrote: I don't think there is a substantial dependence between RoCEE and raw ethernet. I don't know what Moni meant. Moni? -Original Message- From: Or Gerlitz [mailto:ogerl...@voltaire.com] Sent: Monday, June 14, 2010 1:42 PM To: Moni Shoua; Eli Cohen Cc: Aleksey Senin; Vladimir Sokolovsky; v...@dev.mellanox.co.il; e...@openfabrics.org Subject: Re: [ewg] [PATCH v4] IB Core: RAW ETH support Moni Shoua wrote: The patches can't be applies to upstream kernel. An attempt to do this failed. I guess that some of RoCEE patches are still missing in kernel upstream. Eli, can you elaborate on that? is there any real dependence between the RoCE patches to the raw qp ones? what is this dependence in high level, is it placement of change sets in the code or actual flows? Or. ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
[ewg] RAW_ETH support [PATCH 1/1]
Vlad, apply this patch. It will add new RAW_ETH enum and used by NES/Intel driver in their code. This patch add RAW_ETH QP type to verbs layer. Signed-off-by: Aleksey Senin aleks...@voltaire.com --- kernel_patches/fixes/core_0560_raw_eth.patch | 63 ++ 1 files changed, 63 insertions(+), 0 deletions(-) create mode 100644 kernel_patches/fixes/core_0560_raw_eth.patch diff --git a/kernel_patches/fixes/core_0560_raw_eth.patch b/kernel_patches/fixes/core_0560_raw_eth.patch new file mode 100644 index 000..2a8b30f --- /dev/null +++ b/kernel_patches/fixes/core_0560_raw_eth.patch @@ -0,0 +1,63 @@ + Add new RAW_ETY QP type in order to build RAW Ethernet packets + over iWARP and RDMAOE protocols. + + +Signed-off-by: Aleksey Senin aleks...@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.4.2 ___ ewg mailing list ewg@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg