RE: [PATCHv3 infiniband-diags] iblinkinfo.c: Close additional file descriptor in advance

2015-08-02 Thread Weiny, Ira
 
 
 Additional file descriptor for SMP MADs should be closed before running
 ibnd_discover_fabric() to avoid parallel usage of two SMP file descriptors
 
 Signed-off-by: Vladimir Koushnir vladim...@mellanox.com
 Signed-off-by: Hal Rosenstock h...@mellanox.com

Thanks applied,
Ira



--
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 12/22] IB/iser: Introduce iser_reg_ops

2015-08-02 Thread Sagi Grimberg

On 7/30/2015 8:25 PM, Jason Gunthorpe wrote:

On Thu, Jul 30, 2015 at 10:05:53AM -0500, Steve Wise wrote:

+int iser_assign_reg_ops(struct iser_device *device)
+{
+   struct ib_device_attr *dev_attr = device-dev_attr;
+
+   /* Assign function handles  - based on FMR support */
+   if (device-ib_device-alloc_fmr  device-ib_device-dealloc_fmr 
+   device-ib_device-map_phys_fmr  device-ib_device-unmap_fmr) {
+   iser_info(FMR supported, using FMR for registration\n);
+   device-reg_ops = fmr_ops;
+   } else
+   if (dev_attr-device_cap_flags  IB_DEVICE_MEM_MGT_EXTENSIONS) {
+   iser_info(FastReg supported, using FastReg for 
registration\n);
+   device-reg_ops = fastreg_ops;
+   } else {
+   iser_err(IB device does not support FMRs nor FastRegs, can't 
register memory\n);
+   return -1;
+   }
+


Perhaps no device supports both FMR and FRMR, but the above code would
choose FMR over FRMR.  Shouldn't it be the other way around?


Agree. We should always prefer FRMR. Many of the IB drivers support
both..


I agree,

I planned to change that as part of my remote invalidate support
patches. Would it be acceptable to hold that off for the next cycle?
--
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 V7 00/10] Move RoCE GID management to IB/Core

2015-08-02 Thread Matan Barak



On 8/2/2015 12:48 AM, Or Gerlitz wrote:

On Sat, Aug 1, 2015 at 1:01 AM, Jason Gunthorpe
jguntho...@obsidianresearch.com wrote:

On Sat, Aug 01, 2015 at 12:24:23AM +0300, Or Gerlitz wrote:


addressed in incremental patch, as Doug suggested. Jason, it's wrong
to send developers again and again to fix things which were
perfect in Vn-1 but also not being covered by reviewers on Vn-1, at
some point the reviewer can't load new comments which gate the


I don't even know what you are talking about Or.

v6 had some small problems in the logic and v7 introduces a fairly
serious flaw while trying to fix them. IMHO, you are better to merge
v6 than v7, at least v6's problems are less likely to be serious.


Jason, can you be more specific? I don't see any comments from you
expect for the cover-letter, so if something broke out, sure, a fix is
needed, but what is that?


That is the same argument you used for the timestamp _ex UAPI mess,
last cycle, where are the incremental fixes for that?


I remember you have provided review comment which pointed that the
time-stamping series stepped on something which was there before needs
some cleanup, not a real mess to my taste. Matan, do have the plan to
do that work?


Indeed this design flaw was introduced when the first legacy verb was
extended. I think that falling back from extended code to legacy code
should be in the uverbs code. ib_uverbs_write will return -ENOSYS only
if both extended and non-extended don't exist. The uverbs command itself 
will call the non-extended form if the comp_mask is zero and all

data between legacy size and the given size are zero as well.
What do you think?



Or.



Matan
--
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 20/22] IB/iser: Support up to 8MB data transfer in a single command

2015-08-02 Thread Sagi Grimberg



+static void
+iser_calc_scsi_params(struct iser_conn *iser_conn,
+  unsigned int max_sectors)
+{
+struct iser_device *device = iser_conn-ib_conn.device;
+unsigned short sg_tablesize, sup_sg_tablesize;
+
+sg_tablesize = DIV_ROUND_UP(max_sectors * 512, SIZE_4K);
+sup_sg_tablesize = min_t(unsigned, ISCSI_ISER_MAX_SG_TABLESIZE,
+ device-dev_attr.max_fast_reg_page_list_len);
+
+if (sg_tablesize  sup_sg_tablesize) {
+sg_tablesize = sup_sg_tablesize;
+iser_conn-scsi_max_sectors = sg_tablesize * SIZE_4K / 512;
+} else {
+iser_conn-scsi_max_sectors = max_sectors;
+}
+


Why SIZE_4K and not PAGE_SIZE?


Yes, I'll change that to PAGE_SIZE.

Thanks.
--
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 01/12] IB/core: Guarantee that a local_dma_lkey is available

2015-08-02 Thread Haggai Eran
On 31/07/2015 02:22, Jason Gunthorpe wrote:
  int ib_dealloc_pd(struct ib_pd *pd)
  {
 + if (pd-local_mr) {
 + if (ib_dereg_mr(pd-local_mr))
 + return -EBUSY;
 + pd-local_mr = NULL;
 + }
 +

It looks like ib_uverbs_alloc_pd calls ib_device.alloc_pd() directly,
and some drivers don't use kzalloc for allocating the pd, so the
ib_dereg_mr call above results in a general protection fault.

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