Re: [PATCH for-next 9/9] Samples: Peer memory client example

2014-10-01 Thread Jason Gunthorpe
On Wed, Oct 01, 2014 at 05:16:12PM +, Hefty, Sean wrote: > > Adds an example of a peer memory client which implements the peer memory > > API as defined under include/rdma/peer_mem.h. > > It uses the HOST memory functionality to implement the APIs and > > can be a good reference for peer memory

Re: [PATCH for-next 4/9] IB/core: Infrastructure to manage peer core context

2014-10-01 Thread Yann Droneaud
Le mercredi 01 octobre 2014 à 18:18 +0300, Yishai Hadas a écrit : > Adds an infrastructure to manage core context for a given umem, > it's needed for the invalidation flow. > > Core context is supplied to peer clients as some opaque data for a given > memory pages represented by a umem. > > If t

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-10-01 Thread Christoph Hellwig
On Wed, Oct 01, 2014 at 10:54:28AM -0600, Jens Axboe wrote: > Lets get rid of the blk_mq_tag struct and just have it be an u32 or > something. We could potentially typedef it, but I'd prefer to just have it > be an unsigned 32-bit int. Agreed. -- To unsubscribe from this list: send the line "unsub

RE: [PATCH for-next 9/9] Samples: Peer memory client example

2014-10-01 Thread Hefty, Sean
> Adds an example of a peer memory client which implements the peer memory > API as defined under include/rdma/peer_mem.h. > It uses the HOST memory functionality to implement the APIs and > can be a good reference for peer memory client writers. Is there a real user of these changes? -- To unsubs

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-10-01 Thread Jens Axboe
On 2014-10-01 10:08, Bart Van Assche wrote: On 09/19/14 17:38, Jens Axboe wrote: ctx was meant to be private, unfortunately it's leaked a bit into other parts of block/. But it's still private within that, at least. Lets not add more stuff to struct request, it's already way too large. We could

Re: [PATCH for-next 5/9] IB/core: Invalidation support for peer memory

2014-10-01 Thread Yann Droneaud
Le mercredi 01 octobre 2014 à 18:18 +0300, Yishai Hadas a écrit : > Adds the required functionality to invalidate a given peer > memory represented by some core context. > > Each umem that was built over peer memory and supports invalidation has > some invalidation context assigned to it with the

Re: [PATCH for-next 1/9] IB/core: Introduce peer client interface

2014-10-01 Thread Bart Van Assche
On 10/01/14 17:18, Yishai Hadas wrote: +static int num_registered_peers; Is the only purpose of this variable to check whether or not peer_memory_list is empty ? In that case please drop this variable and use list_empty() instead. +static int ib_invalidate_peer_memory(void *reg_handle, voi

[PATCH RFC] scsi_tcq.h: Add support for multiple hardware queues

2014-10-01 Thread Bart Van Assche
The eight patches I had posted so far did not modify the tag lookup functions in include/scsi/scsi_tcq.h. However, these functions have to be modified in order to become usable in SCSI LLDs that support multiple hardware queues. How about the patch below, which adds support for multiqueue tag looku

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-10-01 Thread Bart Van Assche
On 09/19/14 17:38, Jens Axboe wrote: > ctx was meant to be private, unfortunately it's leaked a bit into other > parts of block/. But it's still private within that, at least. > > Lets not add more stuff to struct request, it's already way too large. > We could add an exported > > struct blk_mq_h

[PATCH for-next 1/9] IB/core: Introduce peer client interface

2014-10-01 Thread Yishai Hadas
Introduces an API between IB core to peer memory clients,(e.g. GPU cards) to provide access for the HCA to read/write GPU memory. As a result it allows RDMA-based application to use GPU computing power, and RDMA interconnect at the same time w/o copying the data between the P2P devices. Each pee

[PATCH for-next 0/9] Peer-Direct support

2014-10-01 Thread Yishai Hadas
The following set of patches implements Peer-Direct support over RDMA stack. Peer-Direct technology allows RDMA operations to directly target memory in external hardware devices, such as GPU cards, SSD based storage, dedicated ASIC accelerators, etc. This technology allows RDMA-based (ove

[PATCH for-next 5/9] IB/core: Invalidation support for peer memory

2014-10-01 Thread Yishai Hadas
Adds the required functionality to invalidate a given peer memory represented by some core context. Each umem that was built over peer memory and supports invalidation has some invalidation context assigned to it with the required data to manage, once peer will call the invalidation callback below

[PATCH for-next 8/9] IB/mlx5: Invalidation support for MR over peer memory

2014-10-01 Thread Yishai Hadas
Adds the required functionality to work with peer memory clients which require invalidation support. It includes: - umem invalidation callback - once called should free any HW resources assigned to that umem, then free peer resources corresponding to that umem. - The MR object relates to that

[PATCH for-next 2/9] IB/core: Get/put peer memory client

2014-10-01 Thread Yishai Hadas
Supplies an API to get/put a peer client functionality. It encapsulates the details of how to acquire/release a peer client from its callers and let them get the required peer client in case it exists. The 'get' call iterates over registered peer clients looking for an owner of a given address ran

[PATCH for-next 4/9] IB/core: Infrastructure to manage peer core context

2014-10-01 Thread Yishai Hadas
Adds an infrastructure to manage core context for a given umem, it's needed for the invalidation flow. Core context is supplied to peer clients as some opaque data for a given memory pages represented by a umem. If the peer client needs to invalidate memory it provided through the peer memory ca

[PATCH for-next 6/9] IB/core: Sysfs support for peer memory

2014-10-01 Thread Yishai Hadas
Supplies the required functionality to expose information and statistics over sysfs for a given peer memory client. This mechanism enables userspace application to check which peers are available (based on name & version) and based on that decides whether it can run successfully. Root sysfs direc

[PATCH for-next 9/9] Samples: Peer memory client example

2014-10-01 Thread Yishai Hadas
Adds an example of a peer memory client which implements the peer memory API as defined under include/rdma/peer_mem.h. It uses the HOST memory functionality to implement the APIs and can be a good reference for peer memory client writers. Usage: - It's built as a kernel module. - The sample peer m

[PATCH for-next 3/9] IB/core: Umem tunneling peer memory APIs

2014-10-01 Thread Yishai Hadas
Builds umem over peer memory client functionality. It tries getting a peer client for a given address range, in case found further memory calls are tunneled to that peer client. ib_umem_get was extended to have an indication whether this umem can be part of a peer client. As a result, usage of ib_u

[PATCH for-next 7/9] IB/mlx4: Invalidation support for MR over peer memory

2014-10-01 Thread Yishai Hadas
Adds the required functionality to work with peer memory clients which require invalidation support. It includes: - umem invalidation callback - once called should free any HW resources assigned to that umem, then free peer resources corresponding to that umem. - The MR object relates to that

Re: ib_ipoib: CSUM support in connected mode

2014-10-01 Thread Or Gerlitz
On 10/1/2014 2:55 PM, Yuval Shaia wrote: On transmit checksum calculation is done while copying buffer from user-space so not much benefit but this copying can go away, right? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.ke

[PATCH libibverbs 7/9] ibv_cmd_create_flow(): explicitly clear fields

2014-10-01 Thread Yann Droneaud
There's no need to clear the whole struct ibv_create_flow + struct ibv_kern_spec with memset(). This patch removes call to memset(), adds explicit initialization for reserved fields, set comp_mask explicitly Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: 389de6a6ef4e (

[PATCH libibverbs 0/9] Proper fields initializations

2014-10-01 Thread Yann Droneaud
Hi, Following discussions in '[PATCH for-next 1/2] IB/uverbs: Add QP creation flags, allow blocking UD multicast loopback' thread[1], I've reviewed libibverbs and how it's handling "reserved" fields. I have identified portion of data structures not initialized but sent to the kernel. That means

[PATCH libibverbs 5/9] kern-abi: remove unused qp_type union in struct ibv_kern_send_wr

2014-10-01 Thread Yann Droneaud
Added by commit c7e3e61052dd ('Add support for XRC QPs') in struct ibv_kern_send_wr, qp_type union is not initialized in ibv_cmd_post_send(). Additionnaly, as reported by pahole, this field introduces padding in the end of struct ibv_kern_send_wr: struct ibv_kern_send_wr { /* ...

[PATCH libibverbs 9/9] ibv_cmd_destroy_flow(): initialize comp_mask explicitly

2014-10-01 Thread Yann Droneaud
There's no need to clear the whole struct ibv_destroy_flow with memset(): only comp_mask field is not explicitly initialized in the function. This patch removes call to memset() and initialize comp_mask to 0. Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: 389de6a6ef4e

[PATCH libibverbs 8/9] ibv_cmd_create_flow(): initialize flow_id->comp_mask

2014-10-01 Thread Yann Droneaud
ibv_cmd_create_flow() allocates and returns a struct ibv_flow, but doesn't initialize its comp_mask field. Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: 389de6a6ef4 ('Add receive flow steering support') Cc: Hadar Hen Zion Cc: Or Gerlitz Cc: Matan Barak Signed-off-by

[PATCH libibverbs 4/9] ibv_cmd_create_srq_ex(): set reserved field in struct ibv_create_xsrq

2014-10-01 Thread Yann Droneaud
Properly initialize data structure exchanged with kernel uverbs layer: - may remove valgrind spurious warnings; - may allow to use the field later for future expansion. Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: 40c1365b2198 ('Add support for XRC SRQs') Cc: Sean Hef

[PATCH libibverbs 2/9] ibv_cmd_post_recv(): initialize reserved field in struct ibv_kern_recv_wr

2014-10-01 Thread Yann Droneaud
Properly initialize data structure exchanged with kernel uverbs layer: - may remove valgrind spurious warnings; - may allow to use the field later for future expansion. Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: eb0663777c24 ('Add support for new datapath kernel com

[PATCH libibverbs 3/9] ibv_cmd_post_send(): initialize reserved field in struct ibv_kern_send_wr

2014-10-01 Thread Yann Droneaud
Properly initialize data structure exchanged with kernel uverbs layer: - may remove valgrind spurious warnings; - may allow to use the field later for future expansion. Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: eb0663777c24 ('Add support for new datapath kernel com

[PATCH libibverbs 1/9] ibv_cmd_create_ah(): initialize reserved fields in various structures

2014-10-01 Thread Yann Droneaud
Reserved fields in struct ibv_kern_global_route, struct ibv_kern_ah_attr and struct ibv_create_ah must be properly initialized when exchanged with kernel uverbs layer, as: - it may remove valgrind spurious warnings; - it may allow to use the field later for future expansion. Link: http://marc.info

[PATCH libibverbs 6/9] ibv_cmd_open_qp(): initialize reserved field in struct ibv_open_qp

2014-10-01 Thread Yann Droneaud
Properly initialize data structure exchanged with kernel uverbs layer: - may remove valgrind spurious warnings; - may allow to use the field later for future expansion. Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: 5f5292bbc51fb ('Add ibv_open_qp() for XRC receive QPs'

Re: ib_ipoib: CSUM support in connected mode

2014-10-01 Thread Yuval Shaia
On Sun, Sep 14, 2014 at 09:46:22PM +0300, Yuval Shaia wrote: > Hi, > Lately i was working on fixing an issue with IPoIB driver and i'd like to > share the > details with you. > > By default, IPoIB-CM driver uses 64k MTU. Larger MTU gives better performance. > This MTU plus overhead puts the memo

[PATCH for-next 20/21] IB/iser: Fix/add kernel-doc style description in iscsi_iser.c

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg This patch does not change any functionality Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.c | 169 -- 1 files changed, 160 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/ulp/i

[PATCH for-next 04/21] IB/iser: Extend iser_free_ib_conn_res

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Put all connection IB related resources release in this routine. One exception is the cm_id which cannot be destroyed as the routine is protected by the state mutex. Also move its position to avoid forward declaration. While at nit fix qp NULL assignment. Signed-off-by: Sagi

[PATCH for-next 16/21] IB/iser: Suppress scsi command send completions

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Singal completion of every 32 scsi commands and suppress all the rest. We don't do anything upon getting the completion so no need to "just consume" it, Cleanup of scsi command is done in cleanup_task callback. Still keep dataout and control send completions as we may need to

[PATCH for-next 12/21] IB/iser: Use internal polling budget to avoid possible live-lock

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg We need a way to guarentee that we don't stay in soft-IRQ context for too long. We might starve other pending CQ tasklets or worse lock against application trying to issue IO on the running CPU. Signed-off-by: Sagi Grimberg Signed-off-by: Roi Dayan Signed-off-by: Ariel Nahu

[PATCH for-next 14/21] IB/iser: Use beacon to indicate all completions were consumed

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Avoid post_send counting (atomic) in the IO path just to keep track of how many completions we need to consume. Use a beacon post to indicate that all prior posts completed. Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.h

[PATCH for-next 18/21] IB/iser: Nit - add space after __func__ in iser logging

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Change logging: "iser:" to "iser: " Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.h | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h

[PATCH for-next 10/21] IB/iser: Use iser_warn instead of BUG_ON in iser_conn_release

2014-10-01 Thread Or Gerlitz
From: Ariel Nahum In case iscsid was violently killed (SIGKILL) during its error recovery stage, we may never get a connection teardown sequence for some of the old connections. No harm done, but when we try to unload the module we will need to cleanup all these connections. So we actually may en

[PATCH for-next 07/21] IB/iser: Unbind at conn_stop stage

2014-10-01 Thread Or Gerlitz
From: Ariel Nahum Previously we didn't need to unbind the iser_conn and iscsi_conn since we always relied on iscsi daemon to teardown the connection and never let it finish before we cleanup all that is needed in iser. This is not the case anymore (for DEVICE_REMOVAL event). So avoid any possible

[PATCH for-next 13/21] IB/iser: Use single CQ for RX and TX

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg This will solve a possible condition where we might miss TX completion (flush error) during session teardown. Since we are using a single CQ, we don't need to actively drain the TX CQ, instead just wait for flush_completion (when counters reach zero) and remove iser_poll_for_f

[PATCH for-next 11/21] IB/iser: Centralize iser completion contexts

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Introduce iser_comp which centralizes all iser completion related items and is referenced by iser_device and each ib_conn. Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.h | 35 +--- drivers/infiniband/ulp/iser/iser_

[PATCH for-next 21/21] IB/iser: Bump version, add maintainer

2014-10-01 Thread Or Gerlitz
Update the driver version and add Sagi Grimberg as maintainer Signed-off-by: Or Gerlitz --- MAINTAINERS |1 + drivers/infiniband/ulp/iser/iscsi_iser.h |2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f8db3c

[PATCH for-next 19/21] IB/iser: Add/Fix kernel doc style descriptions in iscsi_iser.h

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg - iser_hdr - iser_data_buf - iser_mem_reg - iser_regd_buf - iser_tx_desc - iser_rx_desc - iser_device - iser_pi_context - iser_conn - ib_conn - iser_comp - iscsi_iser_task - iser_global While we're at it, change nit alignments in this file This patch does not change any func

[PATCH for-next 05/21] IB/iser: Fix DEVICE REMOVAL handling in the absence of iscsi daemon

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg iscsi daemon is in user-space, thus we can't rely on it to be invoke connection teardown (if not running or does not receive CPU time). This patch addresses the issue by re-structuring iSER connection teardown logic and CM events handling. The CM events will dictate the RDMA

[PATCH for-next 08/21] IB/iser: Protect tasks cleanup in case IB device was already released

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Bailout in case a task cleanup (iscsi_iser_cleanup_task) is called after the IB device was removed (DEVICE_REMOVAL CM event). We also call iscsi_conn_stop with a lock taken to prevent DEVICE_REMOVAL and tasks cleanup from racing. Signed-off-by: Sagi Grimberg Signed-off-by: A

[PATCH for-next 01/21] IB/iser: Rename ib_conn -> iser_conn

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Two reasons why we choose to do this: 1. No point today calling struct iser_conn by another name ib_conn 2. In the next patches we will restructure iser control plane representation - struct iser_conn: connection logical representation - struct ib_conn: connection RDMA l

[PATCH for-next 17/21] IB/iser: change iscsi_conn_stop log level to info

2014-10-01 Thread Or Gerlitz
From: Ariel Nahum Match to the debug level of all functions in connect/disconnect flows Signed-off-by: Ariel Nahum Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iscsi

[PATCH for-next 03/21] IB/iser: Remove unused variables and dead code

2014-10-01 Thread Or Gerlitz
From: Roi Dayan Signed-off-by: Roi Dayan Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.h |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscs

[PATCH for-next 02/21] IB/iser: Re-introduce ib_conn

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Structure that describes the RDMA relates connection objects. Static member of iser_conn. This patch does not change any functionality Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.c | 18 +- drivers/infiniband/ulp

[PATCH for-next 06/21] IB/iser: Don't bound release_work completions timeouts

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg We no longer rely on iscsi connection teardown sequence, so no need to give a grace period and continue cleanup if it expired. Have iser_conn_release wait for full completion before freeing iser_conn. ib_completion: Guaranteed to come when: - Got DISCONNEC

[PATCH for-next 15/21] IB/iser: Optimize completion polling

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Poll in batch of 16. Since we don't want it on the stack, keep under iser completion context (iser_comp). Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz --- drivers/infiniband/ulp/iser/iscsi_iser.h |4 drivers/infiniband/ulp/iser/iser_verbs.c | 12 ++

[PATCH for-next 09/21] IB/iser: Signal iSCSI layer that transport is broken in error completions

2014-10-01 Thread Or Gerlitz
From: Sagi Grimberg Previously we notified iscsi layer about the connection layer when we consumed all of our flush errors. This was racy as there was no guarentee that iscsi_conn wasn't terminated by then (which ends up in an invalid memory access). In case we got a non FLUSH error completion, w

[PATCH for-next 00/21] iSER initiator updates for 3.18

2014-10-01 Thread Or Gerlitz
Hi Roland, This series from Sagi, Ariel and Roi consists of: - Last batch of iser control plane stability fixes (patches 1-10) Mainly in the area of combinations of multi-connections concurrent establishment and/or teardown and/or device removal and/or iscsid killed. - Various performa