Re: iser-target: Add iSCSI Extensions for RDMA (iSER) target driver

2016-01-06 Thread Dan Carpenter
I see now that there is documentation in ib_req_notify_cq(). regards, dan carpenter -- 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-target: Add iSCSI Extensions for RDMA (iSER) target driver

2016-01-04 Thread Dan Carpenter
ount); 430 mutex_unlock(_list_mutex); 431 432 return device; 433 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/3] staging/rdma/hfi1: check for ARMED->ACTIVE transition in receive interrupt

2015-12-17 Thread Dan Carpenter
Possible off by one, but mostly the whitespace makes me itch. Jim was not on the CC list. On Thu, Dec 17, 2015 at 07:24:15PM -0500, Jubin John wrote: > From: Jim Snow > > The link state will transition from ARMED to ACTIVE when a non-SC15 > packet arrives, but the driver

Re: [PATCH 2/3] staging/rdma/hfi1: Fix module parameter spelling

2015-12-17 Thread Dan Carpenter
Nice. Whenever you see a bug like this, you should report it to kernel-janitors because you know that 10 other people have made the same mistake. I will take care of it. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of

Re: [PATCH 13/14] staging/rdma/hfi1: Add TID entry program function body

2015-12-17 Thread Dan Carpenter
if (ret <= 0) { > + tid_group_add_tail(grp, >tid_group_list); > + hfi1_cdbg(TID, > + "Failed to program RcvArray group %d", ret); > + goto unlock; We print a

Re: [PATCH 08/14] staging/rdma/hfi1: Start adding building blocks for TID caching

2015-12-17 Thread Dan Carpenter
k); > + node = mmu_rb_search_by_entry(>tid_rb_root, rcventry); > + if (!node) { > + spin_unlock(>rb_lock); > + return -EBADF; > + } > + rb_erase(>rbnode, >tid_rb_root); > + spin_unlock(>rb_lock); > + if (grp) > +

Re: [PATCH 08/14] staging/rdma/hfi1: Start adding building blocks for TID caching

2015-12-17 Thread Dan Carpenter
unsigned start, u16 count, struct page **pages, > + u32 *tidlist, unsigned *tididx, unsigned *pmapped) > +{ It's not clear what a zero return from this function means. Could we add some documentation? regards, dan carpenter -- To unsubscribe from this list: send the

Re: [PATCH 1/3] staging/rdma/hfi1: consolidate kmalloc_array+memset into kcalloc

2015-12-14 Thread Dan Carpenter
iginal... I've done that for static checker warnings. Lesson learned, hopefully. regards, dan carpenter -- 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: net/mlx5: E-Switch, Add SR-IOV (FDB) support

2015-12-10 Thread Dan Carpenter
RR(flow_rule)); 582 flow_rule = NULL; 583 } 584 out: 585 kfree(match_v); 586 kfree(match_c); 587 return flow_rule; 588 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma"

Re: [PATCH 5/5] staging/rdma/hfi1: Add page lock limit check for SDMA requests

2015-12-07 Thread Dan Carpenter
ile (i) > + if (tx->iovecs[i--].flags & TXREQ_FLAGS_IOVEC_LAST_PKT) { > + defer = true; > + break; > } In the original code, we checked tx->iovecs[0].flags but now we skip that one. Going back to the original for loop is probably the

re: staging/rdma/hfi1: pre-compute sc and sde for RC/UC QPs

2015-11-24 Thread Dan Carpenter
attr); Do we need to verify (hfi1_check_ah(ibqp->device, >remote_ah_attr)) before calling ah_to_sc()? 825 qp->s_sde = qp_to_sdma_engine(qp, qp->s_sc); 826 } 827 } regards, dan carpenter -- To unsubscribe from this list: send

Re: HFI1 code duplication todo

2015-11-20 Thread Dan Carpenter
checkpatch fixes are still on the list and then take over from there... regards, dan carpenter -- 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 07/18] staging/rdma/hfi1: Extend quiet timeout

2015-11-20 Thread Dan Carpenter
I had all the same issues that Greg did with these patch descriptions so it was predictable that he was going to complain. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More ma

Re: HFI1 code duplication todo

2015-11-20 Thread Dan Carpenter
tuff goes through the linux-media tree. regards, dan carpenter -- 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/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-11 Thread Dan Carpenter
ev->bus), > + dd->pcidev->bus->number, > + PCI_SLOT(dd->pcidev->devfn), > + PCI_FUNC(dd->pcidev->devfn), > + kind); > + name[sizeof(name) - 1] = 0; /* make sure the string is terminated */ No need. snprintf

Re: [PATCH 4/8] staging/rdma/hfi1: remove unneeded goto done

2015-11-11 Thread Dan Carpenter
> default: > ret = -EINVAL; > - goto done; > } > ret = set_link_state(ppd, dev_state); > break; Wut? No it's not. regards, dan carpenter -- To unsub

Re: [PATCH 4/8] staging/rdma/hfi1: remove unneeded goto done

2015-11-11 Thread Dan Carpenter
ch. Did Dennis write this patch or did he Ack it or Review it somehow? regards, dan carpenter -- 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 5/8] staging/rdma/hfi1: return early if setlink state was specified

2015-11-11 Thread Dan Carpenter
invalid. >*/ > return -EINVAL; > + } else if (cmd == HFI1_SNOOP_IOCSETLINKSTATE) { > + /* We do not support the old setlink state */ > + return -EINVAL; Just delete it and let the default in the switch statement return -ENOTTY.

Re: [PATCH v4 5/9] staging/rdma/hfi1: Add function stubs for TID caching

2015-11-11 Thread Dan Carpenter
th a final patch which exposes the set of operations. > > Is this acceptable? Yeah. It's fine. Don't add warnings about unused static functions though. Also we like to see a user in the same patchset so don't add infrastructure first and the user code the next year or whatever. regar

Re: [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description

2015-11-11 Thread Dan Carpenter
On Wed, Nov 11, 2015 at 02:03:02PM +, Luick, Dean wrote: > > > > -Original Message- > > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > > ow...@vger.kernel.org] On Behalf Of Dan Carpenter > > Sent: Wednesday, November 11, 2015 2:45 A

Re: [PATCH 10/13] staging/rdma/hfi1: adding per SDMA engine stats to hfistats

2015-11-11 Thread Dan Carpenter
; We're basically just trying to calculate a bunch of strlen()s but there is a lot of extra code to generate debug output. It would be better to remove it in a later patch. > + dd->ndevcntrs++; > + index++; > + }

Re: [PATCH v2] staging/rdma/hfi1: set Gen3 half-swing for integrated devices

2015-11-10 Thread Dan Carpenter
character limit but it's fine. regards, dan carpenter -- 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] staging/rdma/hfi1: Disable thermal polling before sensor initialization

2015-11-05 Thread Dan Carpenter
On Wed, Nov 04, 2015 at 11:44:17PM -0500, jubin.j...@intel.com wrote: > From: jareer.h.abdel-qader <jareer.h.abdel-qa...@intel.com> This should be "Jareer Abdel-Qader <jareer.h.abdel-qa...@intel.com>". regards, dan carpenter -- To unsubscribe from this list: send th

Re: [PATCH] staging/rdma/hfi1: Delete unnecessary checks before two function calls

2015-11-05 Thread Dan Carpenter
sc_return_credits(uctxt->sc); Relying on hidden sanity checks makes the code harder to read. regards, dan carpenter -- 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] staging/rdma/hfi1: set Gen3 half-swing for integrated devices

2015-11-05 Thread Dan Carpenter
d your energy. We accept all checkpatch fixes if they are half way decent. Maybe just put a comment in the header about the full hardware name? This patch breaks cscope and we don't end up actually using the hardware name in the end... regards, dan carpenter -- To unsubscribe from this list: send th

Re: [PATCH] staging/rdma/hfi1: Convert dd_dev_info() to hfi1_cdbg() in process startup

2015-11-05 Thread Dan Carpenter
st keeping it around because you are afraid to delete things. regards, dan carpenter -- 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] staging/rdma/hfi1: set Gen3 half-swing for integrated devices

2015-11-04 Thread Dan Carpenter
use macro majic to hide the first twelve zillion characters. If we can't even see the name when it is used, then why does it exist? Also macro magic breaks grep and cscope. Just think of a better name to begin with and get rid of the PC macro. regards, dan carpenter -- To unsubscribe from this l

Re: [PATCH 3/3] staging/rdma/hfi1: Method to toggle "fast ECN" detection

2015-11-04 Thread Dan Carpenter
isabled. Do we really need the config to be there? Distros are going to enable it. Who is it who wants to disable the config? Also is it better to default to off or on for this code, what are the upsides and downsides of that choice? regards, dan carpenter -- To unsubscribe from this list: sen

Re: [PATCH] staging/rdma/hfi1: Convert dd_dev_info() to hfi1_cdbg() in process startup

2015-11-04 Thread Dan Carpenter
ople get scared about deleting debug code but you can add it back if there is really a bug. /me chants, "delete. delete. delete." regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vge

re: IB/core: Use GID table in AH creation and dmac resolution

2015-11-03 Thread Dan Carpenter
this code well enough to say for sure. Hence this email. :) 158 if (status) { 159 pr_err("%s(): Failed to resolve dmac from gid." regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma&qu

Re: [PATCH 1/4 v2] staging: ipath: ipath_driver: Use setup_timer

2015-10-27 Thread Dan Carpenter
this matter? It's in a thread so it sorts fine either way. regards, dan carpenter -- 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/4 v2] staging: ipath: ipath_driver: Use setup_timer

2015-10-27 Thread Dan Carpenter
On Tue, Oct 27, 2015 at 11:45:18AM +0200, Leon Romanovsky wrote: > On Tue, Oct 27, 2015 at 11:19 AM, Dan Carpenter > <dan.carpen...@oracle.com> wrote: > > On Sun, Oct 25, 2015 at 01:21:11PM +0200, Leon Romanovsky wrote: > >> On Sun, Oct 25, 2015 at 12:17 PM, Muhammad

Re: [PATCH v2 07/22] staging/rdma/hfi1: Fix sparse error in sdma.h file

2015-10-22 Thread Dan Carpenter
> problems and fix them in the patchset. > > My bad, I will fix in v3. I don't think it's worth redoing the patchset over because it's just a Sparse warning, not a bug. But for the future. regards, dan carpenter -- 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 15/22] staging/rdma/hfi1: Allow tuning of SDMA interrupt rate

2015-10-22 Thread Dan Carpenter
What values work well for this parameter? regards, dan carpenter -- 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 14/22] staging/rdma/hfi1: Implement Expected Receive TID caching

2015-10-22 Thread Dan Carpenter
ated white space change. Don't mix white space changes in with a behavior change patch because it makes it hard to review. regards, dan carpenter -- 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 14/22] staging/rdma/hfi1: Implement Expected Receive TID caching

2015-10-22 Thread Dan Carpenter
return ret; It is fewer lines but it is way more complicated. It very quickly starts to bump into the 80 character limit. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordo

Re: [PATCH v2 07/22] staging/rdma/hfi1: Fix sparse error in sdma.h file

2015-10-21 Thread Dan Carpenter
; This should have just been folded in with the previous patch. Don't introduce problems and fix them in the patchset. regards, dan carpenter -- 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/22] staging/rdma/hfi1: Fix regression in send performance

2015-10-21 Thread Dan Carpenter
niszyn <mike.marcinis...@intel.com> > Signed-off-by: Ira Weiny <ira.we...@intel.com> > --- The whole point of this patch is to do: > - if (qp->s_sde) > + if (qp->s_sde && qp->s_ahgidx >= 0) It was not at all clear from the changelog and it was diffi

[patch] IB/hfi1: info leak in get_ctxt_info()

2015-09-16 Thread Dan Carpenter
The cinfo struct has a hole after the last struct member so we need to zero it out. Otherwise we don't disclose some uninitialized stack data. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/staging/rdma/hfi1/file_ops.c b/drivers/staging/rdma/hfi1/file_ops.c

[patch] IB/hfi1: fix a locking bug

2015-09-16 Thread Dan Carpenter
mutex_trylock() returns zero on failure, not EBUSY. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index 654eafe..aa58e59 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/

re: IB/ipath: infiniband verbs support

2015-09-16 Thread Dan Carpenter
warning is from a too many false positives to publish Smatch check. 2290 goto bail; 2291 strcat(buf, "\n"); 2292 ret = strlen(buf); 2293 2294 bail: 2295 return ret; 2296 } regards, dan carpenter -- To unsubscribe from this list:

[patch v2] IB/hfi1: info leak in get_ctxt_info()

2015-09-16 Thread Dan Carpenter
The cinfo struct has a hole after the last struct member so we need to zero it out. Otherwise we disclose some uninitialized stack data. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- v2: typo in changelog diff --git a/drivers/staging/rdma/hfi1/file_ops.c b/drivers/stagin

Re: [patch] IB/hfi1: info leak in get_ctxt_info()

2015-09-16 Thread Dan Carpenter
On Wed, Sep 16, 2015 at 08:25:00AM +0200, Julia Lawall wrote: > On Wed, 16 Sep 2015, Dan Carpenter wrote: > > > The cinfo struct has a hole after the last struct member so we need to > > zero it out. Otherwise we don't disclose some uninitialized stack data. > > I

[patch] IB/hfi1: checking for NULL instead of IS_ERR

2015-09-16 Thread Dan Carpenter
__get_txreq() returns an ERR_PTR() but this checks for NULL so it would oops on failure. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/staging/rdma/hfi1/verbs.c b/drivers/staging/rdma/hfi1/verbs.c index 53ac214..41bb59e 100644 --- a/drivers/staging/rdm

re: IB/hfi1: add driver files

2015-09-16 Thread Dan Carpenter
7, 16, 14, val); 1353 } else 1354 AHG_HEADER_SET(req->ahg, diff, 7, 16, 12, val); regards, dan carpenter -- 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/hfi1: add driver files

2015-09-16 Thread Dan Carpenter
ould probably be a u32 instead of a u8. regards, dan carpenter -- 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] IB/hfi1: mask vs shift confusion

2015-09-16 Thread Dan Carpenter
We are shifting by the _MASK macros instead of the _SHIFT ones. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c index a8c903c..3a457d2 100644 --- a/drivers/staging/rdma/hfi1/sdma.c +++ b/drivers/stagin

[patch] IB/hfi1: fix copy_to/from_user() error handling

2015-09-15 Thread Dan Carpenter
copy_to/from_user() returns the number of bytes which we were not able to copy. It doesn't return an error code. Also a couple places had a printk() on error and I removed that because people can take advantage of it to fill /var/log/messages with spam. Signed-off-by: Dan Carpenter <dan.car

[patch] IB/core: missing curly braces in ib_find_gid()

2015-08-18 Thread Dan Carpenter
Smatch says that, based on the indenting, we should probably add curly braces here. Fixes: 230145ff8124 ('IB/core: Add RoCE GID table management') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 258b3f7

[patch] IB/core: off by one in error handling

2015-08-18 Thread Dan Carpenter
This is a zero offset array. The current code could try to free random memory and crash. Also it leaks the first element. Fixes: 230145ff8124 ('IB/core: Add RoCE GID table management') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/core/cache.c b/drivers

re: IB/mlx5: Support IB_WR_REG_SIG_MR

2015-08-12 Thread Dan Carpenter
; 2441 } regards, dan carpenter -- 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: net/mlx5e: Allocate DMA coherent memory on reader NUMA node

2015-07-28 Thread Dan Carpenter
} regards, dan carpenter -- 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 -next] net/mlx5_core: fix an error code

2015-06-11 Thread Dan Carpenter
We return success if mlx5e_alloc_sq_db() fails but we should return an error code. Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c

[patch] IB/usnic: clean up some error handling code

2015-06-04 Thread Dan Carpenter
the static checker warning. The static checker warning is to catch place which do: if (!ptr) return ERR_PTR(ptr); Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c index 417de1f

re: net/mlx5: Ethernet resource handling files

2015-06-02 Thread Dan Carpenter
MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, 731 outer_headers.ip_protocol); 732 regards, dan carpenter -- 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

[patch] IB/ipath: remove some left over code

2015-02-26 Thread Dan Carpenter
ret is always zero here after commit c4bce8032ef4 ('IB/ipath: Add new chip-specific functions to older chips, consistent init'). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I just happened to spot this dead code when I was reviewing a different static checker warning

re: RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter

2015-02-26 Thread Dan Carpenter
status; 1428 status = ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask); 1429 1430 return status; 1431 } regards, dan carpenter -- 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

[patch] RDMA/nes: remove a stray indent

2015-02-25 Thread Dan Carpenter
This line was indented two tabs too far so it looks weird. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 70acda9..1f74ae2 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers

[patch] IB/qib: fix a do nothing for loop

2015-02-20 Thread Dan Carpenter
We accidentally deleted a semi-colon here and changed this do-nothing loop into a do-something loop. Fixes: ff93905fb92d ('IB/qib: Fix checkpatch warnings') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/qib/qib_wc_x86_64.c b/drivers/infiniband/hw/qib

[patch] RDMA/ocrdma: off by one in ocrdma_query_gid()

2015-02-16 Thread Dan Carpenter
The -sgid_tbl[] array has OCRDMA_MAX_SGID number of elements so this test is off by one. -sgid_tbl is allocated in ocrdma_alloc_resources(). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma

[patch v2] IB/mlx5: fix error code in get_port_caps()

2015-01-12 Thread Dan Carpenter
The current code returns success when kmalloc() fails. It should return an error code, -ENOMEM. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: re-write changelog diff --git a/drivers/infiniband/hw/mlx5

[patch] IB/mlx5: fix error code in get_port_caps()

2015-01-12 Thread Dan Carpenter
We should return -ENOMEM on allocation failure instead of success. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 8a87404

Re: mlx5_core: Fix PowerPC support

2014-10-20 Thread Dan Carpenter
Ah. Thanks for the explanation. This was on x86. regards, dan carpenter -- 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: mlx5_core: Fix PowerPC support

2014-10-16 Thread Dan Carpenter
); 222 return; 223 } 224 225 n = (addr ~PAGE_MASK) MLX5_ADAPTER_PAGE_SHIFT; Maybe n = addr MLX5_ADAPTER_PAGE_SHIFT; was intended? (Totally random guess). 226 fwp-free_count++; 227 set_bit(n, fwp-bitmask); regards, dan

re: IB/srp: Fix deadlock between host removal and multipathd

2014-08-04 Thread Dan Carpenter
3328 ret = -ENOMEM; 3329 ib_srp_transport_template = 3330 srp_attach_transport(ib_srp_transport_functions); 3331 if (!ib_srp_transport_template) 3332 goto destroy_wq; regards, dan carpenter -- To unsubscribe from this list

[patch] RDMA/amso1100: integer overflow in c2_alloc_cq_buf()

2014-07-17 Thread Dan Carpenter
This is a static checker fix. The static checker says that q_size comes from the user and can be any 32 bit value. The call tree is: -- ib_uverbs_create_cq() -- c2_create_cq() -- c2_init_cq() Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers

re: IB/ipath: sysfs and ipathfs support for core driver

2014-07-08 Thread Dan Carpenter
); ^^^ And another one here in qib_fs.c. 463 } else { 464 spin_unlock(tmp-d_lock); regards, dan carpenter -- 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

re: mlx5: Add driver for Mellanox Connect-IB adapters

2014-06-20 Thread Dan Carpenter
dereference it inside destroy_qp_user() unconditionally. 980 else if (qp-create_type == MLX5_QP_KERNEL) 981 destroy_qp_kernel(dev, qp); regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord

re: IB/mlx4: Implement IB_QP_CREATE_USE_GFP_NOIO

2014-06-09 Thread Dan Carpenter
691 qp = *caller_qp; regards, dan carpenter -- 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] RDMA/cxgb3: information leak in send_abort()

2014-05-26 Thread Dan Carpenter
The cpl_abort_req struct has several reserved members which need to be cleared to avoid disclosing kernel information. I have added a memset() so now it matches the cxgb4 version of this function. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/cxgb3

Re: [PATCH 4/4] IB: Remove redundant error check

2014-05-17 Thread Dan Carpenter
; + } } - if (status) - pr_err(%s() err. status=%d\n, __func__, status); return status; return 0; } regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org More

Re: [patch] RDMA/cxgb4: info leak in c4iw_alloc_ucontext()

2014-05-02 Thread Dan Carpenter
those things as security vulnerabilities with CVEs and everything. When is it likely to get fixed? regards, dan carpenter -- 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

[patch] RDMA/cxgb4: release mutex on error in c4iw_reject_cr()

2014-04-02 Thread Dan Carpenter
We recently added some locking to this function and there was an error path which missed the unlock. Fixes: 9306dcbc96f3 ('RDMA/cxgb4: Lock around accept/reject downcalls') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw

[patch 1/2] net/mlx4: fix some indenting in mlx4_ib_add()

2014-03-28 Thread Dan Carpenter
The code was indented too far and also kernel style says we should have curly braces. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 6cb8546..8d9d6b8 100644 --- a/drivers/infiniband/hw/mlx4/main.c

[patch 2/2] net/mlx4: make buffer larger to avoid overflow warning

2014-03-28 Thread Dan Carpenter
made the buffer 80 characters instead of 69 and I changed the sprintf() to snprintf(). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 8d9d6b8..1b6dbe15 100644 --- a/drivers/infiniband/hw/mlx4/main.c

[patch] RDMA/cxgb4: info leak in c4iw_alloc_ucontext()

2014-03-28 Thread Dan Carpenter
The c4iw_alloc_ucontext_resp struct has a 4 byte hole after the last member and we should clear it before passing it to the user. Fixes: 05eb23893c2c ('cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw

Re: IB/mlx4: Build the port IBoE GID table properly under bonding

2014-02-18 Thread Dan Carpenter
On Tue, Feb 18, 2014 at 04:13:28PM +0200, Moni Shoua wrote: On 2/17/2014 1:52 PM, Dan Carpenter wrote: Hello Moni Shoua, This is a semi-automatic email about new static checker warnings. The patch ad4885d279b6: IB/mlx4: Build the port IBoE GID table properly under bonding from Feb 5, 2014

re: IB/mlx4: Build the port IBoE GID table properly under bonding

2014-02-17 Thread Dan Carpenter
); 1751 } regards, dan carpenter -- 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] IB/qib: remove duplicative check in get_a_ctxt()

2014-02-13 Thread Dan Carpenter
We already know pusable is non-zero, no need to check again. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c index 275f247f9fca..cff8f830492c 100644 --- a/drivers/infiniband/hw/qib

Re: [PATCH] RDMA/ocrdma: fix traffic class shift

2014-02-10 Thread Dan Carpenter
On Mon, Feb 10, 2014 at 01:48:58PM +0530, Devesh Sharma wrote: Use correct value for obtaining traffic class from device response for Query QP request. Signed-off-by: Devesh Sharma devesh.sha...@emulex.com Reported-by: Dan Carpenter dan.carpen...@oracle.com regards, dan carpenter

re: RDMA/ocrdma: Add driver for Emulex OneConnect IBoE RDMA adapter

2014-02-07 Thread Dan Carpenter
a Tolstoy novel, I still have no idea what they mean. I know that the T in OCRDMA_QP_PARAMS_TCLASS_SHIFT stands for traffic but when it comes to the SQ_PSN then I have no idea about that. 1421 1422 qp_attr-ah_attr.ah_flags = IB_AH_GRH; regards, dan carpenter -- To unsubscribe from

[patch] RDMA/cxgb3: remove a couple unneeded conditions

2014-02-06 Thread Dan Carpenter
We know that reset_tpt_entry is false on this side of the if else statement so there is no need to check again. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c index c3f5aca4ef00..de1c61b417d6

[patch] RDMA/nes: clean up a conditon

2014-02-06 Thread Dan Carpenter
We don't need to test ret twice and also the white space is messed up. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 8308e3634767..2db2b58f70d9 100644 --- a/drivers/infiniband/hw/nes

[patch] IB/usnic: use GFP_ATOMIC under spinlock

2014-01-20 Thread Dan Carpenter
This is called from qp_grp_and_vf_bind() and we are holding the vf-lock so the allocation can't sleep. Fixes: e3cf00d0a87f ('IB/usnic: Add Cisco VIC low-level hardware driver') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers

re: IB/usnic: Add UDP support in usnic_ib_qp_grp.[hc]

2014-01-17 Thread Dan Carpenter
endian systems. 641 if (err) 642 return err; 643 break; regards, dan carpenter -- 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

Re: IB/usnic: Add Cisco VIC low-level hardware driver

2013-12-12 Thread Dan Carpenter
handling here could be much simpler. kzalloc() for example, has very extensive error messages. pd-domain = domain = iommu_domain_alloc(pci_bus_type); if (!domain) { kfree(pd); return -ENOMEM; } regards, dan carpenter -- To unsubscribe

Re: IB/usnic: Add Cisco VIC low-level hardware driver

2013-12-12 Thread Dan Carpenter
. regards, dan carpenter -- 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/usnic: Add Cisco VIC low-level hardware driver

2013-12-11 Thread Dan Carpenter
); regards, dan carpenter -- 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/usnic: Add Cisco VIC low-level hardware driver

2013-12-11 Thread Dan Carpenter
goto out; 564 } regards, dan carpenter -- 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/usnic: Add Cisco VIC low-level hardware driver

2013-12-11 Thread Dan Carpenter
of memory\n); 470 return NULL; 471 } regards, dan carpenter -- 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/usnic: Add Cisco VIC low-level hardware driver

2013-12-11 Thread Dan Carpenter
security bug). 115 if (err) { 116 usnic_err(Failed to copy udata for %s, us_ibdev-ib_dev.name); 117 return err; 118 } regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body

[PATCH] mlx5: shift wrapping bug in mlx5_ib_get_buf_offset()

2013-11-08 Thread Dan Carpenter
page_size is declared as u64 but the (1 page_shift) shift will wrap at 32 bits. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/mlx5/mem.c b/drivers/infiniband/hw/mlx5/mem.c index

Re: [patch -next] mlx5_core: warn if no space left in alloc_4k()

2013-11-03 Thread Dan Carpenter
On Sun, Nov 03, 2013 at 09:03:27AM +0200, Eli Cohen wrote: On Fri, Nov 01, 2013 at 01:20:44PM +0300, Dan Carpenter wrote: The warning was unreachable. In the original code, it would print the line number and the function but I have added an error message. Signed-off-by: Dan Carpenter

[patch -next] mlx5_core: warn if no space left in alloc_4k()

2013-11-01 Thread Dan Carpenter
The warning was unreachable. In the original code, it would print the line number and the function but I have added an error message. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I haven't tested this, hopefully the warning is not annoying. diff --git a/drivers/net/ethernet

Re: smatch warnings on the IB core

2013-10-29 Thread Dan Carpenter
. With Smatch, I've deliberately set it to have more false positives than GCC. It's always a tradeoff. I wish there were a way to carry a list of false positives in the smatch git tree and filter them out automatically... regards, dan carpenter -- To unsubscribe from this list: send the line

Re: iser-target: introduce fast memory registration mode (FRWR)

2013-10-19 Thread Dan Carpenter
What ever happened with this? regards, dan carpenter On Tue, Sep 03, 2013 at 02:14:36PM +0300, Dan Carpenter wrote: Hello Vu Pham, This is a semi-automatic email about new static checker warnings. The patch 12050ce23475: iser-target: introduce fast memory registration mode (FRWR) from

re: RDMA/ocrdma: Add support for fast register work requests (FRWR)

2013-10-19 Thread Dan Carpenter
OCRDMA_WQE_OPCODE_SHIFT); 1990 hdr-cw |= ((wqe_size / OCRDMA_WQE_STRIDE) OCRDMA_WQE_SIZE_SHIFT); 1991 regards, dan carpenter -- 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

[patch] RDMA/cxgb4: underflows in c4iw_create_qp()

2013-10-19 Thread Dan Carpenter
These sizes should be unsigned so we don't allow negative values and have underflow bugs. These can come from the user so there may be security implications, but I have not tested this. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers

[patch] RDMA/cxgb4: four byte info leak in c4iw_create_cq()

2013-10-19 Thread Dan Carpenter
There is a four byte hole at the end of the uresp struct after the -qid_mask member. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index 88de3aa..e436ead 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b

[patch] RDMA/ocrdma: silence an integer underflow warning

2013-09-06 Thread Dan Carpenter
() so it can't wrap here. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 4ed8235..db39146 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma

  1   2   >