[PATCH] IB/mlx5: Remove dead code from alloc_cached_mr()

2015-07-27 Thread Roland Dreier
From: Roland Dreier rol...@purestorage.com

The only place that assigns mr inside the loop already does a break.
So if (mr) will never be true here since the function initializes mr
to NULL at the top.  We can just drop the extra if and break here.

Signed-off-by: Roland Dreier rol...@purestorage.com
---
 drivers/infiniband/hw/mlx5/mr.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index bc9a0de897cb..10d2b213a4d8 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -441,9 +441,6 @@ static struct mlx5_ib_mr *alloc_cached_mr(struct 
mlx5_ib_dev *dev, int order)
spin_unlock_irq(ent-lock);
 
queue_work(cache-wq, ent-work);
-
-   if (mr)
-   break;
}
 
if (!mr)
-- 
2.1.4

--
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: IBV_SEND_INLINE Behavior Differing from Spec

2015-07-05 Thread Roland Dreier
On Fri, Jul 3, 2015 at 2:50 PM, Christopher Mitchell
christop...@cemetech.net wrote:
 The manpage for ibv_post_send indicates that if you specify the
 IBV_SEND_INLINE flag, that you can immediately re-use the buffer after
 ibv_post_send() returns. However, I have found that if I modify the
 buffer immediately after ibv_post_send(), the changes are rarely
 reflected in the presumably already-posted message. I'm using
 ConnectX-3 cards and RC connections, if that's relevant. Is this a
 known issue, and/or is it possible I'm missing something obvious?

I can't see any way to get the behavior you're seeing.  What version
of libmlx4 are you using?

The reason I say I don't see how that can happen is that in
mlx4_post_send() in libmlx4, if IBV_SEND_INLINE is set, the code
memcpys the data into the descriptor and does not keep any reference
to the pointers passed in through the sg ilst.  So I don't see how the
hardware could even detect that you change the data after
ibv_post_send().

Or what do you mean about after ibv_post_send()?  Are you possibly
changing the data from another thread and racing with the memcpy
before ibv_post_send() returns?

 - R.
--
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: rdma kernel tree

2015-06-03 Thread Roland Dreier
 Also, how does this relate to Roland's infiniband tree
 (git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git#for-next)
 that is already in linux-next?

You can drop my tree, I'm no longer updating it.

 - R.
--
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


[PATCH 1/3] RDMA/ocrdma: Fix memory leak in _ocrdma_alloc_pd()

2015-05-30 Thread Roland Dreier
From: Roland Dreier rol...@purestorage.com

If ocrdma_get_pd_num() fails, then we need to free the pd struct we allocated.

This was detected by Coverity (CID 1271245).

Signed-off-by: Roland Dreier rol...@purestorage.com
---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c 
b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 9dcb66077d6c..fcb86749efc9 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -375,7 +375,12 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct 
ocrdma_dev *dev,
 
if (dev-pd_mgr-pd_prealloc_valid) {
status = ocrdma_get_pd_num(dev, pd);
-   return (status == 0) ? pd : ERR_PTR(status);
+   if (status == 0) {
+   return pd;
+   } else {
+   kfree(pd);
+   return ERR_PTR(status);
+   }
}
 
 retry:
-- 
2.1.4

--
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


[PATCH 2/3] IB/mlx4: Fix error paths in mlx4_ib_create_flow()

2015-05-30 Thread Roland Dreier
From: Roland Dreier rol...@purestorage.com

The unwinding clean up code are err_create_flow starts at the current
index i.  That means we shouldn't increment i until we're really sure
we won't have to destroy the current flow; otherwise we might
increment the index, fail inside an is_bonded block, and end up
accessing off the end of the reg_id[] array.

This was detected by Coverity (CID 1271229).

Signed-off-by: Roland Dreier rol...@purestorage.com
---
 drivers/infiniband/hw/mlx4/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/main.c 
b/drivers/infiniband/hw/mlx4/main.c
index cc64400d41ac..8191e176c5b7 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -1185,7 +1185,6 @@ static struct ib_flow *mlx4_ib_create_flow(struct ib_qp 
*qp,
mflow-reg_id[i].id);
if (err)
goto err_create_flow;
-   i++;
if (is_bonded) {
/* Application always sees one port so the mirror rule
 * must be on port #2
@@ -1200,6 +1199,7 @@ static struct ib_flow *mlx4_ib_create_flow(struct ib_qp 
*qp,
j++;
}
 
+   i++;
}
 
if (i  ARRAY_SIZE(type)  flow_attr-type == IB_FLOW_ATTR_NORMAL) {
@@ -1207,7 +1207,7 @@ static struct ib_flow *mlx4_ib_create_flow(struct ib_qp 
*qp,
   mflow-reg_id[i].id);
if (err)
goto err_create_flow;
-   i++;
+
if (is_bonded) {
flow_attr-port = 2;
err = mlx4_ib_tunnel_steer_add(qp, flow_attr,
@@ -1218,6 +1218,7 @@ static struct ib_flow *mlx4_ib_create_flow(struct ib_qp 
*qp,
j++;
}
/* function to create mirror rule */
+   i++;
}
 
return mflow-ibflow;
-- 
2.1.4

--
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


[PATCH 3/3] iser-target: Fix error path in isert_create_pi_ctx()

2015-05-30 Thread Roland Dreier
From: Roland Dreier rol...@purestorage.com

We don't assign pi_ctx to desc-pi_ctx until we're certain to succeed
in the function.  That means the cleanup path should use the local
pi_ctx variable, not desc-pi_ctx.

This was detected by Coverity (CID 1260062).

Signed-off-by: Roland Dreier rol...@purestorage.com
---
 drivers/infiniband/ulp/isert/ib_isert.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c 
b/drivers/infiniband/ulp/isert/ib_isert.c
index 327529ee85eb..3f40319a55da 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -547,11 +547,11 @@ isert_create_pi_ctx(struct fast_reg_descriptor *desc,
return 0;
 
 err_prot_mr:
-   ib_dereg_mr(desc-pi_ctx-prot_mr);
+   ib_dereg_mr(pi_ctx-prot_mr);
 err_prot_frpl:
-   ib_free_fast_reg_page_list(desc-pi_ctx-prot_frpl);
+   ib_free_fast_reg_page_list(pi_ctx-prot_frpl);
 err_pi_ctx:
-   kfree(desc-pi_ctx);
+   kfree(pi_ctx);
 
return ret;
 }
-- 
2.1.4

--
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: Stepping down as maintainer (was Re: [PATCH for-next 0/9] mlx4 changes in virtual GID management)

2015-04-22 Thread Roland Dreier
On Wed, Apr 22, 2015 at 7:43 AM, Doug Ledford dledf...@redhat.com wrote:
 New items since the last push:

 Jason's fix to the CMA for IPv4/IPv6 canonization
 Hariprasad's series to iw_cxgb4
 Tatyana's and Steve's series for iWARP portmapper address resolution

I just sent the previous batch, since it is late in the merge window
and I didn't want to send things immediately without giving
linux-next, 0-day builds etc a chance to catch problems.

I will pick these up and send to Linus around Friday.

 - R.
--
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


[GIT PULL] please pull infiniband.git

2015-04-22 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


InfiniBand/RDMA updates for 4.1:
 - IPoIB fixes from Doug Ledford and Erez Shitrit
 - iSER updates from Sagi Grimberg
 - mlx4 GUID handling changes from Yishai Hadas
 - other misc fixes


Bart Van Assche (1):
  IB/srp: Use P_Key cache for P_Key lookups

Doug Ledford (11):
  IB/ipoib: factor out ah flushing
  IB/ipoib: change init sequence ordering
  IB/ipoib: Consolidate rtnl_lock tasks in workqueue
  IB/ipoib: Make the carrier_on_task race aware
  IB/ipoib: Use dedicated workqueues per interface
  IB/ipoib: No longer use flush as a parameter
  IB/ipoib: fix MCAST_FLAG_BUSY usage
  IB/ipoib: deserialize multicast joins
  IB/ipoib: drop mcast_mutex usage
  ib_srpt: convert printk's to pr_* functions
  Merge branches 'cve-fixup', 'ipoib', 'iser', 'misc-4.1', 'or-mlx4' and 
'srp' into for-4.1

Erez Shitrit (6):
  IB/ipoib: Use one linear skb in RX flow
  IB/ipoib: Update broadcast record values after each successful join 
request
  IB/ipoib: Handle QP in SQE state
  IB/ipoib: Save only IPOIB_MAX_PATH_REC_QUEUE skb's
  IB/ipoib: Remove IPOIB_MCAST_RUN bit
  IB/mlx4: Fix WQE LSO segment calculation

Honggang LI (1):
  mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit 
architectures

Sagi Grimberg (18):
  IB/iser: Fix unload during ep_poll wrong dereference
  IB/iser: Handle fastreg/local_inv completion errors
  IB/iser: Fix wrong calculation of protection buffer length
  IB/iser: Remove redundant cmd_data_len calculation
  IB/iser: Remove a redundant struct iser_data_buf
  IB/iser: Don't pass ib_device to fall_to_bounce_buff routine
  IB/iser: Move memory reg/dereg routines to iser_memory.c
  IB/iser: Remove redundant assignments in iser_reg_page_vec
  IB/iser: Get rid of struct iser_rdma_regd
  IB/iser: Merge build page-vec into register page-vec
  IB/iser: Move fastreg descriptor pool get/put to helper functions
  IB/iser: Move PI context alloc/free to routines
  IB/iser: Make fastreg pool cache friendly
  IB/iser: Modify struct iser_mem_reg members
  IB/iser: Pass struct iser_mem_reg to iser_fast_reg_mr and iser_reg_sig_mr
  IB/iser: Remove code duplication for a single DMA entry
  IB/iser: Bump version to 1.6
  IB/iser: Rewrite bounce buffer code path

Sebastian Ott (1):
  infiniband/mlx4: check for mapping error

Selvin Xavier (1):
  MAINTAINERS: Adding list of maintainers for ocrdma

Stephen Hemminger (1):
  rdma: replace deprecated ifconfig in doc

Sébastien Dugué (1):
  ib_uverbs: Fix pages leak when using XRC SRQs

Yann Droneaud (2):
  IB/core: disallow registering 0-sized memory region
  IB/core: don't disallow registering region starting at 0x0

Yishai Hadas (9):
  IB/mlx4: Alias GUID adding persistency support
  net/mlx4_core: Manage alias GUID per VF
  net/mlx4_core: Set initial admin GUIDs for VFs
  IB/mlx4: Manage admin alias GUID upon admin request
  IB/mlx4: Change init flow to request alias GUIDs for active VFs
  IB/mlx4: Request alias GUID on demand
  net/mlx4_core: Raise slave shutdown event upon FLR
  net/mlx4_core: Return the admin alias GUID upon host view request
  IB/mlx4: Change alias guids default to be host assigned

 Documentation/filesystems/nfs/nfs-rdma.txt |   9 +-
 MAINTAINERS|   9 +
 drivers/infiniband/core/umem.c |   7 +-
 drivers/infiniband/core/uverbs_main.c  |  22 +-
 drivers/infiniband/hw/mlx4/alias_GUID.c| 457 +-
 drivers/infiniband/hw/mlx4/mad.c   |   9 +
 drivers/infiniband/hw/mlx4/main.c  |  26 +-
 drivers/infiniband/hw/mlx4/mlx4_ib.h   |  14 +-
 drivers/infiniband/hw/mlx4/qp.c|   7 +-
 drivers/infiniband/hw/mlx4/sysfs.c |  44 +-
 drivers/infiniband/ulp/ipoib/ipoib.h   |  31 +-
 drivers/infiniband/ulp/ipoib/ipoib_cm.c|  18 +-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c| 195 
 drivers/infiniband/ulp/ipoib/ipoib_main.c  |  73 ++-
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 520 ++--
 drivers/infiniband/ulp/ipoib/ipoib_verbs.c |  44 +-
 drivers/infiniband/ulp/iser/iscsi_iser.h   |  66 +--
 drivers/infiniband/ulp/iser/iser_initiator.c   |  66 ++-
 drivers/infiniband/ulp/iser/iser_memory.c  | 523 -
 drivers/infiniband/ulp/iser/iser_verbs.c   | 220 +++--
 drivers/infiniband/ulp/srp/ib_srp.c|   9 +-
 drivers/infiniband/ulp/srpt/ib_srpt.c  | 188 
 

Re: Stepping down as maintainer (was Re: [PATCH for-next 0/9] mlx4 changes in virtual GID management)

2015-04-17 Thread Roland Dreier
On Apr 11, 2015 12:28 PM, Or Gerlitz gerlitz...@gmail.com wrote:

 If taking off the maintainer hat would get you some free/spare cycles,
 maybe you could resume posting in the digitalvampire blog and/or
 participate in the upstreamming of soft-RoCE driver? some folks here
 are working on this, so if you're interested, let me know...

Thank you very much for the direction.  I'm OK figuring out what to do
for myself though.
--
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: Stepping down as maintainer (was Re: [PATCH for-next 0/9] mlx4 changes in virtual GID management)

2015-04-17 Thread Roland Dreier
On Fri, Apr 17, 2015 at 4:15 AM, Or Gerlitz gerlitz...@gmail.com wrote:
 Seems like Roland isn't around to carry the rdma pull request for 4.1 ...

Why do you ignore my emails (I see no reply to
http://www.spinics.net/lists/linux-rdma/msg24194.html) and jump to
this conclusion?

I will send a pull request for what is in Doug's tree (and also in my tree).
--
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 v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-16 Thread Roland Dreier
On Thu, Apr 16, 2015 at 9:44 AM, Jason Gunthorpe
jguntho...@obsidianresearch.com wrote:
 We can give client-add() callback a return value and make
 ib_register_device() return -ENOMEM when it failed, just wondering
 why we don't do this at first, any special reason?

 No idea, but having ib_register_device fail and unwind if a client
 fails to attach makes sense to me.

It seems a bit unfriendly to fail an entire device if one ULP has a
problem.  Let's say you have a system whose main network connection is
IPoIB.  Would you want that connection to come up even if, say, the
NFS/RDMA server fails to find the memory registration type it likes?

 - R.
--
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: Stepping down as maintainer (was Re: [PATCH for-next 0/9] mlx4 changes in virtual GID management)

2015-04-15 Thread Roland Dreier
On Wed, Apr 15, 2015 at 5:39 AM, Doug Ledford dledf...@redhat.com wrote:
 Regardless of what we end up doing long term, Roland is out at the moment, so 
 4.1 is happening more or less without him :-/

Sorry.  I am back at work now.

 I went ahead and put together a 4.1 branch and pulled the patches I thought 
 were ready.  That’s been pushed to my github.

Thanks, I will pick this up and put it in my kernel.org tree so we get
0-day testing to make sure everything builds etc.

 - R.
--
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: RDMA patches for 4.1 (was: Stepping down as maintainer (was Re: [PATCH for-next 0/9] mlx4 changes [...]))

2015-04-15 Thread Roland Dreier
On Wed, Apr 15, 2015 at 6:54 AM, Or Gerlitz ogerl...@mellanox.com wrote:
 There were two trivial conflicts between the mlx4 changes to another mlx4
 series which is present in net-next, I resolved them and you can pull the
 fixed series from my git tree,SB.

Not sure how you expect this to work.  It is a hassle for both
maintainers if you are sending conflicting patches to different trees.

Do you want some of the mlx4 changes to go via Dave's tree and some to
go via my/Doug's tree?  If so do you expect us to rebase onto Dave's
tree?  Because I don't want to do that when I either need to rebase
onto some random point of net-next or some random point of Linus's
tree in the middle of the merge window.

 - R.
--
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 for-next 0/9] mlx4 changes in virtual GID management

2015-04-05 Thread Roland Dreier
On Sat, Apr 4, 2015 at 10:15 PM, Or Gerlitz gerlitz...@gmail.com wrote:
 Indeed. No maintainer voice makes it kind of impossible for
 discussions to converge. What happens over the last years is that when
 there's no easy consensus on matter Y, everyone stops breathing and
 wait to see what happens on the rc1 night, b/c Roland doesn't spell
 his view/preference (nor exposes his for-next branch till the last
 minute, see now) many times it seems more as coin flipping.

To me this attitude shows a failure of the community.  If I need to
make every decision, then that doesn't scale.  People can ask
questions a lot more easily than I can answer them.

In general if a consensus emerges, I'm pretty likely to trust it.  In
particular, as Sean mentioned, I tend to trust vendors about low-level
drivers, although of course I sometimes catch mistakes even then.

But for changes that touch the core, when there's a disagreement, you
can't expect me to be the one who always solves it.  I might have an
opinion, but in a lot of cases, both sides might have a point and the
only way forward is to come up with a new idea that works for
everyone.  And I'm not smart enough to come up with that solution
every time.

 - R.
--
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: iser patches for kernel 4.1 [v2]

2015-04-02 Thread Roland Dreier
Thanks, applied 1-18.
--
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


[GIT PULL] please pull infiniband.git

2015-04-02 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


One 4.0 RDMA change:
 - Fix for exploitable integer overflow in uverbs interface.


Shachar Raindel (1):
  IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic

 drivers/infiniband/core/umem.c | 8 
 1 file changed, 8 insertions(+)
--
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: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-02 Thread Roland Dreier
On Thu, Apr 2, 2015 at 12:52 AM, Shachar Raindel rain...@mellanox.com wrote:
 This is a common practice in the security industry, called
 responsible disclosure.

 Following the kernel  security bugs policy [1], we reported it to
 the kernel security contacts few days before making the issue public.
 Few days after issue became public, we published a clear report to all
 of the relevant mailing lists.

Isn't the point of responsible disclosure to delay disclosure until a
fix is in place?  What's the point of sending a notification to the
kernel security team if you're going to disclose publicly before the
upstream kernel is fixed?

 - R.
--
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/srp: Add 64-bit LUN support

2015-04-02 Thread Roland Dreier
Thanks, applied at last.  I'm assuming the vscsi changes are OK since
they look mechanical and we haven't heard anything from IBM people.
--
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: CVE-2014-8159 kernel: infiniband: uverbs: unprotected physical memory access

2015-04-01 Thread Roland Dreier
On Wed, Mar 18, 2015 at 10:39 AM, Shachar Raindel rain...@mellanox.com wrote:
 Date: Sun, 04 Jan 2015 18:30:32 +0200
 Subject: [PATCH] IB/core: Prevent integer overflow in ib_umem_get address 
 arithmetic

Just so we're clear, this bug has been known since January 4, and it's
getting sent upstream now?

I assume we want it in 4.0 and -stable?
--
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 for-next 0/9] mlx4 changes in virtual GID management

2015-03-30 Thread Roland Dreier
 Roland, I have to genuinely agree with Or, that your handling of
 patch integration is sub-par and really painful for anyone actually
 trying to get real work done here.

 If you simply don't have the time to devote to constantly reviewing
 patches as they come in, and doing so in a timely manner, please let
 someone who is actually interested and has the time to take over.

It's a fair criticism, and certainly for at least the last year or so
I have not had the time to do enough work as a maintainer.  I have
hope that some of the things that have been keeping me busy are dying
down and that I'll have more time to spend on handling the RDMA tree,
but that's just talk until I actually get more done.

I really would like to get more people involved in handling the flow
of patches but I'm not sure who has not only the interest and the time
but also the judgement and expertise to take over.  Certainly Or has
been a long time contributor who has done a lot of great things, but I
still worry about things like ABI stability and backwards
compatibility.

But I'm open to ideas.

 - R.
--
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/qib: fix a do nothing for loop

2015-02-20 Thread Roland Dreier
On Fri, Feb 20, 2015 at 2:56 AM, Dan Carpenter dan.carpen...@oracle.com wrote:
 We accidentally deleted a semi-colon here and changed this do-nothing
 loop into a do-something loop.


Thanks!  I folded this into the original cleanup patch.
--
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


[GIT PULL] please pull infiniband.git

2015-02-20 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


InfiniBand/RDMA changes for 3.20 merge window:
 - Re-enable on-demand paging changes with stable ABI
 - Fairly large set of ocrdma HW driver fixes
 - Some qib HW driver fixes
 - Other miscellaneous changes


Andreea-Cristina Bernat (2):
  IB/qib: Replace rcu_assign_pointer() with RCU_INIT_POINTER() in qib_qp.c
  IB/qib: Replace rcu_assign_pointer() with RCU_INIT_POINTER() in qib_keys.c

Ariel Nahum (1):
  IB/iser: Release the iscsi endpoint if ep_disconnect wasn't called

Bart Van Assche (1):
  MAINTAINERS: Update SRP initiator entry

Dan Carpenter (2):
  IB/mlx5: Fix error code in get_port_caps()
  RDMA/ocrdma: Fix off by one in ocrdma_query_gid()

Devesh Sharma (4):
  RDMA/ocrdma: Report correct count of interrupt vectors while registering 
ocrdma device
  RDMA/ocrdma: Discontinue support of RDMA-READ-WITH-INVALIDATE
  RDMA/ocrdma: Honor return value of ocrdma_resolve_dmac
  RDMA/ocrdma: set vlan present bit for user AH

Eli Cohen (1):
  IB/core: Add support for extended query device caps

Haggai Eran (3):
  IB/core: Properly handle registration of on-demand paging MRs after dereg
  IB/core: Add on demand paging caps to ib_uverbs_ex_query_device
  IB/mlx5: Enable the ODP capability query verb

Hariprasad S (2):
  RDMA/cxgb4: Serialize CQ event upcalls with CQ destruction
  RDMA/cxgb4: Don't hang threads forever waiting on WR replies

Ilya Nelkenbaum (1):
  IB/core: When marshaling ucma path from user-space, clear unused fields

Jack Morgenstein (1):
  IB/mlx4: In mlx4_ib_demux_cm, print out GUID in host-endian order

Majd Dibbiny (3):
  IB/mlx4: Fix memory leak in __mlx4_ib_modify_qp
  IB/mlx4: Bug fixes in mlx4_ib_resize_cq
  IB/mlx5: Update the dev in reg_create

Mike Marciniszyn (3):
  IB/qib: Fix sizeof checkpatch warnings
  IB/qib: Fix checkpatch warnings
  IB/qib: Add blank line after declaration

Mitesh Ahuja (7):
  RDMA/ocrdma: Add support for IB stack compliant stats in sysfs.
  RDMA/ocrdma: Increase the GID table size.
  RDMA/ocrdma: Move PD resource management to driver.
  RDMA/ocrdma: Host crash on destroying device resources
  RDMA/ocrdma: Add support for interrupt moderation
  RDMA/ocrdma: remove reference of ocrdma_dev out of ocrdma_qp structure
  RDMA/ocrdma: Update the ocrdma module version string

Mitko Haralanov (1):
  IB/qib: Do not write EEPROM

Moshe Lazer (1):
  IB/core: Fix deadlock on uverbs modify_qp error flow

Or Gerlitz (1):
  IB/mlx4: Fix wrong usage of IPv4 protocol for multicast attach/detach

Padmanabh Ratnakar (1):
  RDMA/ocrdma: Report correct state in ibv_query_qp

Rasmus Villemoes (2):
  RDMA/ocrdma: Help gcc generate better code for ocrdma_srq_toggle_bit
  RDMA/ocrdma: Use unsigned for bit index

Rickard Strandqvist (1):
  IB/ipath: Remove unused function in ipath_wc_ppc64

Roi Dayan (1):
  IB/iser: Use correct dma direction when unmapping SGs

Roland Dreier (1):
  Merge branches 'core', 'cxgb4', 'iser', 'mlx4', 'mlx5', 'ocrdma', 'odp', 
'qib' and 'srp' into for-next

Sagi Grimberg (1):
  IB/iser: Fix memory regions possible leak

Selvin Xavier (2):
  RDMA/ocrdma: Debugfs enhancments for ocrdma driver
  RDMA/ocrdma: Allow expansion of the SQ CQEs via buddy CQ expansion of the 
QP

Vinit Agnihotri (1):
  IB/qib: Add support for the new QMH7360 card

 MAINTAINERS   |   2 +-
 drivers/infiniband/core/ucma.c|   3 +
 drivers/infiniband/core/umem_odp.c|   3 +-
 drivers/infiniband/core/uverbs.h  |   1 +
 drivers/infiniband/core/uverbs_cmd.c  | 158 +
 drivers/infiniband/core/uverbs_main.c |   1 +
 drivers/infiniband/hw/cxgb4/ev.c  |   9 +-
 drivers/infiniband/hw/cxgb4/iw_cxgb4.h|  29 ++-
 drivers/infiniband/hw/ipath/ipath_kernel.h|   3 -
 drivers/infiniband/hw/ipath/ipath_wc_ppc64.c  |  13 --
 drivers/infiniband/hw/ipath/ipath_wc_x86_64.c |  15 --
 drivers/infiniband/hw/mlx4/cm.c   |   2 +-
 drivers/infiniband/hw/mlx4/cq.c   |   7 +-
 drivers/infiniband/hw/mlx4/main.c |  10 +-
 drivers/infiniband/hw/mlx4/qp.c   |   6 +-
 drivers/infiniband/hw/mlx5/main.c |   4 +-
 drivers/infiniband/hw/mlx5/mr.c   |   1 +
 drivers/infiniband/hw/ocrdma/ocrdma.h |  38 +++-
 drivers/infiniband/hw/ocrdma/ocrdma_ah.c  |  38 +++-
 drivers/infiniband/hw/ocrdma/ocrdma_ah.h  |   6 +
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c  | 312 ++
 drivers/infiniband/hw/ocrdma/ocrdma_hw.h  |   2 +
 drivers/infiniband/hw/ocrdma/ocrdma_main.c|  12

Re: linux-next: build failure after merge of the infiniband tree

2015-02-17 Thread Roland Dreier
On Tue, Feb 17, 2015 at 6:32 PM, Stephen Rothwell s...@canb.auug.org.au wrote:
 After merging the livepatching tree, today's linux-next build (powerpc
 allyesconfig) failed like this:

 In file included from drivers/infiniband/hw/qib/qib_cq.c:41:0:
 drivers/infiniband/hw/qib/qib.h: In function 'qib_flush_wc':
 drivers/infiniband/hw/qib/qib.h:1470:1: error: expected ';' before '}' token
  }
  ^

 and it went badly down hill from there :-(


Weird, I could have sworn I fixed that before I pushed the tree out.
Anyway I'll try adding the missing ';' again and push it out again :(
--
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 1/3] IB/core: Add support for extended query device caps

2015-02-17 Thread Roland Dreier
 The verb also checks the user-space provided response buffer size and only
 fills in capabilities that will fit in the buffer. In attempt to follow the
 spirit of presentation [2] by Tzahi Oved that was presented during OpenFabrics
 Alliance International Developer Workshop 2013, the comp_mask bits will only
 describe which fields are valid.

 +   if (ucore-outlen  resp.response_length)
 +   return -ENOSPC;

So is this really what we want?  A future kernel that adds new fields
will cause previously working userspace to get an error?

Or do we expect userspace to retry with a bigger buffer on ENOSPC,
without actually returning the required size back to userspace?

Is there anything wrong with truncating the response to only include
the fields that userspace asked for?  Is it just that this is the
initial implementation of the query_device_ex verb, so the current
size is also the minimum size?  If so I think we need at least a
comment here, so that we remember to fix the ENOSPC code when adding
more fields in the kernel.
--
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 RE-RESEND V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow

2015-02-17 Thread Roland Dreier
On Tue, Feb 17, 2015 at 9:03 PM, Or Gerlitz ogerl...@mellanox.com wrote:
 Roland, can you please pick this one too, it's a bug fix and no comments
 were raised against it.
 I just failed to remove the Gerrit Issue: XXX line,  so if you can do that,
 will be great


OK.
--
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 FIXES for-3.19 0/2] iser initiator fixes for kernel 3.19

2015-02-17 Thread Roland Dreier
On Tue, Feb 17, 2015 at 11:21 AM, Or Gerlitz gerlitz...@gmail.com wrote:
 On Sun, Jan 18, 2015 at 9:51 AM, Sagi Grimberg sa...@mellanox.com wrote:
 This set consist of two fixes error flows (cleanup resources).

 Hi Roland, I see now that you started to pull the updates for 3.20,
 please remember to take these two too they are @ your patchworks


OK done.
--
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 1/1] IB/mthca: remove deprecated use of pci api

2015-02-17 Thread Roland Dreier
On Wed, Feb 4, 2015 at 6:09 AM, Quentin Lambert
lambert.quen...@gmail.com wrote:
 -   dev-eq_table.icm_dma  = pci_map_page(dev-pdev, 
 dev-eq_table.icm_page, 0,
 - PAGE_SIZE, 
 PCI_DMA_BIDIRECTIONAL);
 -   if (pci_dma_mapping_error(dev-pdev, dev-eq_table.icm_dma)) {
 +   dev-eq_table.icm_dma  = dma_map_page(dev-pdev-dev,
 + dev-eq_table.icm_page, 0,
 + PAGE_SIZE,
 + (enum 
 dma_data_direction)PCI_DMA_BIDIRECTIONAL);

Surely this can't be right?  Shouldn't the direction just change to
DMA_BIDIRECTIONAL?

Are we really sweeping through the kernel and getting rid of pci_map_
etc. calls?

If so please respin your semantic patch so that it doesn't add crazy stuff like

(enum dma_data_direction)PCI_DMA_BIDIRECTIONAL

and resend the change.

Thanks,
  Roland
--
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


[GIT PULL] please pull infiniband.git

2015-02-06 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


One more last-second RDMA change for 3.19:
 - Yann realized that the previous revert of new userspace ABI did not
   go far enough, and we're still exposing a change that we don't want.
   Revert even closer to 3.18 interface to make sure we get things right
   in the long run.

Sorry for sending this at the very end of the release cycle, but we
didn't realize the scope of the required fix until just now.


Yann Droneaud (1):
  Revert IB/core: Add support for extended query device caps

 drivers/infiniband/core/uverbs.h |   1 -
 drivers/infiniband/core/uverbs_cmd.c | 137 +++
 drivers/infiniband/hw/mlx5/main.c|   2 -
 include/rdma/ib_verbs.h  |   5 +-
 include/uapi/rdma/ib_user_verbs.h|  27 ---
 5 files changed, 42 insertions(+), 130 deletions(-)
--
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


[GIT PULL] please pull infiniband.git

2015-02-03 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


Last minute InfiniBand/RDMA changes for 3.19:
 - Revert IPoIB driver back to 3.18 state.  We had a number of fixes go
   into 3.19, but they introduced regressions.  We tried to get everything
   fixed up but ran out of time, so we'll try again for 3.20.
 - Similarly, turn off the new extended query port verb.  Late in the
   cycle we realized the ABI is not quite right, and rather than freeze
   something in a rush and make a mistake, we'll take a bit more time
   and get it right in 3.20.


Haggai Eran (1):
  IB/core: Temporarily disable ex_query_device uverb

Roland Dreier (9):
  Revert IPoIB: No longer use flush as a parameter
  Revert IPoIB: Make ipoib_mcast_stop_thread flush the workqueue
  Revert IPoIB: Use dedicated workqueues per interface
  Revert IPoIB: change init sequence ordering
  Revert IPoIB: fix mcast_dev_flush/mcast_restart_task race
  Revert IPoIB: fix MCAST_FLAG_BUSY usage
  Revert IPoIB: Make the carrier_on_task race aware
  Revert IPoIB: Consolidate rtnl_lock tasks in workqueue
  Merge branches 'ipoib' and 'odp' into for-next

 drivers/infiniband/core/uverbs_main.c  |   1 -
 drivers/infiniband/ulp/ipoib/ipoib.h   |  19 +-
 drivers/infiniband/ulp/ipoib/ipoib_cm.c|  18 +-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c|  27 +--
 drivers/infiniband/ulp/ipoib/ipoib_main.c  |  49 ++---
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 239 +
 drivers/infiniband/ulp/ipoib/ipoib_verbs.c |  22 +--
 7 files changed, 134 insertions(+), 241 deletions(-)
--
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 V3 FIX for-3.19] IB/ipoib: Fix sendonly traffic and multicast traffic

2015-01-29 Thread Roland Dreier
On Thu, Jan 29, 2015 at 7:34 AM, Doug Ledford dledf...@redhat.com wrote:

  So lets close the 3.19 saga, again, either revert your eight patches

 I would support that option.

I think at this point we have to do the revert, and get it right for
3.20.  There's just too much noise floating around and I can't tell
whether all the regressions are dealt with or not, and we're running
out of time.

I will ask Linus to pull in the reverts, and then let's try to agree
on a patch set for 3.20 ASAP.

 - R.
--
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 v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-01-29 Thread Roland Dreier
On Thu, Jan 29, 2015 at 1:59 PM, Yann Droneaud ydrone...@opteya.com wrote:
 Roland: I agree with Yann, these patches need to go in, or the ODP
 patches reverted.

 Reverting all On Demand Paging patches seems overkill:
 if something as to be reverted it should be commit 5a77abf9a97a
 (IB/core: Add support for extended query device caps) and the part of
 commit 860f10a799c8 (IB/core: Add flags for on demand paging support)
 which modify ib_uverbs_ex_query_device().

Thank you and Jason for taking on this interface.

At this point I feel like I do about the IPoIB changes -- we should
revert the broken stuff and get it right for 3.20.

If we revert the two things you describe above, is everything else OK
to leave in 3.19 with respect to ABI?

Thanks,
  Roland
--
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 FIX For-3.19 v5 00/10] Fix ipoib regressions

2015-01-23 Thread Roland Dreier
 Doug, Roland - eight rc1 patches followed ten rc6 fixes - sounds a bit
 too much to me.

 We can do as we wish upstream, but these are going live in our product
 ASAP.  The original 8 rc1 patches took so long to get upstream that they
 had already been live in 6.5-z and 6.6 and were slated for 7.1.  We had
 a few customers report problems, but not as many as you might think.
 The new patches are going to go out and fix those problems, period.  I
 can't wait for 3.20 to fix these issues.  C'est la vie.

 FWIW, I expect that these patches (plus the one patch I didn't put in
 this same thread) to be live on production machines probably within 10
 days (or less).  I'll let you know how that goes.

Given the level of testing you've done, and the fact that the changes
are going to be in a Red Hat release, I'm inclined to try to get all
this into 3.19.  It may be more than Linus would take, and it's more
than I would like to take so late in the cycle, but really it seems
safer than reverting back to the status quo ante.

 - R.
--
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 FIX For-3.19 v4 0/7] IB/ipoib: follow fixes for multicast handling

2015-01-21 Thread Roland Dreier
On Tue, Jan 20, 2015 at 8:16 AM, Erez Shitrit ere...@dev.mellanox.co.il wrote:

 After trying your V4 patch series, I can tell that first, the endless 
 scheduling of
 the mcast task is indeed over, but still, the multicast functionality in 
 ipoib is unstable.

Is this worse than 3.18?  (Have you tested that?)

Because Doug's changes fixed some bad, easy-to-reproduce issues.  On
the other hand we don't want to introduce new regressions to fix the
old issues.

I think we only have a few days to decide whether to revert back to
3.18 code, or push forward with these fixes.

 - R.
--
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 FIX For-3.19 v4 0/7] IB/ipoib: follow fixes for multicast handling

2015-01-21 Thread Roland Dreier
On Wed, Jan 21, 2015 at 12:34 PM, Or Gerlitz gerlitz...@gmail.com wrote:
 Because Doug's changes fixed some bad, easy-to-reproduce issues.  On
 the other hand we don't want to introduce new regressions to fix the
 old issues.

 See above, we did introduced regressions.

Yes, I know, that's my whole point.

We need to fix the current 3.19-rc code, and the two choices are to
keep the fixes we added during 3.19 or revert back to 3.18.

Doug's opinion is that your proposed fix is broken, and we don't have
an alternate fix.

So I suggest we revert the whole series from 3.19 and get this right for 3.20.

 - R.
--
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


[GIT PULL] please pull infiniband.git

2014-12-18 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


Main batch of InfiniBand/RDMA changes for 3.19:

 - On-demand paging support in core midlayer and mlx5 driver.  This lets
   userspace create non-pinned memory regions and have the adapter HW
   trigger page faults.
 - iSER and IPoIB updates and fixes.
 - Low-level HW driver updates for cxgb4, mlx4 and ocrdma.
 - Other miscellaneous fixes.


Ariel Nahum (2):
  IB/iser: Collapse cleanup and disconnect handlers
  IB/iser: Fix possible NULL derefernce ib_conn-device in session_create

Devesh Sharma (1):
  RDMA/ocrdma: Always resolve destination mac from GRH for UD QPs

Doug Ledford (8):
  IPoIB: Consolidate rtnl_lock tasks in workqueue
  IPoIB: Make the carrier_on_task race aware
  IPoIB: fix MCAST_FLAG_BUSY usage
  IPoIB: fix mcast_dev_flush/mcast_restart_task race
  IPoIB: change init sequence ordering
  IPoIB: Use dedicated workqueues per interface
  IPoIB: Make ipoib_mcast_stop_thread flush the workqueue
  IPoIB: No longer use flush as a parameter

Eli Cohen (1):
  IB/core: Add support for extended query device caps

Haggai Eran (14):
  IB/mlx5: Remove per-MR pas and dma pointers
  IB/mlx5: Enhance UMR support to allow partial page table update
  IB/core: Replace ib_umem's offset field with a full address
  IB/core: Add umem function to read data from user-space
  IB/mlx5: Add function to read WQE from user-space
  IB/core: Implement support for MMU notifiers regarding on demand paging 
regions
  mlx5_core: Add support for page faults events and low level handling
  IB/mlx5: Implement the ODP capability query verb
  IB/mlx5: Changes in memory region creation to support on-demand paging
  IB/mlx5: Add mlx5_ib_update_mtt to update page tables after creation
  IB/mlx5: Page faults handling infrastructure
  IB/mlx5: Handle page faults
  IB/mlx5: Add support for RDMA read/write responder page faults
  IB/mlx5: Implement on demand paging by adding support for MMU notifiers

Hariprasad S (1):
  RDMA/cxgb4: Handle NET_XMIT return codes

Hariprasad Shenai (2):
  RDMA/cxgb4: Fix locking issue in process_mpa_request
  RDMA/cxgb4: Limit MRs to  8GB for T4/T5 devices

Jack Morgenstein (2):
  IB/core: Fix mgid key handling in SA agent multicast data-base
  IB/mlx4: Fix an incorrectly shadowed variable in mlx4_ib_rereg_user_mr

Max Gurtovoy (1):
  IB/iser: Fix possible SQ overflow

Minh Tran (1):
  IB/iser: Re-adjust CQ and QP send ring sizes to HW limits

Mitesh Ahuja (1):
  RDMA/ocrdma: Fix ocrdma_query_qp() to report q_key value for UD QPs

Moni Shoua (1):
  IB/core: Do not resolve VLAN if already resolved

Or Gerlitz (1):
  IB/iser: Bump version to 1.5

Or Kehati (1):
  IB/addr: Improve address resolution callback scheduling

Pramod Kumar (2):
  RDMA/cxgb4: Increase epd buff size for debug interface
  RDMA/cxgb4: Configure 0B MRs to match HW implementation

Roland Dreier (2):
  mlx5_core: Re-add MLX5_DEV_CAP_FLAG_ON_DMND_PG flag
  Merge branches 'core', 'cxgb4', 'ipoib', 'iser', 'mlx4', 'ocrdma', 'odp' 
and 'srp' into for-next

Sagi Grimberg (13):
  IB/iser: Fix catastrophic error flow hang
  IB/iser: Decrement CQ's active QPs accounting when QP creation fails
  IB/iser: Fix sparse warnings
  IB/iser: Fix race between iser connection teardown and scsi TMFs
  IB/iser: Terminate connection before cleaning inflight tasks
  IB/iser: Centralize memory region invalidation to a function
  IB/iser: Remove redundant is_mr indicator
  IB/iser: Use more completion queues
  IB/iser: Micro-optimize iser logging
  IB/iser: Micro-optimize iser_handle_wc
  IB/iser: DIX update
  IB/core: Add flags for on demand paging support
  IB/srp: Allow newline separator for connection string

Shachar Raindel (1):
  IB/core: Add support for on demand paging regions

Steve Wise (1):
  RDMA/cxgb4: Wake up waiters after flushing the qp

Yuval Shaia (1):
  mlx4_core: Check for DPDP violation only when DPDP is not supported

 drivers/infiniband/Kconfig |  11 +
 drivers/infiniband/core/Makefile   |   1 +
 drivers/infiniband/core/addr.c |   4 +-
 drivers/infiniband/core/multicast.c|  11 +-
 drivers/infiniband/core/umem.c |  72 ++-
 drivers/infiniband/core/umem_odp.c | 668 +
 drivers/infiniband/core/umem_rbtree.c  |  94 +++
 drivers/infiniband/core/uverbs.h   |   1 +
 drivers/infiniband/core/uverbs_cmd.c   | 171 --
 drivers/infiniband/core/uverbs_main.c  |   5 +-
 drivers/infiniband/core/verbs.c|   3 +-
 drivers

Re: [PATCH v3 06/17] IB/core: Add support for extended query device caps

2014-12-16 Thread Roland Dreier
On Tue, Dec 16, 2014 at 4:33 AM, Yann Droneaud ydrone...@opteya.com wrote:

 With the suggested change here, buffer overflow won't happen,
 but the error is silently ignored, allowing uverb to return a
 partial result, which is likely not expected by userspace as
 it's a bit difficult to handle it gracefully.

 So this has to be removed, and a check on userspace response
 buffer must be added to ib_uverbs_ex_query_device() instead.

I'm not sure of the specifics of the change you're suggesting here.
Would it be OK to go forward with the patch set we have, and then fix
this issue before 3.19-rc2?
--
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: linux-next: build failure after merge of the infiniband tree

2014-12-15 Thread Roland Dreier
On Mon, Dec 15, 2014 at 5:56 PM, Roland Dreier rol...@kernel.org wrote:
 I'll add a partial revert of that patch to my tree to get back the
 now-used enum values.

I rebased my tree on top of the merge-window merge of davem's tree,
and added the missing flag on top of the remove this flag commit.

 - R.
--
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 for-next 00/16] iser initiator updates for 3.19

2014-12-09 Thread Roland Dreier
Thanks, applied for 3.19.
--
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 06/17] IB/core: Add support for extended query device caps

2014-12-09 Thread Roland Dreier
I was getting ready to apply the ODP series, but then I noticed:

On Tue, Nov 11, 2014 at 8:36 AM, Haggai Eran hagg...@mellanox.com wrote:
 diff --git a/drivers/infiniband/core/uverbs_main.c 
 b/drivers/infiniband/core/uverbs_main.c
 index 71ab83fde472..974025028790 100644
 --- a/drivers/infiniband/core/uverbs_main.c
 +++ b/drivers/infiniband/core/uverbs_main.c
 @@ -122,7 +122,8 @@ static int (*uverbs_ex_cmd_table[])(struct ib_uverbs_file 
 *file,
 struct ib_udata *ucore,
 struct ib_udata *uhw) = {
 [IB_USER_VERBS_EX_CMD_CREATE_FLOW]  = ib_uverbs_ex_create_flow,
 -   [IB_USER_VERBS_EX_CMD_DESTROY_FLOW] = ib_uverbs_ex_destroy_flow
 +   [IB_USER_VERBS_EX_CMD_DESTROY_FLOW] = ib_uverbs_ex_destroy_flow,
 +   [IB_USER_VERBS_EX_CMD_QUERY_DEVICE] = ib_uverbs_ex_query_device
  };

  static void ib_uverbs_add_one(struct ib_device *device);

 diff --git a/include/uapi/rdma/ib_user_verbs.h 
 b/include/uapi/rdma/ib_user_verbs.h
 index 26daf55ff76e..ed8c3d9da42c 100644
 --- a/include/uapi/rdma/ib_user_verbs.h
 +++ b/include/uapi/rdma/ib_user_verbs.h
 @@ -90,8 +90,9 @@ enum {
  };

  enum {
 +   IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
 -   IB_USER_VERBS_EX_CMD_DESTROY_FLOW
 +   IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
  };

And this makes no sense to me.  I thought the whole point of EX
commands was to add then after IB_USER_VERBS_CMD_THRESHOLD.

In this case, if you make IB_USER_VERBS_EX_CMD_QUERY_DEVICE =
IB_USER_VERBS_CMD_QUERY_DEVICE then doesn't the entry in
uverbs_cmd_table[] for normal query device get overwritten with
ib_uverbs_ex_query_device()??

 - R.
--
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 PATCH 03/16] ib/mad: Add check for jumbo MADs support on a device

2014-12-07 Thread Roland Dreier
On Sun, Dec 7, 2014 at 4:23 PM, Weiny, Ira ira.we...@intel.com wrote:
 I don't think this is a bad idea, however, the complication is determining 
 the kmem_cache object size in that case.  How about we limit this value to  
 2K until such time as there is a need for larger support?

Can we just get rid of all the kmem_caches used in the MAD code?  I
don't think any of this is so performance-critical that we couldn't
just use kmalloc...

 - R.
--
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 ] mlx4_core: Verify that port types are the same only if DPDP supported

2014-12-07 Thread Roland Dreier
On Sat, Dec 6, 2014 at 10:46 AM, Yuval Shaia yuval.sh...@oracle.com wrote:

 -   for (i = 0; i  dev-caps.num_ports - 1; i++) {
 -   if (port_type[i] != port_type[i + 1]) {
 -   if (!(dev-caps.flags  MLX4_DEV_CAP_FLAG_DPDP)) {
 +   if (!(dev-caps.flags  MLX4_DEV_CAP_FLAG_DPDP))
 +   for (i = 0; i  dev-caps.num_ports - 1; i++) {
 +   if (port_type[i] != port_type[i + 1]) {

I'm struggling to understand what this patch does.  It sure looks like
a NOP to me.

At least you need to resend it with a changelog that explains why we
want this change.

 - R.
--
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 for-next 0/9] Peer-Direct support

2014-10-23 Thread Roland Dreier
On Thu, Oct 23, 2014 at 5:02 AM, Yishai Hadas yish...@mellanox.com wrote:
 The API defined for Peer-Direct is described in this cover letter.
 The required implementation for a hardware device to expose memory
 buffers over Peer-Direct is also detailed in this letter.

I don't see how I can justify merging this (for now at least), given
that there are no actual users of all this (fairly complex) new code,
besides a sample that doesn't actually do anything useful.  Is there
any actual consumer that might go upstream someday that we can at
least review now?

 This makes the usage of peer-direct almost completely transparent to
 the individual hardware drivers. The only changes required in the low
 level IB hardware drivers is supporting an interface for immediate
 invalidation of registered memory regions.

Why do we need immediate invalidation of memory regions?

 - R.
--
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: [Users] Linux kernel: Crash of IB peer in RC mode is not detected

2014-10-23 Thread Roland Dreier
On Thu, Oct 23, 2014 at 6:50 AM, Jack Wang xjtu...@gmail.com wrote:
 I expected that RDMA-Write operations will fail if the other crashes.
 Also I hoped that an event is generated when a host is crashed. The subnet
 manager should notice it and notify every other device in the network.

 Are we missing something in our modules?
 Is there a way to determine that a RC peer crashed without implementing a
 ping-pong mechanism?

If the remote system crashes then any memory regions, QPs, etc. are
still valid with the remote HCA, and RDMA read/write operations will
continue to succeed.  (Unless the system reboots and reinitializes the
adapter or something like that).

There isn't a way to detect a remote crash unless that remote crash
disconnects your QP or otherwise affects the HCA on the crashed
system.
--
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: ib_post_send execution time

2014-10-23 Thread Roland Dreier
On Thu, Oct 23, 2014 at 10:21 AM, Evgenii Smirnov
evgenii.smir...@profitbricks.com wrote:
 I am trying to achieve high packet per second throughput with 2-byte
 messages over Infiniband from kernel using IB_SEND verb. The most I
 can get so far is 3.5 Mpps. However, ib_send_bw utility from perftest
 package is able to send 2-byte packets with rate of 9 Mpps.
 After some profiling I found that execution of ib_post_send function
 in kernel takes about 213 ns in average, for the user-space function
 ibv_post_send takes only about 57 ns.
 As I understand, these functions do almost same operations. The work
 request fields and queue pair parameters are also the same. Why do
 they have such big difference in execution times?


Interesting.  I guess it would be useful to look at perf top / and or
get a perf report with perf report -a -g when running your high PPS
workload, and see where the time is wasted.

 - R.
--
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


[GIT PULL] please pull infiniband.git

2014-10-16 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


Main set of InfiniBand/RDMA updates for 3.18 merge window:

 - Large set of iSER initiator improvements
 - Hardware driver fixes for cxgb4, mlx5 and ocrdma
 - Small fixes to core midlayer


Ariel Nahum (3):
  IB/iser: Unbind at conn_stop stage
  IB/iser: Use iser_warn instead of BUG_ON in iser_conn_release
  IB/iser: Change iscsi_conn_stop log level to info

Devesh Sharma (3):
  RDMA/ocrdma: Add default GID at index 0
  RDMA/ocrdma: Convert kernel VA to PA for mmap in user
  IB/core: Clear AH attr variable to prevent garbage data

Eli Cohen (5):
  IB/mlx5: Clear umr resources after ib_unregister_device
  IB/mlx5: Improve debug prints in mlx5_ib_reg_user_mr
  IB/core: Avoid leakage from kernel to user space
  IB/mlx5: Fix possible array overflow
  IB/mlx5: Remove duplicate code from mlx5_set_path

Hariprasad S (3):
  RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss
  RDMA/cxgb4: Add missing neigh_release in find_route
  RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line

Jack Morgenstein (1):
  IB/core: Fix XRC race condition in ib_uverbs_open_qp

Jes Sorensen (3):
  RDMA/ocrdma: Don't memset() buffers we just allocated with kzalloc()
  RDMA/ocrdma: The kernel has a perfectly good BIT() macro - use it
  RDMA/ocrdma: Save the bit environment, spare unncessary parenthesis

Li RongQing (1):
  RDMA/ocrdma: Remove a unused-label warning

Or Gerlitz (1):
  IB/iser: Bump version, add maintainer

Roi Dayan (1):
  IB/iser: Remove unused variables and dead code

Roland Dreier (1):
  Merge branches 'core', 'cxgb4', 'iser', 'mlx5' and 'ocrdma' into for-next

Sagi Grimberg (23):
  IB/iser: Rename ib_conn - iser_conn
  IB/iser: Re-introduce ib_conn
  IB/iser: Extend iser_free_ib_conn_res()
  IB/iser: Fix DEVICE REMOVAL handling in the absence of iscsi daemon
  IB/iser: Don't bound release_work completions timeouts
  IB/iser: Protect tasks cleanup in case IB device was already released
  IB/iser: Signal iSCSI layer that transport is broken in error completions
  IB/iser: Centralize iser completion contexts
  IB/iser: Use internal polling budget to avoid possible live-lock
  IB/iser: Use single CQ for RX and TX
  IB/iser: Use beacon to indicate all completions were consumed
  IB/iser: Optimize completion polling
  IB/iser: Suppress scsi command send completions
  IB/iser: Nit - add space after __func__ in iser logging
  IB/iser: Add/Fix kernel doc style descriptions in iscsi_iser.h
  IB/iser: Fix/add kernel-doc style description in iscsi_iser.c
  IB/mlx5: Use enumerations for PI copy mask
  IB/iser: Remove redundant assignment
  IB/iser: Set IP_CSUM as default guard type
  IB/mlx5: Use extended internal signature layout
  IB/iser: Centralize ib_sig_domain settings
  Target/iser: Centralize ib_sig_domain setting
  IB/mlx5, iser, isert: Add Signature API additions

Selvin Xavier (1):
  RDMA/ocrdma: Get vlan tag from ib_qp_attrs

Steve Wise (1):
  RDMA/cxgb4: Make c4iw_wr_log_size_order static

Yishai Hadas (1):
  IB/mlx5: Modify to work with arbitrary page size

 MAINTAINERS  |   1 +
 drivers/infiniband/core/uverbs_cmd.c |   2 +
 drivers/infiniband/core/uverbs_main.c|   5 +
 drivers/infiniband/hw/cxgb4/cm.c |  32 +-
 drivers/infiniband/hw/cxgb4/device.c |   2 +-
 drivers/infiniband/hw/mlx5/main.c|   8 +-
 drivers/infiniband/hw/mlx5/mem.c |  18 +-
 drivers/infiniband/hw/mlx5/mr.c  |   6 +-
 drivers/infiniband/hw/mlx5/qp.c  | 149 +++---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c |  25 +-
 drivers/infiniband/hw/ocrdma/ocrdma_main.c   |  12 +
 drivers/infiniband/hw/ocrdma/ocrdma_sli.h| 238 +-
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c  |  10 +-
 drivers/infiniband/ulp/iser/iscsi_iser.c | 313 ++---
 drivers/infiniband/ulp/iser/iscsi_iser.h | 408 +++-
 drivers/infiniband/ulp/iser/iser_initiator.c | 198 
 drivers/infiniband/ulp/iser/iser_memory.c|  99 ++--
 drivers/infiniband/ulp/iser/iser_verbs.c | 667 +++
 drivers/infiniband/ulp/isert/ib_isert.c  |  65 ++-
 include/linux/mlx5/qp.h  |  35 +-
 include/rdma/ib_verbs.h  |  32 +-
 21 files changed, 1372 insertions(+), 953 deletions(-)
--
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 v1 for-next 06/16] IB/core: Implement support for MMU notifiers regarding on demand paging regions

2014-10-14 Thread Roland Dreier
 + notifiers_seq = atomic_read(item-odp_data-notifiers_seq) + 1;
 + atomic_set(item-odp_data-notifiers_seq,
 +notifiers_seq);

Is this code really as silly as it looks, or is there some deep reason
for avoiding atomic_inc() that I'm missing?  Do you need atomic_inc(),
since as far as I can tell all modification of notifiers_seq and
notifiers_count happens while holding the umem_mutex?

In general I find it very suspicious that you have these two atomic_t
members, notifiers_seq and notifiers_count, but you never use anything
except atomic_read() and atomic_set() to access them.  Why are they
atomic_t at all?

 - R.
--
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 8/8] IB/srp: Add multichannel support

2014-10-10 Thread Roland Dreier
On Mon, Oct 6, 2014 at 4:16 AM, Bart Van Assche bvanass...@acm.org wrote:
 On 10/02/14 19:30, Christoph Hellwig wrote:
 Also if we want to merge scsi LLDDs that can take advantage of
 multiqueue support it would probably be best if I take this via the SCSI
 tree.

 Sending these patches to you is fine with me, at least if Roland agrees.

That's fine with me.  Christoph/Bart should I just let you guys handle
all the pending SRP patches, or is there anything I should pick up via
the InfiniBand tree?

Everything that's in flight looks reasonable to me, so I'm fine with
however you guys want to merge it.

 - R.
--
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


[GIT PULL] please pull infiniband.git

2014-09-23 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus

This is later and bigger than I would like, and the blame is all on
me: I got very busy with other stuff for a few weeks during the 3.17
cycle, and didn't prepare this tree as soon as I should have.  However
I don't think there's anything risky here, and no one really cares if
we break InfiniBand in 3.17 anyway...


Last late set of InfiniBand/RDMA fixes for 3.17:

 - Fixes for the new memory region re-registration support
 - iSER initiator error path fixes
 - Grab bag of small fixes for the qib and ocrdma hardware drivers
 - Larger set of fixes for mlx4, especially in RoCE mode


Alex Estrin (1):
  IPoIB: Remove unnecessary port query

Devesh Sharma (2):
  RDMA/ocrdma: Report correct value of max_fast_reg_page_list_len
  RDMA/ocrdma: Do not skip setting deferred_arm

Jack Morgenstein (6):
  IB/mlx4: Fix lockdep splat for the iboe lock
  mlx4: Fix mlx4 reg/unreg mac to work properly with 0-mac addresses
  IB/mlx4: Avoid accessing netdevice when building RoCE qp1 header
  IB/mlx4: Don't update QP1 in native mode
  IB/mlx4: Do not allow APM under RoCE
  IB/mlx4: Fix VF mac handling in RoCE

Markus Stockhausen (1):
  IB/mlx4: Disable TSO for Connect-X rev. A0 HCAs

Matan Barak (2):
  mlx4: Correct error flows in rereg_mr
  IB/core: When marshaling uverbs path, clear unused fields

Mike Marciniszyn (3):
  IB/ipath: Change get_user_pages() usage to always NULL vmas
  IB/qib: Change get_user_pages() usage to always NULL vmas
  IB/qib: Correct reference counting in debugfs qp_stats

Moni Shoua (5):
  IB/mlx4: Avoid null pointer dereference in mlx4_ib_scan_netdevs()
  IB/mlx4: Don't duplicate the default RoCE GID
  IB/mlx4: Reorder steps in RoCE GID table initialization
  IB/mlx4: Get upper dev addresses as RoCE GIDs when port comes up
  IB/mlx4: Avoid executing gid task when device is being removed

Or Gerlitz (1):
  IB/iser: Bump version to 1.4.1

Roi Dayan (1):
  IB/iser: Fix RX/TX CQ resource leak on error flow

Roland Dreier (1):
  Merge branches 'core', 'ipoib', 'iser', 'mlx4', 'ocrdma' and 'qib' into 
for-next

Sagi Grimberg (1):
  IB/iser: Allow bind only when connection state is UP

Shawn Bohrer (1):
  IB: ib_umem_release() should decrement mm-pinned_vm from ib_umem_get

devesh.sha...@emulex.com (2):
  RDMA/ocrdma: Resolve L2 address when creating user AH
  RDMA/ocrdma: Use right macro in query AH

 drivers/infiniband/core/umem.c |  19 ++-
 drivers/infiniband/core/uverbs_marshall.c  |   4 +
 drivers/infiniband/hw/ipath/ipath_user_pages.c |   6 +-
 drivers/infiniband/hw/mlx4/main.c  | 169 +
 drivers/infiniband/hw/mlx4/mlx4_ib.h   |   1 +
 drivers/infiniband/hw/mlx4/mr.c|   7 +-
 drivers/infiniband/hw/mlx4/qp.c|  60 +
 drivers/infiniband/hw/ocrdma/ocrdma_ah.c   |  43 +--
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c|   6 +-
 drivers/infiniband/hw/qib/qib_debugfs.c|   3 +-
 drivers/infiniband/hw/qib/qib_qp.c |   8 --
 drivers/infiniband/hw/qib/qib_user_pages.c |   6 +-
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c |  10 +-
 drivers/infiniband/ulp/iser/iscsi_iser.c   |  19 ++-
 drivers/infiniband/ulp/iser/iscsi_iser.h   |   2 +-
 drivers/infiniband/ulp/iser/iser_verbs.c   |  24 ++--
 drivers/net/ethernet/mellanox/mlx4/mr.c|  33 +++--
 drivers/net/ethernet/mellanox/mlx4/port.c  |  11 +-
 include/rdma/ib_umem.h |   1 +
 19 files changed, 277 insertions(+), 155 deletions(-)
--
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 0/7] Signature feature update

2014-08-22 Thread Roland Dreier
On Fri, Aug 22, 2014 at 11:22 AM, Nicholas A. Bellinger
n...@linux-iscsi.org wrote:
 Roland, are you planning to pick these up for v3.18..?

Sure.
--
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


[GIT PULL] please pull infiniband.git

2014-08-14 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


Main set of InfiniBand/RDMA updates for 3.17 merge window:

 - MR reregistration support
 - MAD support for RMPP in userspace
 - iSER and SRP initiator updates
 - ocrdma hardware driver updates
 - other fixes...


Alex Estrin (1):
  IB/ipoib: Avoid multicast join attempts with invalid P_key

Ariel Nahum (3):
  IB/iser: Seperate iser_conn and iscsi_endpoint storage space
  IB/iser: Protect iser state machine with a mutex
  IB/iser: Replace connection waitqueue with completion object

Bart Van Assche (3):
  scsi_transport_srp: Fix fast_io_fail_tmo=dev_loss_tmo=off behavior
  IB/srp: Fix deadlock between host removal and multipathd
  IB/srp: Fix residual handling

Dan Carpenter (1):
  RDMA/amso1100: Check for integer overflow in c2_alloc_cq_buf()

Devesh Sharma (7):
  RDMA/ocrdma: Avoid posting DPP requests for RDMA READ
  be2net: Issue shutdown event to ocrdma driver
  RDMA/ocrdma: Handle shutdown event from be2net driver
  RDMA/ocrdma: Remove hardcoding of the max DPP QPs supported
  RDMA/ocrdma: Delete AH table if ocrdma_init_hw fails after AH table 
creation
  RDMA/ocrdma: Obtain SL from device structure
  RDMA/ocrdma: Update sli data structure for endianness

Doug Ledford (2):
  IB/srpt: Handle GID change events
  RDMA/uapi: Include socket.h in rdma_user_cm.h

Erez Shitrit (2):
  IB/ipoib: Use P_Key change event instead of P_Key polling mechanism
  IB/ipoib: Avoid flushing the workqueue from worker context

Fabian Frederick (3):
  IPoIB: Remove unnecessary test for NULL before debugfs_remove()
  IB/mlx4: Use ARRAY_SIZE instead of sizeof/sizeof[0]
  IB/mlx5: Use ARRAY_SIZE instead of sizeof/sizeof[0]

Ira Weiny (5):
  IB/umad: Update module to [pr|dev]_* style print messages
  IB/mad: Update module to [pr|dev]_* style print messages
  IB/mad: Add dev_notice messages for various umad/mad registration failures
  IB/mad: add new ioctl to ABI to support new registration options
  IB/mad: Add user space RMPP support

Jack Morgenstein (1):
  mlx4_core: Add support for secure-host and SMP firewall

Matan Barak (3):
  IB/core: Add user MR re-registration support
  mlx4_core: Add helper functions to support MR re-registration
  IB/mlx4_ib: Add support for user MR re-registration

Mitesh Ahuja (4):
  RDMA/ocrdma: Allow only SEND opcode in case of UD QPs
  RDMA/ocrdma: Do proper cleanup even if FW is in error state
  RDMA/ocrdma: Return proper value for max_mr_size
  RDMA/ocrdma: report asic-id in query device

Or Gerlitz (1):
  IB/ipath: Add P_Key change event support

Roi Dayan (3):
  IB/iser: Support IPv6 address family
  IB/iser: Add TIMEWAIT_EXIT event handling
  IB/iser: Clarify a duplicate counters check

Roland Dreier (1):
  Merge branches 'core', 'cxgb4', 'ipoib', 'iser', 'iwcm', 'mad', 'misc', 
'mlx4', 'mlx5', 'ocrdma' and 'srp' into for-next

Sagi Grimberg (2):
  IB/iser: Fix responder resources advertisement
  IB/iser: Remove redundant return code in iser_free_ib_conn_res()

Selvin Xavier (8):
  RDMA/ocrdma: Query and initalize the PFC SL
  RDMA/ocrdma: Add hca_type and fixing fw_version string in device 
atrributes
  RDMA/ocrdma: Avoid reporting wrong completions in case of error CQEs
  RDMA/ocrdma: Add missing adapter mailbox opcodes
  RDMA/ocrdma: Increase the size of STAG array in dev structure to 16K
  RDMA/ocrdma: Initialize the GID table while registering the device
  RDMA/ocrdma: Fix a sparse warning
  RDMA/ocrdma: Update the ocrdma module version string

Steve Wise (2):
  RDMA/cxgb4: Only call CQ completion handler if it is armed
  RDMA/iwcm: Use a default listen backlog if needed

Wei Yongjun (1):
  IB/srp: Fix return value check in srp_init_module()

 Documentation/infiniband/user_mad.txt  |  13 +-
 drivers/infiniband/core/agent.c|  16 +-
 drivers/infiniband/core/cm.c   |   5 +-
 drivers/infiniband/core/iwcm.c |  27 ++
 drivers/infiniband/core/mad.c  | 283 +---
 drivers/infiniband/core/mad_priv.h |   3 -
 drivers/infiniband/core/sa_query.c |   2 +-
 drivers/infiniband/core/user_mad.c | 188 +++--
 drivers/infiniband/core/uverbs.h   |   1 +
 drivers/infiniband/core/uverbs_cmd.c   |  93 +++
 drivers/infiniband/core/uverbs_main.c  |   1 +
 drivers/infiniband/hw/amso1100/c2_cq.c |   7 +-
 drivers/infiniband/hw/cxgb4/ev.c   |   1 +
 drivers/infiniband/hw/cxgb4/qp.c   |  37 ++-
 drivers/infiniband

Re: [PATCH 6/8] ib/srpt: Enhance printk output

2014-08-12 Thread Roland Dreier
On Tue, Aug 12, 2014 at 4:20 PM, Doug Ledford dledf...@redhat.com wrote:
 The ib_srpt module has a metric ton of printks for debugging and
 warnings and such.  And it never prefaces a single one of them with
 information to allow an admin to know what errant module is spewing
 garbage all through their dmesg output.  Fix that.

Target patches should probably go through Nic's tree, although for
srpt stuff like this I guess I can take it.

However I also think it would be a lot cleaner to define pr_fmt() at
the top of the file like

#define pr_fmt(fmt) KBUILD_MODNAME :  fmt

and then convert the printks to pr_info() or pr_warn() instead of
having to type ib_srpt: everywhere.

 - R.
--
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 2/8] IB/srp: Use P_Key cache for P_Key lookups

2014-08-12 Thread Roland Dreier
On Tue, Aug 12, 2014 at 4:20 PM, Doug Ledford dledf...@redhat.com wrote:
 -   ret = ib_find_pkey(target-srp_host-srp_dev-dev,
 -  target-srp_host-port,
 -  be16_to_cpu(target-path.pkey),
 -  attr-pkey_index);
 +   ret = ib_find_cached_pkey(target-srp_host-srp_dev-dev,
 + target-srp_host-port,
 + be16_to_cpu(target-path.pkey),
 + attr-pkey_index);

I consider the cached operations to be a deprecated interface, and
I'd rather remove uses than add new ones.  I have a vague dream of
fixing everything up so the normal interfaces (ib_find_pkey() etc)
don't sleep and are usable everywhere, although that dream will
probably never come true.

But is there any practical benefit to this change?  I don't think
saving a few milliseconds at log in time counts -- I would think it's
lost in the noise of how long it takes to actually log in, scan for
LUNs, etc.

 - R.
--
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_mad: fix microblaze build issue (PFX macro mistake)

2014-08-11 Thread Roland Dreier
 diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
 index 3c6b228..cc00e4e 100644
 --- a/drivers/infiniband/core/mad.c
 +++ b/drivers/infiniband/core/mad.c
 @@ -34,7 +34,7 @@
   *
   */

 -#define pr_fmt(fmt) PFX fmt
 +#define pr_fmt(fmt) ib_mad:  fmt

  #include linux/dma-mapping.h
  #include linux/slab.h
 --
 1.8.2


Thanks, I had already rolled in a slightly different fix...
--
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


[GIT PULL] please pull infiniband.git

2014-07-18 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


InfiniBand/RDMA fixes for 3.16

 - cxgb4 hardware driver regression fixes
 - mlx5 hardware driver regression fixes


Hariprasad S (2):
  RDMA/cxgb4: Fix skb_leak in reject_cr()
  RDMA/cxgb4: Clean up connection on ARP error

Or Gerlitz (1):
  IB/mlx5: Enable block multicast loopback for kernel consumers

Roland Dreier (1):
  Merge branches 'cxgb4' and 'mlx5' into for-next

Sagi Grimberg (1):
  mlx5_core: Fix possible race between mr tree insert/delete

Steve Wise (2):
  RDMA/cxgb4: Initialize the device status page
  RDMA/cxgb4: Call iwpm_init() only once

 drivers/infiniband/hw/cxgb4/cm.c | 14 +++---
 drivers/infiniband/hw/cxgb4/device.c | 18 +++---
 drivers/infiniband/hw/cxgb4/iw_cxgb4.h   |  2 +-
 drivers/infiniband/hw/mlx5/qp.c  |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/mr.c | 19 +++
 5 files changed, 39 insertions(+), 16 deletions(-)
--
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


[GIT PULL] please pull infiniband.git

2014-06-10 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus



Main batch of InfiniBand/RDMA changes for 3.16:

 - Add iWARP port mapper to avoid conflicts between RDMA and normal
   stack TCP connections.

 - Fixes for i386 / x86-64 structure padding differences (ABI
   compatibility for 32-on-64) from Yann Droneaud.

 - A pile of SRP initiator fixes from Bart Van Assche.

 - Fixes for a writeback / memory allocation deadlock with NFS over
   IPoIB connected mode from Jiri Kosina.

 - The usual fixes and cleanups to mlx4, mlx5, cxgb4 and other
   low-level drivers.


Ariel Nahum (2):
  IB/iser: Simplify connection management
  IB/iser: Fix a possible race in iser connection states transition

Bart Van Assche (11):
  IB/srp: Fix a sporadic crash triggered by cable pulling
  IB/srp: Fix kernel-doc warnings
  IB/srp: Introduce an additional local variable
  IB/srp: Introduce srp_map_fmr()
  IB/srp: Introduce srp_finish_mapping()
  IB/srp: Introduce the 'register_always' kernel module parameter
  IB/srp: One FMR pool per SRP connection
  IB/srp: Rename FMR-related variables
  IB/srp: Add fast registration support
  IB/umad: Fix error handling
  IB/umad: Fix use-after-free on close

Christoph Jaeger (1):
  RDMA/cxgb4: Fix memory leaks in c4iw_alloc() error paths

Colin Ian King (1):
  IB/mlx4: fix unitialised variable is_mcast

Dan Carpenter (2):
  RDMA/cxgb3: Fix information leak in send_abort()
  RDMA/cxgb3: Remove a couple unneeded conditions

Dennis Dalessandro (1):
  IB/ipath: Translate legacy diagpkt into newer extended diagpkt

Dotan Barak (1):
  mlx4_core: Fix memory leaks in SR-IOV error paths

Duan Jiong (1):
  RDMA/ocrdma: Convert to use simple_open()

Haggai Eran (7):
  IB/mlx5: Fix error handling in reg_umr
  IB/mlx5: Add MR to radix tree in reg_mr_callback
  mlx5_core: Store MR attributes in mlx5_mr_core during creation and after 
UMR
  IB/mlx5: Set QP offsets and parameters for user QPs and not just for 
kernel QPs
  IB/core: Remove unneeded kobject_get/put calls
  IB/core: Fix port kobject deletion during error flow
  IB/core: Fix kobject leak on device register error flow

Jack Morgenstein (5):
  mlx4_core: Fix incorrect FLAGS1 bitmap test in mlx4_QUERY_FUNC_CAP
  IB/mlx4: SET_PORT called by mlx4_ib_modify_port should be wrapped
  IB/mlx4: Preparation for VFs to issue/receive SMI (QP0) requests/responses
  mlx4: Add infrastructure for selecting VFs to enable QP0 via MLX proxy QPs
  IB/mlx4: Add interface for selecting VFs to enable QP0 via MLX proxy QPs

Jiri Kosina (2):
  IB/mlx4: Implement IB_QP_CREATE_USE_GFP_NOIO
  IB/mlx4: Fix gfp passing in create_qp_common()

Joe Perches (1):
  IB/srp: Avoid problems if a header uses pr_fmt

Manuel Schölling (1):
  IB/ipath: Use time_before()/_after()

Mike Marciniszyn (1):
  IB/qib: Fix port in pkey change event

Or Gerlitz (3):
  IB/iser: Bump version to 1.4
  IB: Return error for unsupported QP creation flags
  IB: Add a QP creation flag to use GFP_NOIO allocations

Roi Dayan (1):
  IB/iser: Add missing newlines to logging messages

Roland Dreier (6):
  IB/mlx5: Fix warning about cast of wr_id back to pointer on 32 bits
  mlx4_core: Move handling of MLX4_QP_ST_MLX to proper switch statement
  IB/mad: Fix sparse warning about gfp_t use
  IB/core: Fix sparse warnings about redeclared functions
  mlx4_core: Fix GFP flags parameters to be gfp_t
  Merge branches 'core', 'cxgb3', 'cxgb4', 'iser', 'iwpm', 'misc', 'mlx4', 
'mlx5', 'noio', 'ocrdma', 'qib', 'srp' and 'usnic' into for-next

Sagi Grimberg (3):
  mlx5_core: Fix signature handover operation for interleaved buffers
  mlx5_core: Simplify signature handover wqe for interleaved buffers
  mlx5_core: Copy DIF fields only when input and output space values match

Shachar Raindel (1):
  IB/mlx5: Refactor UMR to have its own context struct

Steve Wise (2):
  RDMA/cxgb4: Fix vlan support
  RDMA/cxgb4: Add support for iWARP Port Mapper user space service

Tatyana Nikolova (2):
  RDMA/core: Add support for iWARP Port Mapper user space service
  RDMA/nes: Add support for iWARP Port Mapper user space service

Upinder Malhi (1):
  IB/usnic: Fix source file missing copyright and license

Vinit Agnihotri (1):
  IB/qib: Additional Intel branding changes

Yann Droneaud (5):
  IB/mlx5: add missing padding at end of struct mlx5_ib_create_cq
  IB/mlx5: add missing padding at end of struct mlx5_ib_create_srq
  RDMA/cxgb4: Add missing padding at end of struct c4iw_create_cq_resp
  IB: Allow build of hw/ and ulp/ subdirectories independently
  RDMA/cxgb4: add missing padding at end of struct

Re: [PATCH for-next] mlx4_core: Add support for secure-host and SMP firewall

2014-06-10 Thread Roland Dreier
On Sun, Jun 8, 2014 at 12:48 PM, Or Gerlitz or.gerl...@gmail.com wrote:

 So, is this OK for 3.16? note this touches mlx4 only. if you have any
 questions on the patch, please let us know and Jack will address.

This came in after the merge window already opened, but I will try to
get it into my final batch for 3.16 changes.
--
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 for-next] mlx4_core: Add support for secure-host and SMP firewall

2014-06-10 Thread Roland Dreier
 By this you mean the reminder...? I sent the patch June 1st wheres
 the window opened on the 8th, but thanks anyway.

The merge window opened June 1: https://lwn.net/Articles/600984/

 - R.
--
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: [RESEND PATCH] IB/umad: Fix a use-after-free

2014-06-06 Thread Roland Dreier
On Fri, Jun 6, 2014 at 9:25 AM, Yann Droneaud ydrone...@opteya.com wrote:
 It seems this one was not rolled in your latest katamari[1].


Thanks, picked it up this time around.

 - R.
--
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 for-next 00/15] Bug fixes for ocrdma driver

2014-06-04 Thread Roland Dreier
On Wed, Jun 4, 2014 at 9:37 AM, Steve Wise sw...@opengridcomputing.com wrote:
 Seems like the subject lines in each patch are getting truncated?


Yes, truncated in patchwork too -- for example:
https://patchwork.kernel.org/patch/4292461/

Please fix and resend.
--
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 0/2] Include protection information in iscsi header

2014-06-03 Thread Roland Dreier
On Sun, Jun 1, 2014 at 9:19 AM, Sagi Grimberg sa...@mellanox.com wrote:
 Although these patches involve 3 subsystems with different
 maintainers (scsi, iser, target) I would prefer seeing these
 patches included together.

Why?  Because they break wire compatibility?

I hate to say it but even if they're merged at the same time, you
can't guarantee that targets and initiators will be updated together.
--
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: [infiniband:for-next 41/47] drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3: warning: case value '7' not in enumerated type 'enum qp_transition'

2014-05-30 Thread Roland Dreier
On Thu, May 29, 2014 at 11:55 PM, kbuild test robot
fengguang...@intel.com wrote:
 tree:   git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
 for-next
 head:   73b878af35148015273fb09b4a4af80c770ff763
 commit: 99ec41d0a48cb6d14af25765f9449762f9d101f6 [41/47] mlx4: Add 
 infrastructure for selecting VFs to enable QP0 via MLX proxy QPs
 config: x86_64-rhel (attached as .config)

 All warnings:

drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 
 'verify_qp_parameters':
 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3: warning: case 
 value '7' not in enumerated type 'enum qp_transition' [-Wswitch]
   case MLX4_QP_ST_MLX:
   ^

 vim +2875 drivers/net/ethernet/mellanox/mlx4/resource_tracker.c

   2859  num_gids = 
 mlx4_get_slave_num_gids(dev, slave, port);
   2860  else
   2861  num_gids = 1;
   2862  if 
 (qp_ctx-pri_path.mgid_index = num_gids)
   2863  return -EINVAL;
   2864  }
   2865  if (optpar  
 MLX4_QP_OPTPAR_ALT_ADDR_PATH) {
   2866  port = 
 (qp_ctx-alt_path.sched_queue  6  1) + 1;
   2867  if (dev-caps.port_mask[port] 
 != MLX4_PORT_TYPE_IB)
   2868  num_gids = 
 mlx4_get_slave_num_gids(dev, slave, port);
   2869  else
   2870  num_gids = 1;
   2871  if 
 (qp_ctx-alt_path.mgid_index = num_gids)
   2872  return -EINVAL;
   2873  }
   2874  break;
 2875  case MLX4_QP_ST_MLX:
   2876  qpn = vhcr-in_modifier  0x7f;
   2877  port = (qp_ctx-pri_path.sched_queue  6  
 1) + 1;
   2878  if (transition == QP_TRANS_INIT2RTR 
   2879  slave != mlx4_master_func_num(dev) 
   2880  mlx4_is_qp_reserved(dev, qpn) 
   2881  !mlx4_vf_smi_enabled(dev, slave, port)) {
   2882  /* only enabled VFs may create MLX 
 proxy QPs */
   2883  mlx4_err(dev, %s: unprivileged slave 
 %d attempting to create an MLX proxy special QP on port %d\n,

Looks like this is actually a bug... assuming you guys agree the patch
is correct, I'll add the following:

commit 165cb465f73c (HEAD, mlx4)
Author: Roland Dreier rol...@purestorage.com
Date:   Fri May 30 15:38:58 2014

mlx4_core: Move handling of MLX4_QP_ST_MLX to proper switch statement

The handling of MLX4_QP_ST_MLX in verify_qp_parameters() was
accidentally put inside the inner switch statement (that handles which
transition of RC/UC/XRC QPs is happening).  Fix this by moving the case
to the outer switch statement.

The compiler pointed this out with:

drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In
function 'verify_qp_parameters':
  drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3:
warning: case value '7' not in enumerated type 'enum qp_transition'
[-Wswitch]
   case MLX4_QP_ST_MLX:

Reported-by: kbuild test robot fengguang...@intel.com
Fixes: 99ec41d0a48c (mlx4: Add infrastructure for selecting VFs
to enable QP0 via MLX proxy QPs)
Signed-off-by: Roland Dreier rol...@purestorage.com

diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index ad98162a8d79..10db83ee0e58 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2872,25 +2872,25 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
return -EINVAL;
}
break;
-   case MLX4_QP_ST_MLX:
-   qpn = vhcr-in_modifier  0x7f;
-   port = (qp_ctx-pri_path.sched_queue  6  1) + 1;
-   if (transition == QP_TRANS_INIT2RTR 
-   slave != mlx4_master_func_num(dev) 
-   mlx4_is_qp_reserved(dev, qpn) 
-   !mlx4_vf_smi_enabled(dev, slave, port)) {
-   /* only enabled VFs may create MLX proxy QPs */
-   mlx4_err(dev, %s: unprivileged slave
%d attempting to create an MLX proxy special QP on port %d\n,
-__func__, slave, port

Re: [PATCH v4 0/9] SRP initiator patches for kernel 3.16

2014-05-20 Thread Roland Dreier
On Tue, May 20, 2014 at 7:06 AM, Or Gerlitz ogerl...@mellanox.com wrote:
 V3 is already applied


It's OK, I can replace the 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  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/9] SRP initiator patches for kernel 3.16

2014-05-19 Thread Roland Dreier
 The series looks good to me.

 Reviewed-by: Sagi Grimberg sa...@mellanox.com

thanks, queued all 9 patches up.
--
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 0/3] mlx5 signature handover fixes for kernel 3.16

2014-05-19 Thread Roland Dreier
On Sun, May 18, 2014 at 8:32 AM, Sagi Grimberg sa...@mellanox.com wrote:
 This patchset addresses 3 issues signature handover mlx5 implementation.


Thanks, applied all 3.
--
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 v1 for-next 0/3] IB: Use GFP_NOIO calls in IPoIB connected mode TX path

2014-05-19 Thread Roland Dreier
On Sat, May 17, 2014 at 1:52 PM, Or Gerlitz or.gerl...@gmail.com wrote:
 Roland, we're soon on -rc6 and there's no reason for this to miss
 3.16, could you please comment whether you want it to go through your
 tree or net-next?

I will pick it up.
--
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 libibverbs V1] Align Flow Steering API to the extension verbs scheme

2014-05-19 Thread Roland Dreier
On Thu, May 15, 2014 at 6:16 AM, Or Gerlitz ogerl...@mellanox.com wrote:
 Hi Roland -- this addresses all the comments by Jason who gave a
 ack/reviewed-by note for both the libibverbs and libmlx4 fixes.

 So you can move ahead and conduct point releases for both libs.


OK... so I should do one more libmlx4 release before you take over?

 - R.
--
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 0/3] RDMA/core: iWARP Port Mapper Overview

2014-05-19 Thread Roland Dreier
On Wed, Mar 26, 2014 at 3:07 PM, Tatyana Nikolova
tatyana.e.nikol...@intel.com wrote:
 1) The IWPM functionality, common for both iWarp drivers (nes and cxgb4)
is refactored from the drivers source files and is moved to new shared
files in infiniband/core which are compiled as part of the iw_cm module.


So I'm looking to include this for 3.16.  One question: I assume
unpatched iwarp drivers (eg cxgb3) continue to work as before?  In
other words they don't get the new port mapper support but at least
they don't regress?

 - R.
--
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 libibverbs V3 3/3] Add ibv_query_port_ex support

2014-05-12 Thread Roland Dreier
 BTW, before I forget, the patch that introduces the API must also
 include a man page for it.

Jason, care to send a patch for the README or whatever with the rules? :)
--
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 libibverbs V3 3/3] Add ibv_query_port_ex support

2014-05-09 Thread Roland Dreier
On Thu, May 8, 2014 at 12:09 PM, Jason Gunthorpe
jguntho...@obsidianresearch.com wrote:
  struct verbs_context {
   /*  grows up - new fields go here */
 + int (*drv_query_port_ex)(struct ibv_context *context, uint8_t port_num,
 +  struct ibv_port_attr_ex *port_attr);
 + int (*lib_query_port_ex)(struct ibv_context *context, uint8_t port_num,
 +   struct ibv_port_attr_ex *port_attr);
   struct ibv_ah * (*drv_ibv_create_ah_ex)(struct ibv_pd *pd,
   struct ibv_ah_attr_ex *attr);
   int (*drv_ibv_destroy_flow) (struct ibv_flow *flow);

 I'm not sure what Roland decided to merge, but I am surprised to see
 drv_ elements here. That was nix'd in the round of review of the first
 patch set. eg create_qp_ex/etc don't have them.

 The flow is such that the verbs code has a chance to capture and
 override the function pointer after the driver sets it, there is no
 purpose to the drv_ values.

 I wouldn't like to see more added, and I think you should make a patch
 to ensure they are not necessary before it propogates too far.

Sorry, I was not aware of the feeling on drv_XXX members here and I
don't think I saw any review comments about them.  (Maybe they got
lost in the flood of merge it merge it merge it emails)

Anyway I'm wondering if there's a way to recover without breaking ABI
here (or by breaking ABI in a manageable way).  The only library using
this stuff (that I know of) is libmlx4, maybe we can spin quick
releases of both and pretend libibverbs 1.1.8 never happened?
--
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 libibverbs V3 2/3] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-05-09 Thread Roland Dreier
On Thu, May 8, 2014 at 1:15 PM, Jason Gunthorpe
jguntho...@obsidianresearch.com wrote:
 From now on I think every proposed API/ABI change should be in an
 isolated patch from anything else, it should be accompanied by other
 patches showing the implementation, and the ABI patch specifically
 should earn a public Reviewed-By from at least two of people who
 designed this monster: Sean, Liran and myself.

 Roland?

That would be extremely helpful to me and I support that rule 100%.

 .. and you should start by correcting the flow steering changes, they
 are not up to the standard and haven't earned the above reviews.

Do we have a way of fixing things without breaking ABI, or at least
making the ABI break painless?

 - R.
--
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 libibverbs V3 3/3] Add ibv_query_port_ex support

2014-05-09 Thread Roland Dreier
On Fri, May 9, 2014 at 11:10 AM, Jason Gunthorpe
jguntho...@obsidianresearch.com wrote:
 To be honest, I never bothered looking at any patches beyond the core
 extension patches. There was no indication from you that they would
 ever be merged, so it didn't feel like good use of my time.

Haven't the verbs extensions patches been in libibverbs since last
summer?  It's only these flow steering patches that got merged in the
last couple of weeks.

 - R.
--
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


[ANNOUNCE] libmlx4 1.0.6 is released

2014-05-07 Thread Roland Dreier
libmlx4 is a library that allows programs to use RDMA verbs for
direct access to RDMA (currently InfiniBand and iWARP) hardware from
userspace.

The new stable release, 1.0.6, is available from

http://www.openfabrics.org/downloads/mlx4/libmlx4-1.0.6.tar.gz

with sha1sum

ee22cc20f537b5e794465682d97e5ad0647d9464  libmlx4-1.0.6.tar.gz

I also pushed the latest tree and tag out to kernel.org:

git://git.kernel.org/pub/scm/libs/infiniband/libmlx4.git

(the name of the tag is libmlx4-1.0.6).

The main new features in this release are: generic infrastructure for
verbs extensions, support for XRC, and support for flow steering.
This release requires libiverbs = 1.1.8 to build.

This will be my last release of libmlx4; I am turning maintenance of
the library over to Mellanox.

The git shortlog since libmlx4 1.0.5 is:

Matan Barak (1):
  Add receive flow steering support

Roland Dreier (5):
  resize_cq: Fix possible endless loop scanning CQ
  Remove compatibility with libibverbs  1.1.7
  Use dh-autoreconf to fix build on ppc64el
  Enable subdir-objects for automake
  Roll libmlx4 1.0.6 release

Sean Hefty (1):
  Add support for XRC QPs

Yishai Hadas (1):
  Update to use libiverbs extension support / verbs_register_driver()
--
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: [ANNOUNCE] libibverbs 1.1.8 is released

2014-05-07 Thread Roland Dreier
On Wed, May 7, 2014 at 1:48 AM, Or Gerlitz ogerl...@mellanox.com wrote:
 Roland, due to a mistake I made in the rebased flow-steering patch I handed
 you -- I was nominated as the author instead of Matan, our flow-steering
 maintainer.. can you please git reword this commit in your libibverbs clone,
 I don't think there will be any issue to use the already released 1.1.8

Sorry, I already pushed out a signed tag for the release to my git
tree, so I can't rewrite history.

 - R.
--
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


[ANNOUNCE] libibverbs 1.1.8 is released

2014-05-05 Thread Roland Dreier
libibverbs is a library that allows programs to use RDMA verbs for
direct access to RDMA (currently InfiniBand and iWARP) hardware from
userspace.

The new stable release, 1.1.8, is available from

http://www.openfabrics.org/downloads/verbs/libibverbs-1.1.8.tar.gz

with sha1sum

df1afc6f368f4ad4c7a74d270591fc79db875b2b  libibverbs-1.1.8.tar.gz

I also pushed the latest tree and tag out to kernel.org:

git://git.kernel.org/pub/scm/libs/infiniband/libibverbs.git

(the name of the tag is libibverbs-1.1.8).

The main new features in this release are: generic infrastructure for
verbs extensions, support for XRC, and support for flow steering.

The git shortlog since libibverbs 1.1.7 is:

Jay Sternberg (1):
  Add XRC sample application

Jeff Squyres (1):
  Use IBV_SEND_INLINE in example pingpong programs

Matan Barak (1):
  Add general definitions to support uverbs extensions

Or Gerlitz (1):
  Add receive flow steering support

Roland Dreier (2):
  Update maintainer now that I'm a DD
  Roll libibverbs 1.1.8 release

Sean Hefty (5):
  Introduce XRC domains (XRCDs)
  Add support for XRC SRQs
  Add support for XRC QPs
  Add ibv_open_qp() for XRC receive QPs
  XRC man pages

Upinder Malhi \(umalhi\) (1):
  Add support for usNIC nodes and transports

Yishai Hadas (2):
  Infrastructure to support verbs extensions
  Fix XRC sample application (ibv_xsrq_pingpong) issues
--
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


[GIT PULL] please pull infiniband.git

2014-05-01 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus


InfiniBand/RDMA updates for 3.15-rc4:

 - cxgb4 hardware driver fixes


Hariprasad S (1):
  RDMA/cxgb4: Update Kconfig to include Chelsio T5 adapter

Steve Wise (3):
  RDMA/cxgb4: Fix endpoint mutex deadlocks
  RDMA/cxgb4: Force T5 connections to use TAHOE congestion control
  RDMA/cxgb4: Only allow kernel db ringing for T4 devs

 drivers/infiniband/hw/cxgb4/Kconfig   |  6 ++---
 drivers/infiniband/hw/cxgb4/cm.c  | 39 ++-
 drivers/infiniband/hw/cxgb4/iw_cxgb4.h|  1 +
 drivers/infiniband/hw/cxgb4/qp.c  | 13 +++
 drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 14 +++
 5 files changed, 55 insertions(+), 18 deletions(-)
--
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 RESEND 3.15-rc3 1/3] iw_cxgb4: Fix endpoint mutex deadlocks

2014-04-28 Thread Roland Dreier
On Mon, Apr 28, 2014 at 5:53 AM, Steve Wise sw...@opengridcomputing.com wrote:

 Hey Roland, do these 3 bug fixes look good for 3.15?


Yes, look fine, applying now.
--
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 for-next] IB/mlx5: Add block multicast loopback support

2014-04-21 Thread Roland Dreier
commit f360d88a2efd upstream.


On Mon, Apr 21, 2014 at 10:56 AM, Christoph Lameter c...@linux.com wrote:
 On Wed, 2 Apr 2014, Or Gerlitz wrote:

 From: Eli Cohen e...@dev.mellanox.co.il

 Add support for the block multicast loopback QP creation flag along
 the proper firmware API for that.

 Could we get this merged? We need this on a lot of systems.

--
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 for-next] IB/mlx5: Add block multicast loopback support

2014-04-21 Thread Roland Dreier
Is something more than commit 521e575b9a73 (from 2008) required?

On Mon, Apr 21, 2014 at 11:59 AM, Christoph Lameter c...@linux.com wrote:
 On Mon, 21 Apr 2014, Roland Dreier wrote:

 commit f360d88a2efd upstream.

 Great. Is there a corresponding patch for mlx4? Dont see that in the
 kernel and we have mostly mlx4.

--
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


[GIT PULL] please pull infiniband.git

2014-04-03 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus



Main batch of InfiniBand/RDMA changes for 3.15:

 - The biggest change is core API extensions and mlx5 low-level driver
   support for handling DIF/DIX-style protection information, and the
   addition of PI support to the iSER initiator.  Target support will be
   arriving shortly through the SCSI target tree.

 - A nice simplification to the umem memory pinning library now that
   we have chained sg lists.  Kudos to Yishai Hadas for realizing our
   code didn't have to be so crazy.

 - Another nice simplification to the sg wrappers used by qib, ipath and
   ehca to handle their mapping of memory to adapter.

 - The usual batch of fixes to bugs found by static checkers etc. from
   intrepid people like Dan Carpenter and Yann Droneaud.

 - A large batch of cxgb4, ocrdma, qib driver updates.


Alex Tabachnik (2):
  IB/iser: Introduce pi_enable, pi_guard module parameters
  IB/iser: Initialize T10-PI resources

Ariel Nahum (1):
  IB/iser: Remove struct iscsi_iser_conn

Bart Van Assche (7):
  IB/mlx4: Fix a sparse endianness warning
  scsi_transport_srp: Fix two kernel-doc warnings
  IB/srp: Add more logging
  IB/srp: Avoid duplicate connections
  IB/srp: Make writing into the add_target sysfs attribute interruptible
  IB/srp: Avoid that writing into add_target hangs due to a cable pull
  IB/srp: Fix a race condition between failing I/O and I/O completion

CQ Tang (1):
  IB/qib: Change SDMA progression mode depending on single- or multi-rail

Dan Carpenter (7):
  IB/qib: Remove duplicate check in get_a_ctxt()
  RDMA/nes: Clean up a condition
  RDMA/cxgb4: Fix underflows in c4iw_create_qp()
  RDMA/cxgb4: Fix four byte info leak in c4iw_create_cq()
  IB/qib: Cleanup qib_register_observer()
  mlx4_core: Fix some indenting in mlx4_ib_add()
  mlx4_core: Make buffer larger to avoid overflow warning

Dennis Dalessandro (3):
  IB/qib: Fix potential buffer overrun in sending diag packet routine
  IB/ipath: Fix potential buffer overrun in sending diag packet routine
  IB/qib: Fix memory leak of recv context when driver fails to initialize.

Devesh Sharma (9):
  RDMA/ocrdma: EQ full catastrophe avoidance
  RDMA/ocrdma: SQ and RQ doorbell offset clean up
  RDMA/ocrdma: Read ASIC_ID register to select asic_gen
  RDMA/ocrdma: Allow DPP QP creation
  RDMA/ocrdma: ABI versioning between ocrdma and be2net
  be2net: Add abi version between be2net and ocrdma
  RDMA/ocrdma: Update version string
  RDMA/ocrdma: Increment abi version count
  RDMA/ocrdma: Code clean-up

Fabio Estevam (1):
  IB/usnic: Remove '0x' when using %pa format

Mike Marciniszyn (7):
  IB/qib: Fix debugfs ordering issue with multiple HCAs
  IB/qib: Add percpu counter replacing qib_devdata int_counter
  IB/qib: Modify software pma counters to use percpu variables
  IB/qib: Remove ib_sg_dma_address() and ib_sg_dma_len() overloads
  IB/ipath: Remove ib_sg_dma_address() and ib_sg_dma_len() overloads
  IB/ehca: Remove ib_sg_dma_address() and ib_sg_dma_len() overloads
  IB/core: Remove overload in ib_sg_dma*

Moni Shoua (1):
  IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler

Or Gerlitz (3):
  IB/iser: Print QP information once connection is established
  IB/iser: Update Mellanox copyright note
  IB/iser: Bump driver version to 1.3

Prarit Bhargava (1):
  RDMA/ocrdma: Fix compiler warning

Randy Dunlap (1):
  IB/iser: Fix sector_t format warning

Roi Dayan (1):
  IB/iser: Drain the tx cq once before looping on the rx cq

Roland Dreier (2):
  RDMA/ocrdma: Fix warnings about pointer - integer casts
  Merge branches 'core', 'cxgb4', 'ip-roce', 'iser', 'misc', 'mlx4', 'nes', 
'ocrdma', 'qib', 'sgwrapper', 'srp' and 'usnic' into for-next

Sagi Grimberg (23):
  IB/core: Introduce protected memory regions
  IB/core: Introduce signature verbs API
  mlx5: Implement create_mr and destroy_mr
  IB/mlx5: Initialize mlx5_ib_qp signature-related members
  IB/mlx5: Break up wqe handling into begin  finish routines
  IB/mlx5: Remove MTT access mode from umr flags helper function
  IB/mlx5: Keep mlx5 MRs in a radix tree under device
  IB/mlx5: Support IB_WR_REG_SIG_MR
  IB/mlx5: Collect signature error completion
  IB/mlx5: Expose support for signature MR feature
  IB/iser: Suppress completions for fast registration work requests
  IB/iser: Avoid FRWR notation, use fastreg instead
  IB/iser: Push the decision what memory key to use into fast_reg_mr routine
  IB/iser: Move fast_reg_descriptor initialization to a function
  IB/iser: Keep IB device attributes under

Re: [PATCH for v3.14 0/5] Coccicheck / coccinelle catched errors on ib/hw

2014-04-01 Thread Roland Dreier
On Tue, Mar 25, 2014 at 6:15 AM, Yann Droneaud ydrone...@opteya.com wrote:
 Here removing sta...@vger.kernel.org doesn't sound right.

Sorry, I've added that back.

 Could you help me to understand the reason why your selectively remove
 some 'Cc:' on some patches while leaving them on other patches.

Typically I don't see much point in putting a list of email addresses
of people who might (or might not) have some connection to the patch
into the changelog.  Cc: means I tried to get this person's
attention on the patch but they didn't reply in time and I don't see
much value in persisting that information forever, so I strip it when
I catch it.  The IB/RDMA community has a lot of people for whom
English is not their native language, so I'm pretty much in the habit
of trying to polish all changelogs as they go by.  Cc: stable is of
course the one exception to my stripping.

 - R.
--
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 0/3] Hangs with IPoIB when doing PCI error injection

2014-03-28 Thread Roland Dreier
On Fri, Mar 28, 2014 at 1:47 PM, David Miller da...@davemloft.net wrote:
 I'm assuming Roland will take this in via his tree.


Yes, hoping for some feedback from Mellanox people.

 - R.
--
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 0/8] Misc. fixes for iw_cxgb4

2014-03-20 Thread Roland Dreier
Thanks, applied all except

  iw_cxgb4: use the BAR2/WC path for kernel QPs and T5 devices

which doesn't apply to my tree (seems to depend on patches only in net-next).
--
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: linux rdma 3.14 merge plans

2014-03-07 Thread Roland Dreier
Sure, no problem.

Do you have a git tree with the latest versions of all the changes you
want for 3.15 in a branch?  That would be helpful as I catch up on
applying things, so that I don't miss anything.

If you don't have one, taking a little time to set one up on github or
wherever would be nice.  You can base your set of changes on Linus's
latest tree.

Thanks!
  Roland

On Thu, Mar 6, 2014 at 9:07 PM, Devesh Sharma devesh.sha...@emulex.com wrote:
 Hi Roland,

 Is it okay to send next series of patches even if previous series is not 
 accepted yet in your tree? Off-course I will cut patches on top of previous 
 series of patches.

 -Regards
  Devesh

 -Original Message-
 From: linux-rdma-ow...@vger.kernel.org 
 [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Nicholas A. Bellinger
 Sent: Thursday, March 06, 2014 12:34 AM
 To: Roland Dreier
 Cc: Or Gerlitz; Hefty Sean; linux-rdma; Martin K. Petersen; target-devel; 
 Sagi Grimberg; linux-kernel
 Subject: Re: linux rdma 3.14 merge plans

 On Wed, 2014-03-05 at 07:18 -0800, Roland Dreier wrote:
 On Wed, Mar 5, 2014 at 1:54 AM, Nicholas A. Bellinger
 n...@linux-iscsi.org wrote:
  That all said, do you have an objection wrt taking this bits through
  target-pending..?  Given the dependencies involved, that would seem
  the most logical path to take.

 Perhaps not surprisingly, I would prefer to get a chance to review a
 major change to the core RDMA midlayer rather than having you merge it
 through your tree.  So yes I do object.  Please give me a chance to
 review and merge it.  I am working on that this week.


 Great.  We'll be looking for a response by the end of the week.

 Otherwise if you end up not having time, we'd still like to move forward for 
 v3.15 given the amount of review the series has already gotten on the list.

 Thank you,

 --nab



 --
 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
--
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 v5 00/10] Introduce Signature feature

2014-03-07 Thread Roland Dreier
So I went ahead and applied this for 3.15, although I suspect the
verbs API is probably the wrong one.  I understand that the mlx5
microarchitecture requires some of this signature binding stuff to go
through a work queue, but conceptually I don't think the
IB_WR_REG_SIG_MR work request makes sense as the right interface.  Why
do I need to do both a synchronous create_mr and an asynchronous work
request for what's conceptually a single operation?

Similarly the ib_check_mr_status() operation doesn't really make sense
to me as an additional synchronous operation -- why do I not just get
signature information as part of the completion entry for the
transaction that generated it?

Anyway, you guys are the ones that will have to clean this up in the
future when it becomes a problem, so I'm not going to push on this.

 - R.
--
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: linux rdma 3.14 merge plans

2014-03-05 Thread Roland Dreier
On Wed, Mar 5, 2014 at 1:54 AM, Nicholas A. Bellinger
n...@linux-iscsi.org wrote:
 That all said, do you have an objection wrt taking this bits through
 target-pending..?  Given the dependencies involved, that would seem the
 most logical path to take.

Perhaps not surprisingly, I would prefer to get a chance to review a
major change to the core RDMA midlayer rather than having you merge it
through your tree.  So yes I do object.  Please give me a chance to
review and merge it.  I am working on that this week.

 - R.
--
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


[GIT PULL] please pull infiniband.git

2014-02-14 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus



RDMA/InfiniBand fixes for 3.14-rc3:
 - Fix some rough edges from the IP addressing for IBoE merge
 - Other misc fixes, mostly to hardware drivers


Dan Carpenter (1):
  IB/iser: Fix use after free in iser_snd_completion()

Devesh Sharma (2):
  RDMA/ocrdma: Fix traffic class shift
  RDMA/ocrdma: Fix load time panic during GID table init

Eli Cohen (4):
  IB/mlx5: Fix RC transport send queue overhead computation
  IB/mlx5: Fix binary compatibility with libmlx5
  IB/mlx5: Don't set block multicast loopback capability
  IB/mlx5: Remove dependency on X86

Julia Lawall (2):
  RDMA/nes: Fix error return code
  RDMA/amso1100: Fix error return code

Kumar Sanghvi (1):
  RDMA/cxgb4: Add missing neigh_release in LE-Workaround path

Matan Barak (1):
  IB/mlx4: Don't allocate range of steerable UD QPs for Ethernet-only device

Mike Marciniszyn (1):
  IB/qib: Add missing serdes init sequence

Moni Shoua (6):
  IB/mlx4: Make sure GID index 0 is always occupied
  IB/mlx4: Move rtnl locking to the right place
  IB/mlx4: Do IBoE locking earlier when initializing the GID table
  IB/mlx4: Do IBoE GID table resets per-port
  IB/mlx4: Build the port IBoE GID table properly under bonding
  IB: Report using RoCE IP based gids in port caps

Roi Dayan (1):
  IB/iser: Avoid dereferencing iscsi_iser conn object when not bound to 
iser connection

Roland Dreier (2):
  mlx5: Add include of linux/slab.h because of kzalloc()/kfree() use
  Merge branches 'cma', 'cxgb4', 'iser', 'misc', 'mlx4', 'mlx5', 'nes', 
'ocrdma', 'qib' and 'usnic' into for-next

Upinder Malhi (1):
  IB/usnic: Fix smatch endianness error

 drivers/infiniband/hw/amso1100/c2.c |   4 +-
 drivers/infiniband/hw/amso1100/c2_rnic.c|   3 +-
 drivers/infiniband/hw/cxgb4/cm.c|   1 +
 drivers/infiniband/hw/mlx4/main.c   | 185 +---
 drivers/infiniband/hw/mlx5/Kconfig  |   2 +-
 drivers/infiniband/hw/mlx5/main.c   |  22 ++-
 drivers/infiniband/hw/mlx5/qp.c |  18 ++-
 drivers/infiniband/hw/mlx5/user.h   |   7 +
 drivers/infiniband/hw/nes/nes.c |   5 +-
 drivers/infiniband/hw/ocrdma/ocrdma_main.c  |   2 +-
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c |   4 +-
 drivers/infiniband/hw/qib/qib_iba7322.c |   5 +
 drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c   |   9 +-
 drivers/infiniband/ulp/iser/iser_initiator.c|   3 +-
 drivers/infiniband/ulp/iser/iser_verbs.c|  10 +-
 drivers/net/ethernet/mellanox/mlx5/core/Kconfig |   2 +-
 include/linux/mlx5/driver.h |   3 +
 include/rdma/ib_verbs.h |   3 +-
 18 files changed, 214 insertions(+), 74 deletions(-)
--
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 master] RDMA/ocrdma: Fix load time panic during GID table init

2014-02-13 Thread Roland Dreier
On Mon, Feb 3, 2014 at 10:40 PM, Devesh Sharma devesh.sha...@emulex.com wrote:

 driver should use rdma_vlan_dev_real_dev() instead of using 
 vlan_dev_real_dev()
 while building GID table for a vlan interface.

 Signed-off-by: Devesh Sharma devesh.sha...@emulex.com
 ---
  drivers/infiniband/hw/ocrdma/ocrdma_main.c |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)

 diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c 
 b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
 index 91443bc..f7b1b27 100644
 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c
 +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
 @@ -161,7 +161,9 @@ static void ocrdma_add_vlan_sgids(struct ocrdma_dev *dev)

 rcu_read_lock();
 for_each_netdev_rcu(init_net, tmp) {
 -   if (netdev == tmp || vlan_dev_real_dev(tmp) == netdev) {
 +   if (
 +   netdev  (netdev == tmp ||
 +   rdma_vlan_dev_real_dev(tmp) == netdev)) {
 if (!netif_running(tmp) || !netif_oper_up(tmp))
 continue;
 if (netdev != tmp) {
 @@ -208,7 +210,7 @@ static int ocrdma_inet6addr_event(struct notifier_block 
 *notifier,
 is_vlan = netdev-priv_flags  IFF_802_1Q_VLAN;
 if (is_vlan) {
 vid = vlan_dev_vlan_id(netdev);
 -   netdev = vlan_dev_real_dev(netdev);
 +   netdev = rdma_vlan_dev_real_dev(netdev);
 }

 rcu_read_lock();

I applied this for my next pull request to go into 3.14, but I had to
massage it quite a bit to get it to apply.  There was only one call to
vlan_dev_real_dev(), and the context was a bit different.

I guess this is on top of some other patch set?  But I'm assuming we
need the fix for 3.14 even without those other patches.

 - R.
--
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/CMA: Fix initialization of hop_limit instead of hardcode to 1.

2014-02-13 Thread Roland Dreier
On Wed, Feb 12, 2014 at 9:44 PM, Somnath Kotur somnath.ko...@emulex.com wrote:
 Hi Roland,

  Yes you are correct, currently it is not routable , and this
 would probably be the first gentle step in enabling it to be so.

 Also, I did see that in ib_init_ah_from_wc() currently , it is already being
 set to 0xff , so this would add symmetry and enable it both ways Iff needed
 of course.

 Do you think this should go into for-next instead ?

I'm still trying to understand why this patch should go anywhere.
Repeating my previous question: is there any practical situation where
this makes a difference?

If not then wouldn't it make sense to design how routable IBoE will
work overall before tinkering with minor stuff like this?

 - R.
--
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/mlx5: Remove dependency on X86

2014-02-13 Thread Roland Dreier
 There's another Kconfig you need to fix as well.  Full patch below.
 With this it compiles and loads on powerpc.

Got it, I'll use this patch.

Thanks!
  Roland
--
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: linux rdma 3.14 merge plans

2014-02-06 Thread Roland Dreier
On Thu, Feb 6, 2014 at 4:02 PM, Nicholas A. Bellinger
n...@linux-iscsi.org wrote:
 Can you give us an estimate of when you'll have some time to give
 feedback on the outstanding patches..?

I hope to get to it in the next few weeks.

 - R.
--
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 for-3.14] IB/mlx4: Report using RoCE IP based gids in port caps

2014-02-06 Thread Roland Dreier
On Sun, Feb 2, 2014 at 7:51 AM, Or Gerlitz ogerl...@mellanox.com wrote:
 For user-space RoCE UD QPs we need to know the GID format that the
 kernel uses, e.g when working over older kernels. For that end, add
 new port capability IB_PORT_IP_BASED_GIDS and report it when a port
 query is issued.

I'm a little worried here.  Does old libibverbs (which doesn't know
anything about this flag) still work on a new kernel with the IP-based
GIDs?  Or have we broken ABI?

Also why does only mlx4 get modified here?  Didn't we modify ocrdma to
use IP-based GIDs too?

 - R.
--
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


[GIT PULL] please pull infiniband.git

2014-01-24 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus



Main batch of InfiniBand/RDMA changes for 3.14:
 - Flow steering for InfiniBand UD traffic
 - IP-based addressing for IBoE aka RoCE
 - Pass SRP submaintainership from Dave to Bart
 - SRP transport fixes from Bart
 - Add the new Cisco usNIC low-level device driver
 - Various other fixes


Bart Van Assche (4):
  scsi_transport_srp: Block rport upon TL error even with fast_io_fail_tmo 
= off
  scsi_transport_srp: Fix a race condition
  scsi_transport_srp: Add rport state diagram
  scsi_transport_srp: Fix kernel-doc warnings

Dan Carpenter (2):
  mlx5_core: Remove dead code
  IB/usnic: Use GFP_ATOMIC under spinlock

David Dillow (1):
  MAINTAINERS: Pass the torch of SRP submaintainership

Devesh Sharma (2):
  RDMA/ocrdma: Fix AV_VALID bit position
  RDMA/ocrdma: Fix OCRDMA_GEN2_FAMILY macro definition

Ding Tianhong (1):
  RDMA/nes: Slight optimization of Ethernet address compare

Eli Cohen (13):
  IB/mlx5: Remove unused code in mr.c
  IB/mlx5: Fix micro UAR allocator
  IB/mlx5: Clear out struct before create QP command
  mlx5_core: Use mlx5 core style warning
  IB/mlx5: Make sure doorbell record is visible before doorbell
  IB/mlx5: Implement modify CQ
  IB/mlx5: Add support for resize CQ
  mlx5_core: Improve debugfs readability
  mlx5_core: Fix PowerPC support
  IB/mlx5: Allow creation of QPs with zero-length work queues
  IB/mlx5: Abort driver cleanup if teardown hca fails
  IB/mlx5: Remove old field for create mkey mailbox
  IB/mlx5: Verify reserved fields are cleared

Haggai Eran (1):
  mlx5_core: Fix out arg size in access_register command

Ira Weiny (1):
  IB/qib: Fix QP check when looping back to/from QP1

Julia Lawall (1):
  IB/mlx4: Fix error return code

Matan Barak (9):
  IB/core: Add flow steering support for IPoIB UD traffic
  IB/core: Add support for IB L2 device-managed steering
  mlx4_core: Add support for steerable IB UD QPs
  IB/mlx4: Enable device-managed steering support for IB ports too
  IB/mlx4: Add mechanism to support flow steering over IB links
  IB/mlx4: Add support for steerable IB UD QPs
  IB/core: Ethernet L2 attributes in verbs/cm structures
  IB/core: Make ib_addr a core IB module
  IB/mlx4: Add dependency INET

Michal Schmidt (1):
  IPoIB: Report operstate consistently when brought up without a link

Moni Shoua (5):
  IB/cma: IBoE (RoCE) IP-based GID addressing
  IB/mlx4: Use IBoE (RoCE) IP based GIDs in the port GID table
  IB/mlx4: Handle Ethernet L2 parameters for IP based GID addressing
  RDMA/ocrdma: Handle Ethernet L2 parameters for IP based GID addressing
  RDMA/ocrdma: Populate GID table with IP based gids

Or Gerlitz (2):
  IB/core: Resolve Ethernet L2 addresses when modifying QP
  IB/core: Fix unused variable warning

Paul Bolle (1):
  RDMA/cxgb4: Fix gcc warning on 32-bit arch

Roland Dreier (6):
  IB/usnic: Fix typo Ignorning - Ignoring
  RDMA/ocrdma: Move ocrdma_inetaddr_event outside of #if CONFIG_IPV6
  RDMA/ocrdma: Add dependency on INET
  IB/mlx4: Use IS_ENABLED(CONFIG_IPV6)
  Merge branches 'cma', 'cxgb4', 'flowsteer', 'ipoib', 'misc', 'mlx4', 
'mlx5', 'ocrdma', 'qib', 'srp' and 'usnic' into for-next
  Merge branch 'ip-roce' into for-next

Somnath Kotur (1):
  RDMA/cma: Handle global/non-linklocal IPv6 addresses in 
cma_check_linklocal()

Svetlana Mavrina (1):
  RDMA/amso1100: Add check if cache memory was allocated before freeing it

Upinder Malhi (22):
  IB/usnic: Add Cisco VIC low-level hardware driver
  IB/usnic: Change WARN_ON to lockdep_assert_held
  IB/usnic: Add struct usnic_transport_spec
  IB/usnic: Push all forwarding state to usnic_fwd.[hc]
  IB/usnic: Port over main.c and verbs.c to the usnic_fwd.h
  IB/usnic: Port over usnic_ib_qp_grp.[hc] to new usnic_fwd.h
  IB/usnic: Port over sysfs to new usnic_fwd.h
  IB/usnic: Update ABI and Version file for UDP support
  IB/usnic: Add UDP support to usnic_fwd.[hc]
  IB:usnic: Add UDP support to usnic_transport.[hc]
  IB/usnic: Add UDP support in u*verbs.c, u*main.c and u*util.h
  IB/usnic: Add UDP support in usnic_ib_qp_grp.[hc]
  IB/core: Add RDMA_TRANSPORT_USNIC_UDP
  IB/usnic: Remove superflous parentheses
  IB/usnic: Use for_each_sg instead of a for-loop
  IB/usnic: Expose flows via debugfs
  IB/usnic: Append documentation to usnic_transport.h and cleanup
  IB/usnic: Fix endianness-related warnings
  IB/usnic: Add dependency on CONFIG_INET
  IB/core: Add support for RDMA_NODE_USNIC_UDP
  IB/usnic: Advertise usNIC devices as RDMA_NODE_USNIC_UDP
  IB/usnic: Set

Re: SRP initiator driver maintainership (was: Stepping down)

2014-01-21 Thread Roland Dreier
On Mon, Jan 20, 2014 at 9:37 AM, Bart Van Assche bvanass...@acm.org wrote:
 Thanks for all the time you have spent reviewing and testing SRP
 initiator patches. Such maintainer work is unglamorous but important -
 it is due to the combined effort of all kernel maintainers that the
 Linux kernel earned its high quality reputation.

 Roland, what is your preference with regard to maintainership of the SRP
 initiator driver ? My plan is to continue contributing patches to the
 SRP initiator driver at about the same pace as I had done in the past.
 Do you prefer to take over maintainership of this driver yourself or is
 it okay for you that I become the official maintainer for this driver ?

First of all, thank you Dave for the help on SRP.  I apologize for
being busy at various points and not responding to earlier emails, but
your efforts are definitely very much appreciated.  Best of luck in
your new endeavours.

Second, Bart, yes I would appreciate it if you could take over SRP
submaintainership.  What email address would you like listed in the
Maintainers file?

Thanks,
  Roland
--
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: linux rdma 3.14 merge plans

2014-01-18 Thread Roland Dreier
On Thu, Jan 16, 2014 at 1:14 PM, Nicholas A. Bellinger
n...@linux-iscsi.org wrote:
 I've reviewed the API from the perspective of what's required for
 implementing protection support in iser, and currently don't have any
 recommendations or objections beyond what has been proposed by Sagi  Co
 in PATCH-v4 code.

I guess I'm a little confused about why we need verbs support for this
to implement DIF/DIX in iser.  Isn't the whole point of protection to
have end-to-end checksums, rather than having checksums computed by
the transport after there's a chance for corruption?

 - R.
--
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 for-next 0/6] Add flow steering support for IPoIB

2014-01-14 Thread Roland Dreier
Applied this IB UD flow steering stuff, sorry for the delay.
--
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: linux rdma 3.14 merge plans

2014-01-07 Thread Roland Dreier
On Tue, Jan 7, 2014 at 1:02 PM, Or Gerlitz or.gerl...@gmail.com wrote:

 Currently there is single patch for 3.14 on your for-next branch, the
 usnic driver. With 3.13 being on rc7 and likely to be released next
 week, are you planning any other merges for 3.14? we have patches
 waiting for weeks and months without any comment from you.

I am definitely planning on merging the new IBoE IP addressing stuff,
since we seem to have solved the ABI issues.

The UD flow steering patches seem good and I will take a closer look soon.

And there are quite a few usnic patches still to pick up.

I'm confident that will all make it.


The data integrity stuff I'm not so sure about.  Sean raised some I
think legitimate questions about whether all this should be added to
the verbs API and I want to see more discussion or at least have a
deep think about this myself before comitting.

 - R.
--
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


[GIT PULL] please pull infiniband.git

2013-12-23 Thread Roland Dreier
Hi Linus,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus

The following changes since commit 374b105797c3d4f29c685f3be535c35f5689b30e:

  Linux 3.13-rc3 (2013-12-06 09:34:04 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git 
tags/rdma-for-linus

for you to fetch changes up to 22f12c60e12a4112fdca31582e66fe501600ee2b:

  Merge branches 'cxgb4', 'flowsteer' and 'misc' into for-linus (2013-12-23 
09:19:02 -0800)



Last batch of InfiniBand/RDMA changes for 3.13 / 2014:
 - Additional checks for uverbs to ensure forward compatibility, handle
   malformed input better.
 - Fix potential use-after-free in iWARP connection manager.
 - Make a function static.


Rashika (1):
  RDMA/cxgb4: Make _c4iw_write_mem_dma() static

Roland Dreier (2):
  IB/uverbs: New macro to set pointers to NULL if length is 0 in 
INIT_UDATA()
  Merge branches 'cxgb4', 'flowsteer' and 'misc' into for-linus

Steve Wise (1):
  RDMA/iwcm: Don't touch cm_id after deref in rem_ref

Yann Droneaud (7):
  IB/core: const'ify inbuf in struct ib_udata
  IB/uverbs: Check reserved field in extended command header
  IB/uverbs: Check comp_mask in destroy_flow
  IB/uverbs: Check reserved fields in create_flow
  IB/uverbs: Set error code when fail to consume all flow_spec items
  IB/uverbs: Check input length in flow steering uverbs
  IB/uverbs: Check access to userspace response buffer in extended command

 drivers/infiniband/core/iwcm.c| 11 +--
 drivers/infiniband/core/uverbs.h  | 10 +-
 drivers/infiniband/core/uverbs_cmd.c  | 17 +
 drivers/infiniband/core/uverbs_main.c | 27 ---
 drivers/infiniband/hw/cxgb4/mem.c |  2 +-
 include/rdma/ib_verbs.h   |  2 +-
 6 files changed, 53 insertions(+), 16 deletions(-)
--
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 V9 libmlx4 1/2] Infra-structure changes to support verbs extensions

2013-12-23 Thread Roland Dreier
On Thu, Aug 1, 2013 at 8:05 AM, Yishai Hadas yish...@mellanox.com wrote:
 #ifdef HAVE_IBV_REGISTER_DRIVER
  static __attribute__((constructor)) void mlx4_register_driver(void)
  {
 -   ibv_register_driver(mlx4, mlx4_driver_init);
 +   verbs_register_driver(mlx4, mlx4_driver_init);
  }
  #else

So just to be clear, after this change libmlx4 will no longer build or
work with libibverbs = 1.1.7 (1.1.8 is unreleased but is the one with
the verbs extension changes)?

If so does it make sense to have this autoconf stuff
(HAVE_IBV_REGISTER_DRIVER) for compatibility with libibverbs 1.0.x?
How hard would it be to add an autoconf check for
verbs_register_driver() and keep compatibility with libibverbs 1.1.7?

 - R.
--
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 for-next] IB/usnic: Fix userspace/kernel ABI alignement discrepancy

2013-12-20 Thread Roland Dreier
On Fri, Dec 20, 2013 at 1:39 PM, Upinder Malhi (umalhi)
uma...@cisco.com wrote:
 @@ -67,7 +67,7 @@ struct usnic_ib_create_qp_resp {
 u32 rq_idx[USNIC_QP_GRP_MAX_RQS];
 u32 cq_idx[USNIC_QP_GRP_MAX_CQS];
 u32 transport;
 -   u64 reserved;
 +   u32 reserved[8];
 };

Making your struct be an odd number of 4-byte words seems like a bad
idea.  It might be padded differently on different architectures.  for
example:

$ cat a.c
#include stdio.h
#include stdint.h

int main(int argc, char *argv[])
{
struct foo {
uint64_t a;
uint32_t b[3];
};

printf(%zd\n, sizeof (struct foo));
return 0;
}
$ gcc -m32 -o a ~/a.c
$ ./a
20
$ gcc -o a ~/a.c
$ ./a
24


I would suggest writing a little test harness and making sure that
sizeof and offsetof give the same outputs for all your structs on both
32-bit and 64-bit x86 at the very least.

 - R.
--
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: [PATCHv4 for-3.13 00/10] create_flow/destroy_flow fixes for v3.13

2013-12-19 Thread Roland Dreier
 Unfortunately, some patches in V4 were replacement for patches in V3.
 In this particular case, I've rework the commit messages in V4, so these
 changes might be lost.

 And I'm a bit disappointed about this particular patch applied with a
 conflict fix:

 https://git.kernel.org/cgit/linux/kernel/git/roland/infiniband.git/commit/?h=for-nextid=2f92baf8313756fd32da4d2a24abc67c8f4f7026

 if (!access_ok(VERIFY_WRITE,
(const void __user *) (unsigned long) ex_hdr.response,
(hdr.out_words + ex_hdr.provider_out_words) * 8))
 return -EFAULT;

 https://git.kernel.org/cgit/linux/kernel/git/roland/infiniband.git/tree/drivers/infiniband/core/uverbs_main.c?h=for-nextid=2f92baf8313756fd32da4d2a24abc67c8f4f7026#n679

 Checking for write access on a pointer to const doesn't sound right.
 It's harmless, and, if sparse/coccinelle doesn't have a check for such,
 it should be added to report a warning.

Sorry for that mistake.  I've fixed that conflict fix to get rid of
the const.  I've also pulled in the changelog updates.

However, I still prefer not moving all the casts out into every place
where we use INIT_UDATA(), so I'd prefer something like the patch
below.  I integrated that into the series and pushed out the result
(since everyone seems OK with rebasing for-next).

Please let me know what you think.

From: Roland Dreier rol...@purestorage.com
Date: Thu, 19 Dec 2013 08:37:03 -0800
Subject: [PATCH] IB/uverbs: Set pointers to NULL if length is 0 in
 INIT_UDATA()

Trying to have a ternary operator to choose between NULL (or 0) and the
real pointer value in invocations leads to an impossible choice between
a sparse error about a literal 0 used as a NULL pointer, and a gcc
warning about pointer/integer type mismatch in conditional expression.

Rather than clutter the source with more casts, move the ternary
operator into the INIT_UDATA() macro, which makes it easier to use and
simplifies its callers.

Reported-by: Yann Droneaud ydrone...@opteya.com
Signed-off-by: Roland Dreier rol...@purestorage.com
---
 drivers/infiniband/core/uverbs.h  | 12 ++--
 drivers/infiniband/core/uverbs_main.c | 11 ---
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h
index 9879568aed8c..d2defbbdb5da 100644
--- a/drivers/infiniband/core/uverbs.h
+++ b/drivers/infiniband/core/uverbs.h
@@ -47,12 +47,12 @@
 #include rdma/ib_umem.h
 #include rdma/ib_user_verbs.h

-#define INIT_UDATA(udata, ibuf, obuf, ilen, olen)\
-do {\
-(udata)-inbuf  = (const void __user *) (ibuf);\
-(udata)-outbuf = (void __user *) (obuf);\
-(udata)-inlen  = (ilen);\
-(udata)-outlen = (olen);\
+#define INIT_UDATA(udata, ibuf, obuf, ilen, olen)\
+do {\
+(udata)-inbuf  = (ilen) ? (const void __user *) (ibuf) : NULL;\
+(udata)-outbuf = (olen) ? (void __user *) (obuf) : NULL;\
+(udata)-inlen  = (ilen);\
+(udata)-outlen = (olen);\
 } while (0)

 /*
diff --git a/drivers/infiniband/core/uverbs_main.c
b/drivers/infiniband/core/uverbs_main.c
index 34386943ebcf..76b6f217a13e 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -676,15 +676,12 @@ static ssize_t ib_uverbs_write(struct file
*filp, const char __user *buf,
 return -EINVAL;
 }

-INIT_UDATA(ucore,
-   (hdr.in_words) ? buf : 0,
-   (unsigned long)ex_hdr.response,
-   hdr.in_words * 8,
-   hdr.out_words * 8);
+INIT_UDATA(ucore, buf, (unsigned long)ex_hdr.response,
+   hdr.in_words * 8, hdr.out_words * 8);

 INIT_UDATA(uhw,
-   (ex_hdr.provider_in_words) ? buf + ucore.inlen : 0,
-   (ex_hdr.provider_out_words) ? (unsigned
long)ex_hdr.response + ucore.outlen : 0,
+   buf + ucore.inlen,
+   (unsigned long) ex_hdr.response + ucore.outlen,
ex_hdr.provider_in_words * 8,
ex_hdr.provider_out_words * 8);
--
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


  1   2   3   4   5   6   7   8   9   10   >