Re: [PATCH v2 2/2] x86/mm/pat, drivers/media/ivtv: move pat warn and replace WARN() with pr_warn()

2015-06-25 Thread Ingo Molnar
* Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com On built-in kernels this warning will always splat as this is part of the module init. Fix that by shifting the PAT requirement check out under the code that does the quasi-probe for the device. This

Re: [PATCH v2 1/2] x86/mm/pat, drivers/infiniband/ipath: replace WARN() with pr_warn()

2015-06-25 Thread Ingo Molnar
* Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com WARN() may confuse users, fix that. ipath_init_one() is part the device's probe so this would only be triggered if a corresponding device was found. Signed-off-by: Luis R. Rodriguez

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Steve Wise
-Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Jason Gunthorpe Sent: Thursday, June 25, 2015 2:30 PM To: Steve Wise Cc: 'Hefty, Sean'; linux-rdma@vger.kernel.org; sa...@mellanox.com; orgerl...@mellanox.com; 'Roi

RE: [GIT] Networking

2015-06-25 Thread Weiny, Ira
Please accept my apologies. The original patch used WARN_ON but I was advised to use BUG_ON in a review and I should have thought about it more rather than blindly make the change. Ira, Can you please point me to the review thread where this advise was made? I can't track it. In

[PATCH] IB/srp: Avoid using uninitialized variable

2015-06-25 Thread Sagi Grimberg
We might return res which is not initialized. Also reduce code duplication by exporting srp_parse_tmo so srp_tmo_set can reuse it. Detected by Coverity. Signed-off-by: Sagi Grimberg sa...@mellanox.com Signed-off-by: Jenny Falkovich jen...@mellanox.com --- drivers/infiniband/ulp/srp/ib_srp.c |

[PATCH V2] IB/mad: Remove improper use of BUG_ON

2015-06-25 Thread ira . weiny
From: Ira Weiny ira.we...@intel.com We recently added BUG_ON's which were inappropriate for a condition which should never happen. Change these to be WARN_ON_ONCE as a debugging aid. Fixes: 4cd7c9479aff ('IB/mad: Add support for additional MAD info to/from drivers') Signed-off-by: Ira Weiny

[PATCH V2] IB/mad: Fix 0-day build

2015-06-25 Thread ira . weiny
From: Ira Weiny ira.we...@intel.com Commit 3d33f9d9fea0 IB/mad: Add final OPA MAD processing Added a 0-day build error which did not appear until building with the OPA driver sent to the list. Signed-off-by: Ira Weiny ira.we...@intel.com Reviewed-by: Mike Marciniszyn mike.marcinis...@intel.com

Re: [PATCH for-next V5 1/5] IB/uverbs: Fix reference counting usage of event files

2015-06-25 Thread Yishai Hadas
On 6/24/2015 8:57 PM, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 05:47:14PM +0300, Yishai Hadas wrote: fd_install(resp.async_fd, filp); @@ -386,6 +376,7 @@ ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file, return in_len; err_file: +

Re: [PATCH for-next V5 3/5] IB/uverbs: Enable device removal when there are active user space applications

2015-06-25 Thread Yishai Hadas
On 6/24/2015 9:25 PM, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 05:47:16PM +0300, Yishai Hadas wrote: +++ b/drivers/infiniband/core/uverbs_main.c @@ -137,7 +137,12 @@ static void ib_uverbs_release_dev(struct kref *ref) struct ib_uverbs_device *dev =

Re: [GIT] Networking

2015-06-25 Thread Or Gerlitz
On Thu, Jun 25, 2015 at 4:52 AM, Weiny, Ira ira.we...@intel.com wrote: Linus, On the *other* side of the same conflict, I find an even more offensive commit, namely commit 4cd7c9479aff (IB/mad: Add support for additional MAD info to/from drivers) which adds a BUG_ON() for a sanity check,

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Steve Wise
I don't understand why iWarp HW choose to ignore the verbs spec and not use IB_ACCESS_LOCAL_WRITE to cover RDMA READ responses... The iWARP verbs spec mandates this. Steve. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to

[PATCH RFC] RDMA/core: add rdma_get_dma_mr()

2015-06-25 Thread Steve Wise
The semantics for MR access rights are not consistent across RDMA protocols. So rather than have applications try and glean what they need, have them pass in the intended roles for the MR to be allocated and let the RDMA core select the appropriate access rights given the roles and device

[PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Steve Wise
Memory regions that are the target of an iWARP RDMA READ RESPONSE need REMOTE_WRITE access rights. So enable REMOTE_WRITE for iWARP devices. iWARP RDMA READ target sge depth is 1. So save the max_read_sge in the target device structure and use that when creating RDMA_READ work requests.

[PATCH RFC 1/2] RDMA/iser: limit sg tablesize on device fastreg max depth

2015-06-25 Thread Steve Wise
Signed-off-by: Steve Wise sw...@opengridcomputing.com Tested-by: Vasu Dev vasu@intel.com --- drivers/infiniband/ulp/iser/iscsi_iser.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c

[PATCH RFC 0/2] iSER support for iWARP

2015-06-25 Thread Steve Wise
The following series implements support for iWARP transpors in the iSER initiator and target. This is based on Doug's k.o/for-4.2 branch. --- Steve Wise (2): RDMA/iser: limit sg tablesize on device fastreg max depth RDMA/isert: Support iWARP transport

[PATCH] IB/cm: Do not queue a work when the device is going to be removed

2015-06-25 Thread Erez Shitrit
Whenever ib_cm gets remove_one call, like when there is a hot-unplug event, the driver should mark itself as going_down and confirm that no new works are going to be queued for that device. so, the order of the actions are: 1. mark the going_down bit. 2. flush the wq. 3. [make sure no new works

[infiniband-diags PATCH 1/2] rdma-ndd: never use udev_get_sys_path()

2015-06-25 Thread Michal Schmidt
The function was deprecated and later dropped by udev entirely because it was pointless. Quoting kernel's Documentation/sysfs-rules.txt: sysfs is always at /sys Parsing /proc/mounts is a waste of time. Other mount points are a system configuration bug you should not try to solve. [...]

[infiniband-diags PATCH 0/2] libudev usage fixes

2015-06-25 Thread Michal Schmidt
Hello, the first patch simplifies code. The second patch fixes an overlinking issue. Regards, Michal Michal Schmidt (2): rdma-ndd: never use udev_get_sys_path() build-sys: avoid overlinking to libudev Makefile.am| 6 ++ configure.ac | 10 +- src/rdma-ndd.c | 19

[infiniband-diags PATCH 2/2] build-sys: avoid overlinking to libudev

2015-06-25 Thread Michal Schmidt
Not all built binaries need to link to udev, only rdma-ndd. Use pkg-config to detect udev in configure.ac. Signed-off-by: Michal Schmidt mschm...@redhat.com --- Makefile.am | 6 ++ configure.ac | 9 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile.am

Re: [PATCH] IB/srp: Avoid using uninitialized variable

2015-06-25 Thread Bart Van Assche
On 06/25/15 03:34, Sagi Grimberg wrote: We might return res which is not initialized. Also reduce code duplication by exporting srp_parse_tmo so srp_tmo_set can reuse it. Good catch. Reviewed-by: Bart Van Assche bart.vanass...@sandisk.com -- To unsubscribe from this list: send the line

[PATCH] IB/mlx4: Use flow-counters for process_mad only when appropriate

2015-06-25 Thread Or Gerlitz
For IB links, reading HCA flow counters through iboe_process_mad() should be used when mlx4_ib_process_mad() is invoked only for VFs PMA queries and exactly nothing else. Fixes: 7193a141eb74 ('IB/mlx4: Set VF to read from QP counters') Reported-by: Linus Torvalds torva...@linux-foundation.org

RE: [PATCH V2] IB/mad: Remove improper use of BUG_ON

2015-06-25 Thread Weiny, Ira
On 6/25/2015 4:52 PM, ira.we...@intel.com wrote: From: Ira Weinyira.we...@intel.com We recently added BUG_ON's which were inappropriate for a condition which should never happen. Change these to be WARN_ON_ONCE as a debugging aid. Fixes: 4cd7c9479aff ('IB/mad: Add support for

Re: [PATCH V2] IB/mad: Remove improper use of BUG_ON

2015-06-25 Thread Or Gerlitz
On 6/25/2015 4:52 PM, ira.we...@intel.com wrote: From: Ira Weinyira.we...@intel.com We recently added BUG_ON's which were inappropriate for a condition which should never happen. Change these to be WARN_ON_ONCE as a debugging aid. Fixes: 4cd7c9479aff ('IB/mad: Add support for additional MAD

[PATCH V3] IB/mad: Fix 0-day build

2015-06-25 Thread ira . weiny
From: Ira Weiny ira.we...@intel.com The define OPA_LID_PERMISSIVE is big endian and was compared to cpu value opa_drslid. 0-day build caught this while building with the OPA (hfi1) driver which was recently sent to the list. Fixes: 8e4349d13f33 (IB/mad: Add final OPA MAD processing)

Re: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Sagi Grimberg
On 6/25/2015 6:39 PM, Steve Wise wrote: Memory regions that are the target of an iWARP RDMA READ RESPONSE need REMOTE_WRITE access rights. So enable REMOTE_WRITE for iWARP devices. iWARP RDMA READ target sge depth is 1. So save the max_read_sge in the target device structure and use that when

Re: [PATCH v2 2/2] x86/mm/pat, drivers/media/ivtv: move pat warn and replace WARN() with pr_warn()

2015-06-25 Thread Luis R. Rodriguez
On Thu, Jun 25, 2015 at 08:51:47AM +0200, Ingo Molnar wrote: * Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com On built-in kernels this warning will always splat as this is part of the module init. Fix that by shifting the PAT requirement

Re: [PATCH RFC 1/2] RDMA/iser: limit sg tablesize on device fastreg max depth

2015-06-25 Thread Sagi Grimberg
On 6/25/2015 6:39 PM, Steve Wise wrote: Signed-off-by: Steve Wise sw...@opengridcomputing.com Tested-by: Vasu Dev vasu@intel.com --- drivers/infiniband/ulp/iser/iscsi_iser.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git

RE: [PATCH RFC 0/2] iSER support for iWARP

2015-06-25 Thread Steve Wise
-Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Sagi Grimberg Sent: Thursday, June 25, 2015 11:58 AM To: Steve Wise; linux-rdma@vger.kernel.org Cc: Or Gerlitz; Roi Dayan; target-devel; Nicholas A. Bellinger Subject:

Re: [PATCH] IB/cm: Do not queue a work when the device is going to be removed

2015-06-25 Thread Bart Van Assche
On 06/25/2015 07:13 AM, Erez Shitrit wrote: @@ -3864,14 +3904,23 @@ static void cm_remove_one(struct ib_device *ib_device) list_del(cm_dev-list); write_unlock_irqrestore(cm.device_lock, flags); + spin_lock_irq(cm.lock); + cm_dev-going_down = 1; +

Re: [PATCH RFC 0/2] iSER support for iWARP

2015-06-25 Thread Sagi Grimberg
On 6/25/2015 6:39 PM, Steve Wise wrote: The following series implements support for iWARP transpors in the iSER initiator and target. This is based on Doug's k.o/for-4.2 branch. Hi Steve, Thanks for this set, Can you please rebase for target-pending/master? or at least submit on top of:

Re: [PATCH for-next V5 3/5] IB/uverbs: Enable device removal when there are active user space applications

2015-06-25 Thread Jason Gunthorpe
On Thu, Jun 25, 2015 at 04:51:49PM +0300, Yishai Hadas wrote: On 6/24/2015 9:25 PM, Jason Gunthorpe wrote: Is not holding the RCU lock while ib_uverbs_release_dev is reading ib_dev. The barriers in kref are not strong enough to guarentee the RCU protected data will be visible. (remember when I

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Steve Wise
-Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Sagi Grimberg Sent: Thursday, June 25, 2015 11:51 AM To: Steve Wise; linux-rdma@vger.kernel.org Cc: Or Gerlitz; Roi Dayan; target-devel Subject: Re: [PATCH RFC 2/2]

Re: [PATCH V3] IB/mad: Fix 0-day build

2015-06-25 Thread Bart Van Assche
On 06/25/2015 09:04 AM, ira.we...@intel.com wrote: From: Ira Weiny ira.we...@intel.com The define OPA_LID_PERMISSIVE is big endian and was compared to cpu value opa_drslid. 0-day build caught this while building with the OPA (hfi1) driver which was recently sent to the list. Fixes:

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Hefty, Sean
+* IWARP transports need REMOTE_WRITE for MRs used as the target of +* an RDMA_READ. Since the DMA MR is used for all ports, then if +* any port is running IWARP, add REMOTE_WRITE. +*/ + if (any_port_is_iwarp(device)) It would be nice to have a new-style cap test

Re: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Jason Gunthorpe
On Thu, Jun 25, 2015 at 10:39:23AM -0500, Steve Wise wrote: + /* + * IWARP transports need REMOTE_WRITE for MRs used as the target of + * an RDMA_READ. Since the DMA MR is used for all ports, then if + * any port is running IWARP, add REMOTE_WRITE. + */ + if

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Steve Wise
-Original Message- From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] Sent: Thursday, June 25, 2015 1:25 PM To: Steve Wise Cc: linux-rdma@vger.kernel.org; sa...@mellanox.com; orgerl...@mellanox.com; r...@mellanox.com Subject: Re: [PATCH RFC 2/2] RDMA/isert: Support

Re: [PATCH for-next V6 00/10] Move RoCE GID management to IB/Core

2015-06-25 Thread Jason Gunthorpe
On Thu, Jun 25, 2015 at 11:34:43AM +0300, Or Gerlitz wrote: So... are we finally OK wrt the feedback you provided? I've been looking at Yishai's series, I though it was almost good to go, but the error flows are still wrong :( For Matan's patch, I only looked briefly, merging it with the

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Steve Wise
-Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Hefty, Sean Sent: Thursday, June 25, 2015 1:30 PM To: Jason Gunthorpe; Steve Wise Cc: linux-rdma@vger.kernel.org; sa...@mellanox.com; orgerl...@mellanox.com;

Re: [PATCH for-next V5 1/5] IB/uverbs: Fix reference counting usage of event files

2015-06-25 Thread Jason Gunthorpe
On Thu, Jun 25, 2015 at 02:46:02PM +0300, Yishai Hadas wrote: On 6/24/2015 8:57 PM, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 05:47:14PM +0300, Yishai Hadas wrote: fd_install(resp.async_fd, filp); @@ -386,6 +376,7 @@ ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file,

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Hefty, Sean
How would you envision doing this? At the time a MR is registered the device driver doesn't know if the application will be doing RDMA reads or not on that MR. I was thinking of checking for REMOTE_READ, but that doesn't work on the initiator side. I guess you could a READ_DEST(SOURCE?

Re: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Jason Gunthorpe
On Thu, Jun 25, 2015 at 06:45:56PM +, Hefty, Sean wrote: How would you envision doing this? At the time a MR is registered the device driver doesn't know if the application will be doing RDMA reads or not on that MR. I was thinking of checking for REMOTE_READ, but that doesn't work

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Hefty, Sean
What about moving to something more specific? Encode the allowed verbs in the access flag? This makes more sense to me. Something like: SEND, RECV, INIT READ, INIT WRITE, READ TARGET, WRITE TARGET, etc. We're close to this, but it's not clear, for example, what flags are needed for a

RE: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Steve Wise
-Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Hefty, Sean Sent: Thursday, June 25, 2015 2:20 PM To: Jason Gunthorpe Cc: Steve Wise; linux-rdma@vger.kernel.org; sa...@mellanox.com; orgerl...@mellanox.com; Roi

Re: [PATCH RFC 2/2] RDMA/isert: Support iWARP transport

2015-06-25 Thread Jason Gunthorpe
On Thu, Jun 25, 2015 at 02:25:49PM -0500, Steve Wise wrote: To stage the changes we could introduce a new function that returns the needed ib_access_flags value given the desired opcodes. Then have a series that changes all the existing ULPs to make use of this new function. I wouldn't be

Re: [PATCH RFC] RDMA/core: add rdma_get_dma_mr()

2015-06-25 Thread Jason Gunthorpe
On Thu, Jun 25, 2015 at 04:29:17PM -0500, Steve Wise wrote: - * ib_dma_mapping_error - check a DMA addr for error + * rdma_mr_roles - possible roles a MR will be used for + * + * This allows a transport independent RDMA application to + * create MRs that are usable for all the desired roles

RE: [PATCH RFC] RDMA/core: add rdma_get_dma_mr()

2015-06-25 Thread Steve Wise
-Original Message- From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] Sent: Thursday, June 25, 2015 4:40 PM To: Steve Wise Cc: sa...@mellanox.com; r...@mellanox.com; ogerl...@mellanox.com; sean.he...@intel.com; linux-rdma@vger.kernel.org Subject: Re: [PATCH RFC]

Re: [PATCH v6 4/4] IB/sa: Route SA pathrecord query through netlink

2015-06-25 Thread Jason Gunthorpe
On Fri, Jun 12, 2015 at 10:06:06AM -0400, kaike@intel.com wrote: This patch routes a SA pathrecord query to netlink first and processes the response appropriately. If a failure is returned, the request will be sent through IB. The decision whether to route the request to netlink first is

RE: [PATCH RFC] RDMA/core: add rdma_get_dma_mr()

2015-06-25 Thread Hefty, Sean
+enum rdma_mr_roles { I would drop naming the enum - it shouldn't be used, as the values are bit flags. + RDMA_MRR_RECV = 1, + RDMA_MRR_SEND = (11), + RDMA_MRR_READ_SOURCE= (12), + RDMA_MRR_READ_SINK = (13), +

Re: [PATCH for-next V6 00/10] Move RoCE GID management to IB/Core

2015-06-25 Thread Or Gerlitz
On Wed, Jun 24, 2015 at 3:59 PM, Matan Barak mat...@mellanox.com wrote: [...] Changes from V5: (1) Incoporate the changes to cache.c so we use the same infrastructure to manage both IB and RoCE (per Doug's request) (2) Replace the locking mechanism in the IB core GID cache from seqcount +

Re: COMMERCIAL: [PATCH] IB/mad: Remove improper use of BUG_ON

2015-06-25 Thread Or Gerlitz
On 6/25/2015 4:50 AM, ira.we...@intel.com wrote: From: Ira Weinyira.we...@intel.com commit 97f229a8515f932e5adc6cdfa18cc1440235b9fd IB/mad: Add support for additional MAD info to/from drivers added BUG_ON's which were inappropriate for a condition which should never happen. Change these to be