[PATCH 2/2] iser-target: Remove duplicate function names

2015-02-05 Thread Rasmus Villemoes
The macro isert_dbg already ensures that __func__ is part of the output, so there's no reason to duplicate the function name in the format string itself. Signed-off-by: Rasmus Villemoes --- drivers/infiniband/ulp/isert/ib_isert.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff

[PATCH 1/2] infiniband: nes: Remove duplicate function names

2015-02-05 Thread Rasmus Villemoes
The macro nes_debug already ensures that __func__ (and __LINE__) is part of the output, so there's no reason to duplicate the function name in the format string itself. Signed-off-by: Rasmus Villemoes --- drivers/infiniband/hw/nes/nes.c | 2 +- drivers/infiniband/hw/nes/nes_cm.c| 8 +++

RE: [PATCH 1/2] infiniband: cxgb4: Fix some format strings

2015-02-05 Thread Steve Wise
Acked-by: Steve Wise > -Original Message- > From: linux-rdma-ow...@vger.kernel.org > [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Rasmus Villemoes > Sent: Thursday, February 05, 2015 5:33 PM > To: Steve Wise; Roland Dreier; Sean Hefty; Hal Rosenstock > Cc: Rasmus Villemoes; lin

[PATCH 2/2] infiniband: Fix duplicate KERN_* level

2015-02-05 Thread Rasmus Villemoes
The pr_* macros already supply the relevant KERN_* level; any extra just ends up as garbage in the output. Signed-off-by: Rasmus Villemoes --- drivers/infiniband/hw/mlx4/main.c | 3 +-- drivers/infiniband/hw/mlx5/qp.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH 1/2] infiniband: cxgb4: Fix some format strings

2015-02-05 Thread Rasmus Villemoes
PDBG prepends MOD (which expands to "iw_cxgb4" ":") to the format string. So the KERN_INFO just ends up in the middle where it just garbles the output. At the same place, there's obviously no reason to add MOD explicitly. The two other are straight-forward fixes of KERN_ERR KERN_ERR, where the sec

RE: [PATCH RE-RESEND V2 for-next 4/5] IB/core: Make sure that the PSN does not overflow

2015-02-05 Thread Weiny, Ira
> Subject: [PATCH RE-RESEND V2 for-next 4/5] IB/core: Make sure that the PSN > does not overflow Is there a particular bug which this fixes? Ira > > From: Majd Dibbiny > > The rq/sq->psn is 24 bits as defined in the IB spec, therefore ULPs and User > space applications shouldn't use the 8 mo

[PATCH] Revert "IB/core: Add support for extended query device caps"

2015-02-05 Thread Yann Droneaud
While commit 7e36ef8205ff ("IB/core: Temporarily disable ex_query_device uverb") is correct as it make the extended QUERY_DEVICE uverb as integrated as part of commit 5a77abf9a97a ("IB/core: Add support for extended query device caps") and commit 860f10a799c8 ("IB/core: Add flags for on demand pag

[GIT PULL] Please pull an NFSoRDMA fix

2015-02-05 Thread Anna Schumaker
Hi Trond, The following changes since commit a0a1d50cd1e80652142af5cddcde500d06c71bdd: xprtrdma: Update the GFP flags used in xprt_rdma_allocate() (2015-01-30 12:18:48 -0500) are available in the git repository at: git://git.linux-nfs.org/projects/anna/nfs-rdma.git tags/nfs-rdma-for-3.20-

Re: [PATCH V2 for-next 3/5] IB/core: Call ib_unregister_mad_agent() only for valid agents

2015-02-05 Thread Jason Gunthorpe
On Thu, Feb 05, 2015 at 12:12:16PM +0200, Or Gerlitz wrote: > diff --git a/drivers/infiniband/hw/mlx4/mad.c > b/drivers/infiniband/hw/mlx4/mad.c > index 82a7dd8..6be0d2c 100644 > +++ b/drivers/infiniband/hw/mlx4/mad.c > @@ -907,7 +907,7 @@ int mlx4_ib_mad_init(struct mlx4_ib_dev *dev) > err: >

Re: [PATCH] InfiniBand: Delete unnecessary checks before the function, call "srp_destroy_fr_pool"

2015-02-05 Thread Bart Van Assche
On 02/05/15 13:26, SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 5 Feb 2015 13:20:42 +0100 > > The srp_destroy_fr_pool() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detected by using th

[PATCH libmlx4 1/2] Add Memory Windows support

2015-02-05 Thread Majd Dibbiny
Implement the following libibvebrs Memory Window verbs: 1. ibv_alloc_mw 2. ibv_dealloc_mw 3. ibv_bind_mw Signed-off-by: Majd Dibbiny --- src/cq.c|3 ++ src/mlx4.c |3 ++ src/mlx4.h |5 src/qp.c| 54 + src/verbs.c | 65

[PATCH libmlx4 2/2] Implement Send with invalidate

2015-02-05 Thread Majd Dibbiny
Send with invalidate can be used to invalidate a remote memory region or memory window. The complete details are specified in the InfiniBand Architecture Specifications, section 9.4.1.1. According to the specs, the following objects can be invalidated: 1. Memory Window type 2 2. Physical MR 3. Fa

[PATCH libmlx4 0/2] Memory Windows implementation

2015-02-05 Thread Majd Dibbiny
This patch set implements the Memory Windows support that was introduced in libibverbs: http://www.mail-archive.com/linux-rdma@vger.kernel.org/msg22856.html This patch set includes two patches: Patch #1: Implements the Memory Windows verbs; ibv_alloc_mw, ibv_bind_mw and ibv_dealloc_mw. Patch #2: I

[PATCH] InfiniBand: Delete unnecessary checks before the function, call "srp_destroy_fr_pool"

2015-02-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Feb 2015 13:20:42 +0100 The srp_destroy_fr_pool() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH infiniband-diags] Add new configure flag to enable/disable the rdma-ndd build

2015-02-05 Thread Hal Rosenstock
From: Dan Ben Yosef Add new flag --enable-rdma-ndd (default=yes) Signed-off-by: Dan Ben Yosef --- diff --git a/Makefile.am b/Makefile.am index 4e08c2b..63c4b48 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,9 +15,11 @@ sbin_PROGRAMS = src/ibaddr src/ibnetdiscover src/ibping src/ibportstate

[PATCH RE-RESEND V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow

2015-02-05 Thread Or Gerlitz
From: Moshe Lazer The deadlock occurs on __uverbs_modify_qp, we take a lock (idr_read_qp) and in case of failure in ib_resolve_eth_l2_attrs we don't release it (put_qp_read). Fix that. Issue: 355606 Fixes: ed4c54e5b4ba ("IB/core: Resolve Ethernet L2 addresses when modifying QP") Signed-off-by: M

[PATCH RE-RESEND V2 for-next 1/5] IB/core: When marshaling ucma path from user-space, clear unused fields

2015-02-05 Thread Or Gerlitz
From: Ilya Nelkenbaum When marsheling a user path to the kernel struct ib_sa_path, need to zero smac, dmac and set the vlan id to the "no vlan" value. This is to ensure that Ethernet attributes are not used with InfiniBand QPs. Fixes: dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm s

[PATCH RE-RESEND V2 for-next 0/5] IB core fixes 29-Jan-2015

2015-02-05 Thread Or Gerlitz
-- re-resent due to Gerrit IDs that were left by mistake, sorry for spamming you over (and over) Hi Roland, This is a batch with small IB core fixes, please apply for 3.20 There's one fix which touches few HW drivers to make sure they invoke ib_unregister_mad_agent() only for valid cases in the

[PATCH RE-RESEND V2 for-next 4/5] IB/core: Make sure that the PSN does not overflow

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny The rq/sq->psn is 24 bits as defined in the IB spec, therefore ULPs and User space applications shouldn't use the 8 most significant bits in the 32 bits variables to avoid overflow in modify_qp. Fixed the PSN generation by the RDMA-CM to mask out the 8 most significant bits, a

[PATCH RE-RESEND V2 for-next 2/5] IB/core: Fixes in ib_sa_add_one error flow

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny Fixed off-by-one bug, we need to decrement the port number only after we released the resources to the current port. Call ib_unregister_mad_agent only for cases where ib_register_mad_agent succeeded. Separate the ib_register_event_handler() call error flow from the loop erro

[PATCH RE-RESEND V2 for-next 3/5] IB/core: Call ib_unregister_mad_agent() only for valid agents

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny In some error flows, ib_mad_unregister_agent is being invoked also in cases where the ib_mad_register_agent call failed (resulting in an illegal pointer in the agent field). This causes a kernel crash in the error flow. Fix this by calling ib_unregister_mad_agent only for ca

[PATCH RESEND V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow

2015-02-05 Thread Or Gerlitz
From: Moshe Lazer The deadlock occurs on __uverbs_modify_qp, we take a lock (idr_read_qp) and in case of failure in ib_resolve_eth_l2_attrs we don't release it (put_qp_read). Fix that. Issue: 355606 Fixes: ed4c54e5b4ba ("IB/core: Resolve Ethernet L2 addresses when modifying QP") Signed-off-by: M

[PATCH RESEND V2 for-next 4/5] IB/core: Make sure that the PSN does not overflow

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny The rq/sq->psn is 24 bits as defined in the IB spec, therefore ULPs and User space applications shouldn't use the 8 most significant bits in the 32 bits variables to avoid overflow in modify_qp. Fixed the PSN generation by the RDMA-CM to mask out the 8 most significant bits, a

[PATCH RESEND V2 for-next 2/5] IB/core: Fixes in ib_sa_add_one error flow

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny Fixed off-by-one bug, we need to decrement the port number only after we released the resources to the current port. Call ib_unregister_mad_agent only for cases where ib_register_mad_agent succeeded. Separate the ib_register_event_handler() call error flow from the loop erro

[PATCH RESEND V2 for-next 0/5] IB core fixes 29-Jan-2015

2015-02-05 Thread Or Gerlitz
-- resent due to Gerrit IDs that were left by mistake, sorry for spamming you over Hi Roland, This is a batch with small IB core fixes, please apply for 3.20 There's one fix which touches few HW drivers to make sure they invoke ib_unregister_mad_agent() only for valid cases in their error flows

[PATCH RESEND V2 for-next 1/5] IB/core: When marshaling ucma path from user-space, clear unused fields

2015-02-05 Thread Or Gerlitz
From: Ilya Nelkenbaum When marsheling a user path to the kernel struct ib_sa_path, need to zero smac, dmac and set the vlan id to the "no vlan" value. This is to ensure that Ethernet attributes are not used with InfiniBand QPs. Fixes: dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm s

[PATCH RESEND V2 for-next 3/5] IB/core: Call ib_unregister_mad_agent() only for valid agents

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny In some error flows, ib_mad_unregister_agent is being invoked also in cases where the ib_mad_register_agent call failed (resulting in an illegal pointer in the agent field). This causes a kernel crash in the error flow. Fix this by calling ib_unregister_mad_agent only for ca

[PATCH libibverbs 3/3] Add Send with invalidate support

2015-02-05 Thread majd
From: Majd Dibbiny Send with invalidate can be used to invalidate a remote memory region or memory window. The complete details are specified in the InfiniBand Architecture Specifications, section 9.4.1.1. According to the specs, the following objects can be invalidated: 1. Memory Window type 2

[PATCH libibverbs 2/3] Add Memory Windows support

2015-02-05 Thread majd
From: Majd Dibbiny Memory Windows(MW) is a method to raise the remote privileges of memory range within a Memory Region(MR). A MW is allocated using ibv_alloc_mw, and for it to be useful it should be bound to a MR using ibv_bind_mw. The bind operation generates a new R_key with the new permissi

[PATCH libibverbs 0/3] Memory Windows support

2015-02-05 Thread majd
From: Majd Dibbiny Overview: Memory Windows(MW) is a method to raise the remote privileges of memory range within a Memory Region(MR). A MW is allocated using ibv_alloc_mw, and for it to be useful it should be bound to a MR. A MW can be bound to a MR according to it's type: 1. Type 1 MW: Using

[PATCH libibverbs 1/3] Update ibv_post_send manual page

2015-02-05 Thread majd
From: Majd Dibbiny Align the ibv_send_wr structure according to the infiniband/verbs.h Signed-off-by: Majd Dibbiny --- man/ibv_post_send.3 | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/man/ibv_post_send.3 b/man/ibv_post_send.3 index 33fbb50..9571575 100644

[PATCH V2 for-next 2/5] IB/core: Fixes in ib_sa_add_one error flow

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny Fixed off-by-one bug, we need to decrement the port number only after we released the resources to the current port. Call ib_unregister_mad_agent only for cases where ib_register_mad_agent succeeded. Separate the ib_register_event_handler() call error flow from the loop erro

[PATCH V2 for-next 5/5] IB/core: Fix deadlock on uverbs modify_qp error flow

2015-02-05 Thread Or Gerlitz
From: Moshe Lazer The deadlock occurs on __uverbs_modify_qp, we take a lock (idr_read_qp) and in case of failure in ib_resolve_eth_l2_attrs we don't release it (put_qp_read). Fix that. Issue: 355606 Fixes: ed4c54e5b4ba ("IB/core: Resolve Ethernet L2 addresses when modifying QP") Signed-off-by: M

[PATCH V2 for-next 4/5] IB/core: Make sure that the PSN does not overflow

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny The rq/sq->psn is 24 bits as defined in the IB spec, therefore ULPs and User space applications shouldn't use the 8 most significant bits in the 32 bits variables to avoid overflow in modify_qp. Fixed the PSN generation by the RDMA-CM to mask out the 8 most significant bits, a

[PATCH V2 for-next 3/5] IB/core: Call ib_unregister_mad_agent() only for valid agents

2015-02-05 Thread Or Gerlitz
From: Majd Dibbiny In some error flows, ib_mad_unregister_agent is being invoked also in cases where the ib_mad_register_agent call failed (resulting in an illegal pointer in the agent field). This causes a kernel crash in the error flow. Fix this by calling ib_unregister_mad_agent only for ca

[PATCH V2 for-next 1/5] IB/core: When marshaling ucma path from user-space, clear unused fields

2015-02-05 Thread Or Gerlitz
From: Ilya Nelkenbaum When marsheling a user path to the kernel struct ib_sa_path, need to zero smac, dmac and set the vlan id to the "no vlan" value. This is to ensure that Ethernet attributes are not used with InfiniBand QPs. Fixes: dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm s

[PATCH V2 for-next 0/5] IB core fixes 29-Jan-2015

2015-02-05 Thread Or Gerlitz
Hi Roland, This is a batch with small IB core fixes, please apply for 3.20 There's one fix which touches few HW drivers to make sure they invoke ib_unregister_mad_agent() only for valid cases in their error flows. There's a pending CMA patch we sent for 3.19 and was approved by Sean, please pick

Re: [PATCH] net: Mellanox: Delete unnecessary checks before the function call "vunmap"

2015-02-05 Thread David Miller
From: SF Markus Elfring Date: Wed, 04 Feb 2015 15:22:33 +0100 > From: Markus Elfring > Date: Wed, 4 Feb 2015 15:17:00 +0100 > > The vunmap() function performs also input parameter validation. > Thus the test around the call is not needed. > > This issue was detected by using the Coccinelle sof

Re: [PATCH v1 1/5] IB/uverbs: ex_query_device: answer must not depend on request's comp_mask

2015-02-05 Thread Haggai Eran
On 05/02/2015 04:54, Weiny, Ira wrote: >> >> On Thu, Jan 29, 2015 at 09:50:38PM +0100, Yann Droneaud wrote: >> >>> Anyway, I recognize that uverb way of abusing write() syscall is >>> borderline (at best) regarding other Linux subsystems and Unix >>> paradigm in general. But it's not enough to scre