Re: [PATCH 13/15] IB/srpt: Detect session shutdown reliably

2016-01-06 Thread Christoph Hellwig
On Wed, Jan 06, 2016 at 03:46:34PM +0100, Bart Van Assche wrote: > I will make the patch description more detailed. Sorry if some of this code > is hard to follow but that's because of the high level of concurrency in > the SRP target driver. Some time ago I documented how session management in

Re: [PATCH 04/15] IB/srpt: Introduce target_reverse_dma_direction()

2016-01-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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 05/15] IB/srpt: Use scsilun_to_int()

2016-01-05 Thread Christoph Hellwig
...@sandisk.com> > Cc: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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 06/15] IB/srpt: Simplify srpt_handle_tsk_mgmt()

2016-01-05 Thread Christoph Hellwig
On Tue, Jan 05, 2016 at 03:23:14PM +0100, Bart Van Assche wrote: > Let the target core check task existence instead of the SRP target > driver. Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH 01/15] IB/srpt: Add parentheses around sizeof argument

2016-01-05 Thread Christoph Hellwig
unctionality. This patch has been generated by running the following > shell command: I don't really care about this formatting, but the patch looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in

Re: [PATCH 03/15] IB/srpt: Inline srpt_get_ch_state()

2016-01-05 Thread Christoph Hellwig
On Tue, Jan 05, 2016 at 03:21:53PM +0100, Bart Van Assche wrote: > The callers of srpt_get_ch_state() can access ch->state safely without > using locking. Hence inline this function. Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list

Re: [PATCH 11/15] IB/srpt: Fix how aborted commands are processed

2016-01-05 Thread Christoph Hellwig
> pr_debug("Aborting cmd with state %d and tag %lld\n", state, >ioctx->cmd.tag); > > @@ -1299,14 +1291,16 @@ static int srpt_abort_cmd(struct srpt_send_ioctx > *ioctx) > case SRPT_STATE_NEW: > case SRPT_STATE_DATA_IN: > case SRPT_STATE_MGMT: > + case

Re: [PATCH 09/15] IB/srpt: Fix srpt_close_session()

2016-01-05 Thread Christoph Hellwig
ion shutdown bugs. Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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 08/15] IB/srpt: Simplify srpt_shutdown_session()

2016-01-05 Thread Christoph Hellwig
ally, ensure that target_sess_cmd_list_set_waiting() is > called before target_wait_for_sess_cmds() by moving it into > srpt_release_channel_work(). Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> Mote that now most drivers return either always return 0 or 1 from shutdown_sessi

Re: [PATCH 10/15] IB/srpt: Fix srpt_handle_cmd() error paths

2016-01-05 Thread Christoph Hellwig
time ago with a modified srpt driver and forgot to send a similar fix.. Looks good: Reviewed-by: Christoph Hellwig <h...@lst.de> Minor nitpick below: > + send_ioctx->state = SRPT_STATE_DONE; > + target_put_sess_cmd(cmd); > + return; > } no need for that retur

Re: [PATCH 07/15] IB/srpt: Simplify channel state management

2016-01-05 Thread Christoph Hellwig
nto a single function. It would be great having a little comment in srpt_set_ch_state explaining why only changing to the numerical greater state is fine. Otherwise looks good: Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 12/15] IB/srpt: Eliminate srpt_find_channel()

2016-01-05 Thread Christoph Hellwig
fine, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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 10/11] IB: only keep a single key in struct ib_mr

2016-01-05 Thread Christoph Hellwig
On Tue, Jan 05, 2016 at 10:46:36AM -0700, Jason Gunthorpe wrote: > > ULPs are *already* using the same registrations for both local and > > remote access. > > Where? Out of tree? I haven't found anything in-tree for sure. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma"

[PATCH 2/2 v2] IB/mad: use CQ abstraction

2016-01-05 Thread Christoph Hellwig
Remove the local workqueue to process mad completions and use the CQ API instead. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Hal Rosenstock <h...@mellanox.com> Reviewed-by: Ira Weiny <ira.we...@intel.com> --- drivers/infiniband/cor

Re: [PATCH 2/2] IB/mad: use CQ abstraction

2016-01-05 Thread Christoph Hellwig
On Mon, Jan 04, 2016 at 07:04:03PM -0500, ira.weiny wrote: > Sorry I did not catch this before but rather than void * wouldn't it be better > to use struct ib_cqe? Sure, I'll fix it up. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to

Re: [PATCH 14/15] IB/srpt: Fix srpt_write_pending()

2016-01-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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 15/15] IB/srpt: Fix a rare crash in srpt_close_session()

2016-01-05 Thread Christoph Hellwig
> srpt_disconnect_ch(ch); > > + kref_put(>kref, srpt_free_ch); At some point it might be a good idea to have a srpt_put_ch helper to wrap this pattern. Otherwise looks good: Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the

Re: [PATCH 13/15] IB/srpt: Detect session shutdown reliably

2016-01-05 Thread Christoph Hellwig
+2369,7 @@ static void srpt_cm_dreq_recv(struct srpt_rdma_ch *ch) > static void srpt_cm_drep_recv(struct srpt_rdma_ch *ch) > { > pr_info("Received InfiniBand DREP message for cm_id %p.\n", ch->cm_id); > + srpt_close_ch(ch); > } Is there any good reson to kee

[PATCH 2/2] IB/mad: use CQ abstraction

2016-01-04 Thread Christoph Hellwig
Remove the local workqueue to process mad completions and use the CQ API instead. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/infiniband/core/mad.c | 159 + drivers/infiniband/core/mad_priv.h | 2 +- 2 files changed, 58 insertions(+

[PATCH 1/2] IB/mad: pass ib_mad_send_buf explicitly to the recv_handler

2016-01-04 Thread Christoph Hellwig
Stop abusing wr_id and just pass the parameter explicitly. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/infiniband/core/cm.c | 1 + drivers/infiniband/core/mad.c | 18 ++ drivers/infiniband/core/sa_query.c| 7 --- drivers/infiniban

Re: [PATCH 3/3] IB/srpt: Fix a race condition related to SRP login

2016-01-03 Thread Christoph Hellwig
On Thu, Dec 31, 2015 at 09:57:58AM +0100, Bart Van Assche wrote: > Since patch "IB/srpt: chain RDMA READ/WRITE requests" there are > two loops that process the command wait list. ch->cmd_wait_list > is accessed without locking which means that all code that > accesses this list must be serialized.

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

2016-01-02 Thread Christoph Hellwig
On Wed, Dec 30, 2015 at 09:00:07PM -0500, ira.weiny wrote: > On Wed, Dec 30, 2015 at 03:01:33AM -0800, Christoph Hellwig wrote: > > Hi Ira, > > > > please take a look at the patches I've attached - they are just WIP > > that hasn't been tested as I'm on a vacation

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

2015-12-30 Thread Christoph Hellwig
the mad_send_buf explicitily to mad handlers to get rid of that mess. Patch 3 is the CQ API conversion which becomes relatively simple once the prior issues above are sorted out. >From a22609131ca353278015b6b4aec3077db06ad9f5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig <h...@lst.de> Date: We

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

2015-12-30 Thread Christoph Hellwig
On Tue, Dec 29, 2015 at 10:58:24AM +0100, Bart Van Assche wrote: > 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 > > a

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

2015-12-30 Thread Christoph Hellwig
y had this bug earlier, fixed it and managed to get it back during a rebase, d'oh. Reviewed-by: Christoph Hellwig <h...@lst.de> Can you resend it with a proper signoff? -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...

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

2015-12-30 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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 3/6] IB/uapi: expose uverbs WC opcodes

2015-12-30 Thread Christoph Hellwig
On Tue, Dec 29, 2015 at 01:02:54PM +0200, Sagi Grimberg wrote: >> As you did it in the first patch, just don't assign after IB_WC_LOCAL_INV. >> Compiler will handle IB_UVERS_WC_SEND_END + X calculations by itself. > > I disagree, I'd say its better to keep the code verbosity level here... I

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: [PATCH V1 0/3] Add cross-channel support

2015-12-24 Thread Christoph Hellwig
On Thu, Dec 24, 2015 at 10:02:29AM +0200, Or Gerlitz wrote: > We had consensus among the reviewers that the 1st patch ("IB/core: Align > coding style of ib_device_cap_flags structure") is wrong cleanup which > basically is (1) unneeded (2) creates more damage (git blame and such, > non-applicable

Re: [PATCH v2 00/10] iSER support for remote invalidate

2015-12-24 Thread Christoph Hellwig
> Applied to target-pending/for-next as v4.5-rc1 material, along with > Reviewed-by tags from HCH. So this is both in your and Dougs now it seems. Given the non-trivial merge with the other RDMA updates I'd suggest to drop it from the target tree as Doug already sorted out the merge. -- To

Re: [PATCH rdma-next V2 00/32] Soft-RoCE driver

2015-12-24 Thread Christoph Hellwig
On Thu, Dec 24, 2015 at 11:17:46AM +0200, Kamal Heib wrote: > We've located the driver in the staging subtree. This follows a requirement > to implement an IB transport library - Soft RoCE is in the same boat like the > hfi1 > driver. We need to define and implement a lib to prevent those code >

Re: [PATCH rdma-next V2 00/32] Soft-RoCE driver

2015-12-24 Thread Christoph Hellwig
On Thu, Dec 24, 2015 at 02:58:10PM +0200, Or Gerlitz wrote: > On Thu, Dec 24, 2015 at 12:02 PM, Christoph Hellwig <h...@infradead.org> > wrote: > > On Thu, Dec 24, 2015 at 11:17:46AM +0200, Kamal Heib wrote: > >> We've located the driver in the staging subtree.

[PATCH 6/6] IB/uapi: expose device capability flags

2015-12-24 Thread Christoph Hellwig
Expose the device capability flags which can be queried through uverbs in the uapi headers. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/rdma/ib_verbs.h | 94 +++- include/uapi/rdma/ib_verbs.h | 66

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

2015-12-24 Thread Christoph Hellwig
This exposes the WC opcodes supported by uverbs as part of the uapi headers. It follows the same scheme as the WR opcodes. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/rdma/ib_verbs.h | 29 + include/uapi/rdma/ib_verbs.h | 16 +

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

2015-12-24 Thread Christoph Hellwig
This exposes the WC flags supported by uverbs as part of the uapi headers. It follows the same scheme as the WR opcodes. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/rdma/ib_verbs.h | 14 +++--- include/uapi/rdma/ib_verbs.h | 10 ++ 2 files chang

[PATCH 2/6] IB/uapi: expose uverbs send WR flags

2015-12-24 Thread Christoph Hellwig
This exposes the send WR flags supported by uverbs as part of the uapi headers. It follows the same scheme as the WR opcodes. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 +++--- include/rdma/ib_verbs.h | 14 ++ i

start moving user space visible constants to uapi headers

2015-12-24 Thread Christoph Hellwig
Currently very little of the uverbs user interface is actually exposed in uapi headers, and it's a constant struggle to figure out what's kernel internal and what is actually exposed in public. This series starts sorting this out by creating the infrastructure for a uapi header shared between

[PATCH 10/10] IB: remove the write-only usecnt field from struct ib_mr

2015-12-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Bart Van Assche <bvanass...@sandisk.com> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> --- drivers/infiniband/core/uverbs_cmd.c| 6 -- drivers/infiniband/core/verbs.c | 8 +--- drivers/i

[PATCH 05/10] cxgb3: simplify iwch_get_dma_wr

2015-12-23 Thread Christoph Hellwig
Fold simplified versions of build_phys_page_list and iwch_register_phys_mem into iwch_get_dma_wr now that no other callers are left. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianrese

[PATCH 04/10] IB: remove in-kernel support for memory windows

2015-12-23 Thread Christoph Hellwig
Remove the unused ib_allow_mw and ib_bind_mw functions, remove the unused IB_WR_BIND_MW and IB_WC_BIND_MW opcodes and move ib_dealloc_mw into the uverbs module. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Guntho

MR cleanups / dead code removal V2

2015-12-23 Thread Christoph Hellwig
Hi Doug, this series (on top of your k.o/for-4.5 branch) has various MR-related cleanups: starting to document the device capabilities, removing lots of dead MR/MW code and removing a useless field in struct ib_mr. This should be fairly uncontroversial I hope, so I'd like to get it in before

[PATCH 03/10] IB: remove support for phys MRs

2015-12-23 Thread Christoph Hellwig
We have stopped using phys MRs in the kernel a while ago, so let's remove all the cruft used to implement them. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] R

[PATCH 02/10] IB: remove ib_query_mr

2015-12-23 Thread Christoph Hellwig
This functionality has no users and was only supported by the staged out EHCA driver. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-

[PATCH 06/10] nes: simplify nes_reg_phys_mr calling conventions

2015-12-23 Thread Christoph Hellwig
Just pass and address/size pair instead of an ib_phys_buf array. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@opengridcomput

[PATCH 09/10] IB: remove the struct ib_phys_buf definition

2015-12-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@opengridcomputing.com> --- include/rdma/ib_verbs.h | 5 - 1 file chang

[PATCH 08/10] ehca: stop using struct ib_phys_buf

2015-12-23 Thread Christoph Hellwig
And simplify the calling convention for full-memory registrations. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@

[PATCH 07/10] amso1100: fold c2_reg_phys_mr into c2_get_dma_mr

2015-12-23 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@opengridcomputing.com> --- drivers/staging/rdma/ams

[PATCH] svc_rdma: use local_dma_lkey

2015-12-22 Thread Christoph Hellwig
We now alwasy have a per-PD local_dma_lkey available. Make use of that fact in svc_rdma and stop registering our own MR. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearc

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2015 at 11:17:54AM +0200, Sagi Grimberg wrote: > What makes me worried here is that the IB/RoCE specification really > defines different keys for local and remote access. I'm less concerned > about our consumers but more about our providers. We keep seeing new > providers come

Re: [PATCH 10/11] IB: only keep a single key in struct ib_mr

2015-12-22 Thread Christoph Hellwig
On Tue, Dec 22, 2015 at 03:50:12PM +0200, Sagi Grimberg wrote: > This is why I said that the problem here is not the ULPs. But if a new > HW comes along with distinction between rkeys and lkeys it will have a > problem. For example a HW allocates two different keys, rkey and lkey. > And, it

Re: [PATCH V1 1/3] IB/core: Align coding style of ib_device_cap_flags structure

2015-12-21 Thread Christoph Hellwig
On Mon, Dec 21, 2015 at 11:36:03AM -0500, ira.weiny wrote: > It would be nice if we were not having to do this for staging then. Also > perhaps it should be removed from checkpatch --strict? Don't use checkpatch --strict ever. It's full of weird items that defintively don't apply to the

Re: [PATCH V1 1/3] IB/core: Align coding style of ib_device_cap_flags structure

2015-12-21 Thread Christoph Hellwig
On Mon, Dec 21, 2015 at 08:37:26AM +0200, Leon Romanovsky wrote: > You are right and it is a preferred way for me too, however the > downside of such change will be one of two: > 1. Change this structure only => we will have style mix of BITs and > shifts in the same file. IMHO it looks awful. >

Re: [PATCH 09/10] IB: remove the struct ib_phys_buf definition

2015-12-20 Thread Christoph Hellwig
On Sun, Dec 20, 2015 at 09:37:38AM +0200, Or Gerlitz wrote: > On 12/18/2015 3:55 PM, Christoph Hellwig wrote: > >> Signed-off-by: Christoph Hellwig <h...@lst.de> >> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> >> Reviewed-by: Jason Gunthorpe <jguntho...@o

Re: [PATCH 10/10] IB: remove the unused usecnt field from struct ib_mr

2015-12-20 Thread Christoph Hellwig
On Fri, Dec 18, 2015 at 03:14:08PM +0100, Bart Van Assche wrote: > On 12/18/2015 02:55 PM, Christoph Hellwig wrote: >> Signed-off-by: Christoph Hellwig <h...@lst.de> > > Shouldn't the description of this patch be changed into something like > "Remove the usecnt field

[PATCH 03/10] IB: remove support for phys MRs

2015-12-18 Thread Christoph Hellwig
We have stopped using phys MRs in the kernel a while ago, so let's remove all the cruft used to implement them. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] R

[PATCH 04/10] IB: remove in-kernel support for memory windows

2015-12-18 Thread Christoph Hellwig
Remove the unused ib_allow_mw and ib_bind_mw functions, remove the unused IB_WR_BIND_MW and IB_WC_BIND_MW opcodes and move ib_dealloc_mw into the uverbs module. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Guntho

[PATCH 06/10] nes: simplify nes_reg_phys_mr calling conventions

2015-12-18 Thread Christoph Hellwig
Just pass and address/size pair instead of an ib_phys_buf array. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@opengridcomput

[PATCH 05/10] cxgb3: simplify iwch_get_dma_wr

2015-12-18 Thread Christoph Hellwig
Fold simplified versions of build_phys_page_list and iwch_register_phys_mem into iwch_get_dma_wr now that no other callers are left. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianrese

[PATCH 01/10] IB: start documenting device capabilities

2015-12-18 Thread Christoph Hellwig
Just IB_DEVICE_LOCAL_DMA_LKEY and IB_DEVICE_MEM_MGT_EXTENSIONS for now as I'm most familar with those. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-By: Jason Gunthorpe <jguntho...@obsidianresearch.com> --- include/rd

[PATCH 07/10] amso1100: fold c2_reg_phys_mr into c2_get_dma_mr

2015-12-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@opengridcomputing.com> --- drivers/staging/rdma/ams

[PATCH 08/10] ehca: stop using struct ib_phys_buf

2015-12-18 Thread Christoph Hellwig
And simplify the calling convention for full-memory registrations. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@

[PATCH 10/10] IB: remove the unused usecnt field from struct ib_mr

2015-12-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/infiniband/core/uverbs_cmd.c| 6 -- drivers/infiniband/core/verbs.c | 8 +--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 --- drivers/infiniband/hw/cxgb4/mem.c | 3 --- drivers/staging/rdm

[PATCH 09/10] IB: remove the struct ib_phys_buf definition

2015-12-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-by: Steve Wise <sw...@opengridcomputing.com> --- include/rdma/ib_verbs.h | 5 - 1 file chang

[PATCH] rds: use local_dma_lkey

2015-12-18 Thread Christoph Hellwig
We now alwasy have a per-PD local_dma_lkey available. Make use of that fact in rds and stop registering our own MR. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/staging/rdma/ehca/ehca_mrmw.c | 1 - net/rds/iw.c | 19 +-- net/rd

[PATCH 02/10] IB: remove ib_query_mr

2015-12-18 Thread Christoph Hellwig
This functionality has no users and was only supported by the staged out EHCA driver. Signed-off-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Sagi Grimberg <sa...@mellanox.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> [core] Reviewed-

MR cleanups

2015-12-18 Thread Christoph Hellwig
Hi Doug, this series (on top of your k.o/for-4.5 branch) has various MR-related cleanups: starting to document the device capabilities, removing lots of dead MR/MW code and removing a useless field in struct ib_mr. This should be fairly uncontroversial I hope, so I'd like to get it in before

Re: [PATCH 37/37] IB/rdmavt: Add support for new memory registration API

2015-12-17 Thread Christoph Hellwig
On Thu, Dec 17, 2015 at 10:52:29AM -0500, Dennis Dalessandro wrote: > I am not opposed to leaving the code in rdmavt. It gets removed from qib in > the other patch series I posted. My preference is to leave it in rdmavt > since it will be needed down the road. However I can go either way here, its

Re: [PATCH 07/15] i40iw: add hw and utils files

2015-12-17 Thread Christoph Hellwig
> +#ifndef UNREFERENCED_PARAMETER > +#define UNREFERENCED_PARAMETER(_p) \ > +{\ > + (_p) = (_p);\ > +} > +#endif No need for this, just remove it. > +#define I40E_MASK(mask, shift) (mask << shift) Please just opencode the shit, this

Re: [PATCH 08/15] i40iw: add files for iwarp interface

2015-12-17 Thread Christoph Hellwig
> + i40iw_next_iw_state(iwqp, I40IW_QP_STATE_ERROR, 0, 0, 0); > + > + if (!iwqp->user_mode) { > + if (iwqp->iwscq) > + i40iw_clean_cqes(iwqp, iwqp->iwscq); > + if ((iwqp->iwrcq) && (iwqp->iwrcq != iwqp->iwscq)) Please try to do a pass

Re: [PATCH rdma-next 0/6] dev attr cleanup (less is more)

2015-12-17 Thread Christoph Hellwig
on me. Please add my: Nacked-by: Christoph Hellwig <h...@lst.de> instead. -- 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 15/15] i40iw: changes for build of i40iw module

2015-12-16 Thread Christoph Hellwig
> --- a/include/uapi/rdma/rdma_netlink.h > +++ b/include/uapi/rdma/rdma_netlink.h > @@ -5,6 +5,7 @@ > > enum { > RDMA_NL_RDMA_CM = 1, > + RDMA_NL_I40IW, > RDMA_NL_NES, > RDMA_NL_C4IW, > RDMA_NL_LS, /* RDMA Local Services */ This changes the values for the

[PATCH] svc_rdma: use local_dma_lkey

2015-12-16 Thread Christoph Hellwig
We now alwasy have a per-PD local_dma_lkey available. Make use of that fact in svc_rdma and stop registering our own MR. Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/sunrpc/svc_rdma.h| 2 -- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 2 +- net/sunrpc/xp

small svc_rdma cleanup

2015-12-16 Thread Christoph Hellwig
This makes use of the now always available local_dma_lkey, and goes on top of Chuck's "[PATCH v4 00/11] NFS/RDMA server patches for v4.5" series. -- 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: [PATCH v3 04/11] xprtrdma: Move struct ib_send_wr off the stack

2015-12-16 Thread Christoph Hellwig
On Wed, Dec 16, 2015 at 10:06:33AM -0500, Chuck Lever wrote: > > Would it make sense to unionize these as they are guaranteed not to > > execute together? Some people don't like this sort of savings. > > I dislike unions because they make the code that uses > them less readable. I can define

Re: [PATCH v3 04/11] xprtrdma: Move struct ib_send_wr off the stack

2015-12-16 Thread Christoph Hellwig
On Wed, Dec 16, 2015 at 10:13:31AM -0500, Chuck Lever wrote: > > Shouldn't be an issue with transparent unions these days: > > > > union { > > struct ib_reg_wrfr_regwr; > > struct ib_send_wr fr_invwr; > > }; > > Right, but isn't that

Re: [PATCH 10/13] IB/srp: use the new CQ API

2015-12-12 Thread Christoph Hellwig
On Fri, Dec 11, 2015 at 12:59:01PM -0500, Doug Ledford wrote: > On 12/11/2015 09:22 AM, Christoph Hellwig wrote: > > Hi Bart, > > > > thanks for all the reviews. I've updated the git branch with your > > suggestions and reviewed-by tags. I'm going to wait a litt

Re: [PATCH 10/13] IB/srp: use the new CQ API

2015-12-11 Thread Christoph Hellwig
Hi Bart, thanks for all the reviews. I've updated the git branch with your suggestions and reviewed-by tags. I'm going to wait a little bit longer for other reviews to come in before reposting the series. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a

Re: [PATCH 07/13] IB: add a proper completion queue abstraction

2015-12-11 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:42:22AM -0800, Bart Van Assche wrote: >> +struct ib_cq *ib_alloc_cq(struct ib_device *dev, void *private, >> +int nr_cqe, int comp_vector, enum ib_poll_context poll_ctx) >> +{ > > [ ... ] >> +cq->wc = kmalloc_array(IB_POLL_BATCH, sizeof(*cq->wc),

Re: [PATCH 02/37] IB/rdmavt: Consolidate dma ops in rdmavt.

2015-12-11 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 11:02:02PM -0700, Jason Gunthorpe wrote: > > FYI, I have a patch series in linux-next to switches all remaining > > architectures to use get_dma_ops, and there are plans to allow generic > > per-device dma_ops based on that. > > Great, so once that is merged we can drop

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 12:46:54PM -0500, Doug Ledford wrote: > Organization. Let's be fair, the totally flat namespace you are > preferring is the equivalent of a teenager that is completely incapable > of picking thier dirty laundry up off the floor. It is sloppy, > disorganized, often full of

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 11:07:03AM -0700, Jason Gunthorpe wrote: > The ARM folks do this sort of stuff on a regular basis.. Very early on > Doug prepares a topic branch with only the big change, NFS folks pull > it and then pull your work. Then Doug would send the topic branch to > Linus as soon

Re: [PATCH 02/37] IB/rdmavt: Consolidate dma ops in rdmavt.

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:44:13AM -0700, Jason Gunthorpe wrote: > > the signature of the function in struct ib_dma_mapping_ops. > > It is supposed to be a dma_addr_t 'cookie' not a u64. > > A patch to cleanup the core in this area would be appreciated. I walked through the ib_dma_* mess in

Re: [PATCH 02/37] IB/rdmavt: Consolidate dma ops in rdmavt.

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 05:29:50PM -0700, Jason Gunthorpe wrote: > Hrm.. sizeof(void *) > sizeof(dma_addr_t) seemed pretty obscure to me, > here is the original discussion: > > https://lkml.org/lkml/2006/12/13/245 > > Sounds like someone was worried about sparc64. I doubt it is an actual > issue

Re: [PATCH v2 02/10] IB/iser: Reuse ib_sg_to_pages

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:28:59AM +0200, Sagi Grimberg wrote: > We can do that. We'd need to add ib_mr a list member just for fmr > routines. We'll also need that for a FR pool abstraction that would be very helpful. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the

Re: [PATCH 26/37] IB/rdmavt: Move memory registration into rdmavt

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:14:56AM -0500, Dennis Dalessandro wrote: > Why? Because, it exists in qib and hfi1. > > However, it seems no one is actually using this in the kernel these days and > the core support was removed in commit 1241d7bf. Yet the function pointer > still exists in struct

Re: [PATCH v2 02/10] IB/iser: Reuse ib_sg_to_pages

2015-12-09 Thread Christoph Hellwig
ct ib_fmr and make FRMs operate on struct ib_mr so that it can use ib_sg_to_pages directly. Signed-off-by: Christoph Hellwig <h...@lst.de> -- 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 a

Re: [PATCH v2 03/10] IB/iser: Don't register memory for all immediate data writes

2015-12-09 Thread Christoph Hellwig
The iser_reg_rdma_mem calling conventions seem rather confusing, and this patch doesn't help that. But I think that's something to be addressed in bigger cleanup later on. Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v2 04/10] IB/iser: set intuitive values for mr_valid

2015-12-09 Thread Christoph Hellwig
alues would be: > mr_valid=True, when memory registration is valid and > mr_valid=False otherwise. Might be worth to rename it to 'bool need_invalidate', but otherwise looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH v2 05/10] iser: Have initiator and target to share protocol structures and definitions

2015-12-09 Thread Christoph Hellwig
> -/* Constant PDU lengths calculations */ > -#define ISER_HEADERS_LEN (sizeof(struct iser_hdr) + sizeof(struct > iscsi_hdr)) > +/*Constant PDU lengths calculations */ Odd whitespace error. Otherwise looks fine: Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscr

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-09 Thread Christoph Hellwig
On Wed, Dec 09, 2015 at 01:13:29AM +0200, Or Gerlitz wrote: > > Christoph patch is here indeed, it does two things > > 1. remove all the ULP device attr alloc, device query, attr free hassle > 2. adds tons of new fields to struct ib_device > > I think it just goes too much and needlessly adds

Re: [RFC contig pages support 1/2] IB: Supports contiguous memory operations

2015-12-09 Thread Christoph Hellwig
On Wed, Dec 09, 2015 at 10:00:02AM +, Shachar Raindel wrote: > As far as gain is concerned, we are seeing gains in two cases here: > 1. If the system has lots of non-fragmented, free memory, you can create > large contig blocks that are above the CPU huge page size. > 2. If the system memory

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-09 Thread Christoph Hellwig
On Tue, Dec 08, 2015 at 07:52:03PM -0500, ira.weiny wrote: > Searching patchworks... > > I'm a bit worried about the size of the patch and I would like to see it split > up for review. But I agree Christophs method is better long term. I'd be happy to split it up if I could see a way to split

Re: [PATCH v2 07/10] iser-target: Declare correct flags when accepting a connection

2015-12-09 Thread Christoph Hellwig
explain what zero based virtual addresses means in this context? Does this means it uses the old RFC5046-style header without the read/write_va fields? Or does it mean those fields exist but must always be zero? I couldn't really find a good answer in Annex A12. Otherwise looks fine: Reviewed-by:

Re: [PATCH v2 08/10] iser-target: Support the remote invalidation exception

2015-12-09 Thread Christoph Hellwig
> + if (isert_conn->snd_w_inv) > + isert_info("Using remote invalidation\n"); Isn't this a little bit too chatty? Otherwise looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- To unsubscribe from this list: send the lin

Re: [PATCH v2 09/10] IB/iser: Increment the rkey when registering and not when invalidating

2015-12-09 Thread Christoph Hellwig
> Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> -- 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 contig pages support 1/2] IB: Supports contiguous memory operations

2015-12-08 Thread Christoph Hellwig
There is absolutely nothing IB specific here. If you want to support anonymous mmaps to allocate large contiguous pages work with the MM folks on providing that in a generic fashion. [full quote alert for reference:] On Tue, Dec 08, 2015 at 05:15:06PM +0200, Yishai Hadas wrote: > New structure

Re: [PATCH v2 0/2] Handle mlx4 max_sge_rd correctly

2015-12-08 Thread Christoph Hellwig
On Thu, Dec 03, 2015 at 05:07:35PM +0200, Sagi Grimberg wrote: > > >Did we ever make progress on this? > > Just up to Doug to pull it in. Doug, any chance to get this into the 4.4 queue? It's annoying having to work around this driver bug in every new ULP. -- To unsubscribe from this list:

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-08 Thread Christoph Hellwig
On Tue, Dec 08, 2015 at 03:59:40PM -0700, Jason Gunthorpe wrote: > Or, can we please stop this bikeshedding. Christoph's patch is done, > well tested and does a lot more clean up that this hacky three liner. > > It is a good patch, and although patchworks doesn't have my remarks > from an earlier

completion queue abstraction V2

2015-12-07 Thread Christoph Hellwig
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. Note that this series should be applied on top of my "IB: merge struct ib_device_attr into struct ib_device" patch and the MR cleanups.

  1   2   3   4   5   >