Re: [PATCH for-next 5/7] IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers

2015-12-29 Thread Or Gerlitz
On Tue, Dec 29, 2015 at 3:24 PM, Matan Barak wrote: > @@ -2413,34 +2442,27 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, > struct ib_ud_wr *wr, > > if (is_eth) { > struct in6_addr in6; > - > + u16 ether_type; >

Re: [PATCH V2] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Or Gerlitz
On 12/29/2015 4:41 PM, Leon Romanovsky wrote: From: Leon Romanovsky The create_cq() can receive creation flags which were used differently by two commits which added create_cq extended command and cross-channel. The merged code caused to not accept any flags at all. This

Re: [PATCH for-next 7/7] IB/mlx4: Advertise RoCE support

2015-12-29 Thread Or Gerlitz
On 12/29/2015 3:24 PM, Matan Barak wrote: Advertise RoCE support in port_immutable according to the hardware capabilities. This enables the verbs stack to use RoCE v2 mode. Advertise RoCE V2 support Signed-off-by: Matan Barak I guess you wanted "IB/mlx4: Advertise

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-29 Thread ira.weiny
On Tue, Dec 29, 2015 at 11:51:19AM +0200, Sagi Grimberg wrote: > > >Please just convert the mad handler to the new CQ API in > >drivers/infiniband/core/cq.c. If you have any question about it I'd be > >glad to help you. > > +1 on this suggestion. > > We had these sorts of questions in our ULPs

Re: [PATCH for-next 2/7] IB/mlx4: Add RoCE per GID support for add_gid and del_gid

2015-12-29 Thread Or Gerlitz
On 12/29/2015 3:24 PM, Matan Barak wrote: [...] We use a new firmware command in order to populate the GID table and store the type along with the GID value. Its a new value to existing command.. so better say we use a new value to the SET_PORT firmware command to do X Also here, break out

Re: [PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-29 Thread Or Gerlitz
On 12/29/2015 3:24 PM, Matan Barak wrote: @@ -905,6 +906,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_EQE_STRIDE; MLX4_GET(dev_cap->bmme_flags, outbox,

Re: [PATCH v2] IB/core: sysfs.c: Fix PerfMgt ClassPortInfo handling

2015-12-29 Thread Christoph Lameter
Reviewed-by: Christoph Lameter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC] Generic InfiniBand transport done in software

2015-12-29 Thread Doug Ledford
On 12/27/2015 12:54 PM, Moni Shoua wrote: >> Yes it is specific to Intel *now*, that doesn't mean it should stay that >> way. Rdmavt could, and in my opinion should, be extended to support >> soft-roce. I don't think replicating the same thing is a great idea. >> > But you post *now* a so called

SoftRoCE V1

2015-12-29 Thread Wenda Ni
Hi experts, We have several Mellanox RoCE V1 NIC cards, and would like to try communicating with SoftRoCE V1. We are using branch rxe-3.0 from https://github.com/SoftRoCE/rxe-dev according to the Soft-RoCE README Rev 1.0 issued from Mellanox last year. Testing using pingpong examples from

Re: [RFC] Generic InfiniBand transport done in software

2015-12-29 Thread Moni Shoua
I think that my point is missed. See my answers inline > This is incorrect. This isn't some public API that we are exporting to > user space. Nor is it an API that out of tree drivers are using. This > is a purely kernel internal API for use by a limited number of drivers. > As such, it need

Re: [RFC] Generic InfiniBand transport done in software

2015-12-29 Thread Dennis Dalessandro
On Tue, Dec 29, 2015 at 07:38:30PM +0200, Moni Shoua wrote: This is not a question if I can hook Soft RoCE driver into this framework. In fact, I can't think of an IB driver that can't use this framework. What this framework offers is just another hop from ib_core the real driver. Where is the

Re: [PATCH for-next 2/3] IB/core: Change per-entry lock in RoCE GID table to one lock

2015-12-29 Thread Bart Van Assche
On 12/30/2015 07:01 AM, Or Gerlitz wrote: On 10/28/2015 4:52 PM, Matan Barak wrote: @@ -134,16 +138,14 @@ static int write_gid(struct ib_device *ib_dev, u8 port, { int ret = 0; struct net_device *old_net_dev; -unsigned long flags; /* in rdma_cap_roce_gid_table, this

Re: [PATCH for-next V3 10/11] IB/core: Initialize UD header structure with IP and UDP headers

2015-12-29 Thread Or Gerlitz
On 12/23/2015 2:56 PM, Matan Barak wrote: +__be16 ib_ud_ip4_csum(struct ib_ud_header *header) +{ + struct iphdr iph; + + iph.ihl = 5; + iph.version = 4; + iph.tos = header->ip4.tos; + iph.tot_len = header->ip4.tot_len; + iph.id

Re: [PATCH for-next V3 00/11] Add RoCE v2 support

2015-12-29 Thread Or Gerlitz
Hi Matan, I see these two smatch complaints on code added with this series, can you please take a look? drivers/infiniband/core/addr.c:503 rdma_resolve_ip_route() warn: variable dereferenced before check 'src_addr' (see line 500) drivers/infiniband/core/cma_configfs.c:172 make_cma_ports()

Re: [PATCH for-next 2/3] IB/core: Change per-entry lock in RoCE GID table to one lock

2015-12-29 Thread Or Gerlitz
On 10/28/2015 4:52 PM, Matan Barak wrote: @@ -134,16 +138,14 @@ static int write_gid(struct ib_device *ib_dev, u8 port, { int ret = 0; struct net_device *old_net_dev; - unsigned long flags; /* in rdma_cap_roce_gid_table, this funciton should be protected by a

Re: [PATCH] IB/core: sysfs.c: Fix PerfMgt ClassPortInfo handling

2015-12-29 Thread Matan Barak
On Mon, Dec 28, 2015 at 11:53 PM, Hal Rosenstock wrote: > > Port number is not part of ClassPortInfo attribute but is > still needed as a parameter when invoking process_mad. > > To properly handle this attribute, port_num is added as a > parameter to get_counter_table

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-29 Thread Christoph Hellwig
Please just convert the mad handler to the new CQ API in drivers/infiniband/core/cq.c. If you have any question about it I'd be glad to help you. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [RFC] Generic InfiniBand transport done in software

2015-12-29 Thread Christoph Hellwig
Hi Moni, On Sun, Dec 27, 2015 at 07:54:46PM +0200, Moni Shoua wrote: > But you post *now* a so called generic driver so it must now fit any > possible driver (including Soft RoCE) it's never going to fit any possible future driver. Dennis and folks have done great work to move code outside the

Re: completion queue abstraction V2

2015-12-29 Thread Bart Van Assche
On 12/07/2015 09:51 PM, Christoph Hellwig wrote: This series adds a new RDMA core abstraction that insulated the ULPs from the nitty gritty details of CQ polling. See the individual patches for more details. Hello Christoph, After having tested the SRP initiator and target drivers with this

Re: [PATCH] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Sagi Grimberg
Does this deserve a Fixes tag? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages()

2015-12-29 Thread Sagi Grimberg
Thanks Bart, Acked-by: Sagi Grimberg -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2] IB/core: sysfs.c: Fix PerfMgt ClassPortInfo handling

2015-12-29 Thread Hal Rosenstock
On 12/29/2015 7:21 AM, Or Gerlitz wrote: > On 12/29/2015 12:43 PM, Hal Rosenstock wrote: >> This handles issue pointed out by Matan Barak >> >> Fixes: 145d9c541032 ('IB/core: Display extended counter set if >> available') >> >> Signed-off-by: Hal Rosenstock

Re: [PATCH for-next 6/7] IB/mlx4: Create and use another QP1 for RoCEv2

2015-12-29 Thread Or Gerlitz
On 12/29/2015 3:24 PM, Matan Barak wrote: The mlx4 driver uses a special QP to implement the GSI QP. This kind of QP allows to build the InfiniBand headers in SW to be put before the payload that comes in with the WR. The mlx4 HW builds the packet, calculates the ICRC and puts it at the end of

Re: [PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages()

2015-12-29 Thread Leon Romanovsky
On Tue, Dec 29, 2015 at 10:45:03AM +0100, Bart Van Assche wrote: > Detected this by building the IB core with W=1. See also patch > "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a). Reviewed-by: Leon Romanovsky > > Signed-off-by: Bart Van Assche

Re: [RFC] Generic InfiniBand transport done in software

2015-12-29 Thread Moni Shoua
> it's never going to fit any possible future driver. Dennis and folks > have done great work to move code outside the drivers into a shared > library. So far it's been driven just by the Intel drivers as that's > the only thing they were interested in. > If it's not going to be a solution for

Re: [PATCH v2 00/36] Add rdma verbs transport library

2015-12-29 Thread Moni Shoua
> Changes since v1: > Removed driver specific version > Fixed license text to remove copyright and put on top > Return 0 in rvt_map_sg instead of BAD_DMA_AGGRESS > Remove #include of dma.h from dma.c > Update comment about protection domain limit > Remove comment on alternative design for private

Re: [PATCH 03/13] irq_poll: fold irq_poll_sched_prep into irq_poll_sched

2015-12-29 Thread Bart Van Assche
On 12/07/2015 09:51 PM, Christoph Hellwig wrote: diff --git a/lib/irq_poll.c b/lib/irq_poll.c index 88af879..13cb149 100644 --- a/lib/irq_poll.c +++ b/lib/irq_poll.c @@ -21,13 +21,17 @@ static DEFINE_PER_CPU(struct list_head, blk_cpu_iopoll); * * Description: * Add this irq_poll

[PATCH for-next 1/7] IB/mlx4: Query RoCE support

2015-12-29 Thread Matan Barak
From: Moni Shoua Query the RoCE support from firmware using the appropriate firmware commands. Downstream patches will read these capabilities and act accordingly. Signed-off-by: Moni Shoua --- drivers/net/ethernet/mellanox/mlx4/fw.c | 3 +++

[PATCH for-next 2/7] IB/mlx4: Add RoCE per GID support for add_gid and del_gid

2015-12-29 Thread Matan Barak
In RoCE, GID table is managed in the IB core driver. The role of the mlx4 driver is to synchronize the HW with the entries in the GID table. Since it is possible that the same GID value will appear more than once in the GID table (though with different attributes) it is required from the mlx4

[PATCH for-next 7/7] IB/mlx4: Advertise RoCE support

2015-12-29 Thread Matan Barak
Advertise RoCE support in port_immutable according to the hardware capabilities. This enables the verbs stack to use RoCE v2 mode. Signed-off-by: Matan Barak --- drivers/infiniband/hw/mlx4/main.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

[PATCH for-next 0/7] Add RoCE v2 support for mlx4 driver

2015-12-29 Thread Matan Barak
Hi Doug, This series adds RoCE v2 support for mlx4 driver. It implements the required bits in the new RoCE v2 API while adding the necessary firmware commands and handling. Patch 0001 queries the firmware if RoCE is supported. Patch 0002 introduces a new firmware command that sets the GID table,

Re: [PATCH 08/13] IB/srpt: chain RDMA READ/WRITE requests

2015-12-29 Thread Bart Van Assche
On 12/07/2015 09:51 PM, Christoph Hellwig wrote: > Remove struct rdma_iu and instead allocate the struct ib_rdma_wr array > early and fill out directly. This allows us to chain the WRs, and thus > archive both less lock contention on the HCA workqueue as well as much > simpler error handling.

Re: [PATCH v2] IB/core: sysfs.c: Fix PerfMgt ClassPortInfo handling

2015-12-29 Thread Or Gerlitz
On 12/29/2015 12:43 PM, Hal Rosenstock wrote: Port number is not part of ClassPortInfo attribute but is still needed as a parameter when invoking process_mad. Please remove the blank line above your 1st sentence. To properly handle this attribute, port_num is added as a parameter to

[PATCH V2] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Leon Romanovsky
From: Leon Romanovsky The create_cq() can receive creation flags which were used differently by two commits which added create_cq extended command and cross-channel. The merged code caused to not accept any flags at all. This patch unifies the check into one function and

Re: [PATCH V2] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Leon Romanovsky
On Tue, Dec 29, 2015 at 04:03:41PM +0200, Leon Romanovsky wrote: > On Tue, Dec 29, 2015 at 03:51:47PM +0200, Sagi Grimberg wrote: > > >From: Leon Romanovsky > > > > > >The create_cq() can receive creation flags which were used > > >differently by two following commits [1] and

[PATCH] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Leon Romanovsky
From: Leon Romanovsky The create_cq() can receive creation flags which were used differently by two following commits [1] and [2]. This patch unifies the check into one function and one return error code. [1] commit 972ecb821379 ("IB/mlx5: Add create_cq extended command")

[PATCH V2] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Leon Romanovsky
From: Leon Romanovsky The create_cq() can receive creation flags which were used differently by two following commits [1] and [2]. The current code caused to not accept any flags at all. This patch unifies the check into one function and one return error code. Fixes:

Re: [PATCH for-next 4/7] net/mlx4_core: Add handlning of RoCE v2 over IPV4 in attach_flow

2015-12-29 Thread Or Gerlitz
On 12/29/2015 3:24 PM, Matan Barak wrote: From: Maor Gottlieb s/handlning/handling/ When attaching multicast for RoCE v2, we need to be able to steer packets to the QPs. Hence, we add support for IPV4 over IB steering. not sure to follow on the change-log, can you

[PATCH V3] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Leon Romanovsky
From: Leon Romanovsky The create_cq() can receive creation flags which were used differently by two commits which added create_cq extended command and cross-channel. The merged code caused to not accept any flags at all. This patch unifies the check into one function and

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-29 Thread Sagi Grimberg
Please just convert the mad handler to the new CQ API in drivers/infiniband/core/cq.c. If you have any question about it I'd be glad to help you. +1 on this suggestion. We had these sorts of questions in our ULPs as well. The CQ API should take care of all that for you and leaves you to

[PATCH] IB/core: Remove a set-but-not-used variable from ib_sg_to_pages()

2015-12-29 Thread Bart Van Assche
Detected this by building the IB core with W=1. See also patch "IB core: Fix ib_sg_to_pages()" (commit 8f5ba10ed40a). Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Christoph Hellwig --- drivers/infiniband/core/verbs.c | 3 +--

[PATCH v2] IB/core: sysfs.c: Fix PerfMgt ClassPortInfo handling

2015-12-29 Thread Hal Rosenstock
Port number is not part of ClassPortInfo attribute but is still needed as a parameter when invoking process_mad. To properly handle this attribute, port_num is added as a parameter to get_counter_table and get_perf_mad was changed not to store port_num in the attribute itself when it's querying

Re: [PATCH 3/6] IB/uapi: expose uverbs WC opcodes

2015-12-29 Thread Sagi Grimberg
+ IB_WC_SEND = IB_UVERBS_WC_SEND, + IB_WC_RDMA_WRITE= IB_UVERBS_WC_RDMA_WRITE, + IB_WC_RDMA_READ = IB_UVERBS_WC_RDMA_READ, + IB_WC_COMP_SWAP = IB_UVERBS_WC_COMP_SWAP, + IB_WC_FETCH_ADD = IB_UVERBS_WC_FETCH_ADD, +

Re: [PATCH 4/6] IB/uapi: expose uverbs WC flags

2015-12-29 Thread Sagi Grimberg
+enum ib_uverbs_wc_flags { + IB_UVERBS_WC_GRH= (1 << 0), + IB_UVERBS_WC_WITH_IMM = (1 << 1), + IB_UVERBS_WC_WITH_INVALIDATE= (1 << 2), + IB_UVERBS_WC_IP_CSUM_OK = (1 << 3), +

[PATCH for-next 3/7] IB/mlx4: Configure device to work in RoCEv2

2015-12-29 Thread Matan Barak
From: Moni Shoua Some mlx4 adapters are RoCEv2 capable. To enable this feature some hardware configuration is required. This is 1. Set port general parameters 2. Configure the outgoing UDP destination port 3. Configure the QP that work with RoCEv2 Signed-off-by: Moni Shoua

[PATCH for-next 4/7] net/mlx4_core: Add handlning of RoCE v2 over IPV4 in attach_flow

2015-12-29 Thread Matan Barak
From: Maor Gottlieb When attaching multicast for RoCE v2, we need to be able to steer packets to the QPs. Hence, we add support for IPV4 over IB steering. Signed-off-by: Maor Gottlieb --- drivers/net/ethernet/mellanox/mlx4/mcg.c | 14 --

[PATCH for-next 5/7] IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers

2015-12-29 Thread Matan Barak
From: Moni Shoua RoCEv2 packets are sent over IP/UDP protocols. The mlx4 driver uses a type of RAW QP to send packets for QP1 and therefore needs to build the network headers below BTH in software. This patche adds option to build QP1 packets with IP and UDP headers if

[PATCH for-next 6/7] IB/mlx4: Create and use another QP1 for RoCEv2

2015-12-29 Thread Matan Barak
From: Moni Shoua The mlx4 driver uses a special QP to implement the GSI QP. This kind of QP allows to build the InfiniBand headers in SW to be put before the payload that comes in with the WR. The mlx4 HW builds the packet, calculates the ICRC and puts it at the end of the

Re: [PATCH V2] IB/mlx5: Unify CQ create flags check

2015-12-29 Thread Leon Romanovsky
On Tue, Dec 29, 2015 at 03:51:47PM +0200, Sagi Grimberg wrote: > >From: Leon Romanovsky > > > >The create_cq() can receive creation flags which were used > >differently by two following commits [1] and [2]. The current > >code caused to not accept any flags at all. > > We

Re: [RFC] Generic InfiniBand transport done in software

2015-12-29 Thread Moni Shoua
> No. PIO and SDMA is driver specific and lives in the driver. Rdmavt has no > concept of this. I'm agreeing that the send will be generic and have no hw > specific stuff. > I understand that PIO/SDMA are not a concept of RVT. However, making the send from RVT to driver exactly as the interface

Re: [PATCH for-next 3/7] IB/mlx4: Configure device to work in RoCEv2

2015-12-29 Thread Or Gerlitz
On 12/29/2015 3:24 PM, Matan Barak wrote: From: Moni Shoua Some mlx4 adapters are RoCEv2 capable. To enable this feature some hardware configuration is required. This is 1. Set port general parameters 2. Configure the outgoing UDP destination port 3. Configure the QP that