Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-30 Thread Eli Cohen
On Mon, Dec 28, 2015 at 07:35:14PM -0500, ira.weiny wrote: > > I'm still confused. Here is the code with the patch applied: > > > /* > * IB MAD completion callback > */ > static void ib_mad_completion_handler(struct work_struct *work) > { > struct ib_mad_port_private *port_priv;

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-28 Thread Eli Cohen
On Thu, Dec 10, 2015 at 04:52:30PM -0500, ira.we...@intel.com wrote: > From: Dean Luick > > > @@ -2555,6 +2567,7 @@ static void ib_mad_completion_handler(struct > work_struct *work) > { > struct ib_mad_port_private *port_priv; > struct ib_wc wc; > + int

Re: [PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-28 Thread Eli Cohen
On Mon, Dec 28, 2015 at 06:05:46PM -0500, ira.weiny wrote: > > Will it hurt to rearm? The way the code stands I think the worse that will > happen is an extra work item scheduled and an ib_poll_cq call. If you re-arm unconditionally you call for extra interrupts which you can do without. When

Re: [PATCH ib-next 0/3] IB core uverbs support for leagacy commands

2015-11-19 Thread Eli Cohen
On Thu, Nov 05, 2015 at 07:40:05PM +0200, Eli Cohen wrote: > Hi Doug, > > this patcheset is addresses comments from both Jason and Yann. > > Eli > > Eli Cohen (3): > IB/core: Avoid duplicate code > IB/core: IB/core: Allow legacy verbs through extended int

Re: [PATCH libmlx5 v1 2/5] libmlx5: Add QPs and XSRQs resource tracking

2015-11-16 Thread Eli Cohen
On Sun, Nov 15, 2015 at 01:30:56PM +0200, Hagay Abramovsky wrote: > From: Haggai Abramonvsky > > + > +int32_t mlx5_store_uidx(struct mlx5_context *ctx, void *rsc) > +{ > + int32_t tind; > + int32_t ret = -1; You don't need this variable. Just initialize uidx and

Re: [PATCH ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-10 Thread Eli Cohen
On Tue, Nov 10, 2015 at 05:23:10PM +0200, Eli Cohen wrote: > > > > Call it ENOTSUP then: > > > >ENOTSUP Operation not supported (POSIX.1) > > > > Same value on Linux. > > > > Yes, that's better. I will resend. Well it seems l

[PATCH v1 ib-next 1/3] IB/core: Avoid duplicate code

2015-11-10 Thread Eli Cohen
Move the check on the validity of the command to a common area. Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/core/uverbs_main.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/drivers/infiniband/core/uverbs_mai

[PATCH v1 ib-next 3/3] IB/core: Modify conditional on ucontext existence

2015-11-10 Thread Eli Cohen
Since we allow to call legacy verbs using their extended counterpart, the check on ucontext has to move up to a common area in case this verb is ever extended. Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/core/uverbs_main.c | 12 ++-- 1 file changed, 6 inse

[PATCH v1 ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-10 Thread Eli Cohen
. Signed-off-by: Eli Cohen <e...@mellanox.com> --- Changes from previous version: If verify_command_mask fails return -EOPNOTSUPP. drivers/infiniband/core/uverbs_main.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/infiniban

[PATCH v1 ib-next 0/3] IB core uverbs support for leagacy commands

2015-11-10 Thread Eli Cohen
Hi Doug, this patcheset is addresses comments from the community. Specifically if the verbs is not supported by a hardware driver, we return -EOPNOTSUPP. Eli Eli Cohen (3): IB/core: Avoid duplicate code IB/core: IB/core: Allow legacy verbs through extended interfaces IB/core: Modify

Re: [PATCH v1 ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-10 Thread Eli Cohen
On Tue, Nov 10, 2015 at 11:21:07AM -0700, Jason Gunthorpe wrote: > On Tue, Nov 10, 2015 at 08:00:09PM +0200, Eli Cohen wrote: > > When an extended verbs is an extension to a legacy verb, the original > > functionality is preserved. Hence we do not require each hardware dr

Re: [PATCH ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-10 Thread Eli Cohen
On Tue, Nov 10, 2015 at 11:23:35AM -0800, Bart Van Assche wrote: > > How about using ENOTSUPP ? > > $ PAGER= git grep 'define ENOTSUPP' include > include/linux/errno.h:#define ENOTSUPP 524 /* Operation is not supported */ > Appearently this looks a better option but the following appears as a

Re: [PATCH ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-09 Thread Eli Cohen
On Sun, Nov 08, 2015 at 05:04:55PM +0200, Matan Barak wrote: > > +static int verify_command_mask(struct ib_device *ib_dev, __u32 command) > > +{ > > + u64 mask; > > + > > + if (command <= IB_USER_VERBS_CMD_OPEN_QP) > > I think using IB_USER_VERBS_CMD_THRESHOLD is clearer, but I don't

Re: [PATCH for-next 4/4] IB/mlx5: Mmap the HCA's core clock register to user-space

2015-11-09 Thread Eli Cohen
On Mon, Nov 09, 2015 at 06:30:57PM +0200, Matan Barak wrote: > In order to read the HCA's current cycles register, we need > to map it to user-space. Add support to map this register > via mmap command. > > Signed-off-by: Matan Barak <mat...@mellanox.com> Acked-by: Eli Coh

Re: [PATCH for-next 1/4] IB/mlx5: Add create_cq extended command

2015-11-09 Thread Eli Cohen
On Mon, Nov 09, 2015 at 06:30:54PM +0200, Matan Barak wrote: > In order to create a CQ that supports timestamp, mlx5 needs to > support the extended create CQ command with the timestamp flag. > > Signed-off-by: Matan Barak <mat...@mellanox.com> Acked-by: Eli Cohen

Re: [PATCH for-next 1/4] IB/mlx5: Add create_cq extended command

2015-11-09 Thread Eli Cohen
On Mon, Nov 09, 2015 at 06:30:54PM +0200, Matan Barak wrote: > In order to create a CQ that supports timestamp, mlx5 needs to > support the extended create CQ command with the timestamp flag. > i> Signed-off-by: Matan Barak <mat...@mellanox.com> Acked-by: Eli Cohen

Re: [PATCH ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-09 Thread Eli Cohen
On Mon, Nov 09, 2015 at 06:11:49PM +0200, Matan Barak wrote: > > > > Like Haggai mentioned in the other response, checkpatch issues error > > on this claiming that ENOSYS is reserved to unavailable system calls. > > Is it applicable only for new implementations I am not sure. I don't > > have

Re: [PATCH ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-09 Thread Eli Cohen
On Mon, Nov 09, 2015 at 04:15:42PM -0700, Jason Gunthorpe wrote: > > Since the change is to make the kernel do the above fall back > internally, this specific example doesn't make alot of sense to worry > about. Ie the extended verb won't fail anymore, and if it does the > legacy one won't work

Re: [PATCH ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-09 Thread Eli Cohen
On Mon, Nov 09, 2015 at 03:35:31PM -0700, Jason Gunthorpe wrote: > On Mon, Nov 09, 2015 at 08:48:36AM +0200, Haggai Eran wrote: > > On 08/11/2015 17:04, Matan Barak wrote: > > >> @@ -704,6 +719,10 @@ static ssize_t ib_uverbs_write(struct file *filp, > > >> const char __user *buf, > > >> >

[PATCH ib-next 0/3] IB core uverbs support for leagacy commands

2015-11-05 Thread Eli Cohen
Hi Doug, this patcheset is addresses comments from both Jason and Yann. Eli Eli Cohen (3): IB/core: Avoid duplicate code IB/core: IB/core: Allow legacy verbs through extended interfaces IB/core: Modify conditional on ucontext existence drivers/infiniband/core/uverbs_main.c | 70

[PATCH ib-next 1/3] IB/core: Avoid duplicate code

2015-11-05 Thread Eli Cohen
Move the check on the validity of the command to a common area. Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/core/uverbs_main.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/drivers/infiniband/core/uverbs_mai

[PATCH ib-next 3/3] IB/core: Modify conditional on ucontext existence

2015-11-05 Thread Eli Cohen
Since we allow to call legacy verbs using their extended counterpart, the check on ucontext has to move up to a common area in case this verb is ever extended. Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/core/uverbs_main.c | 12 ++-- 1 file changed, 6 inse

[PATCH ib-next 2/3] IB/core: IB/core: Allow legacy verbs through extended interfaces

2015-11-05 Thread Eli Cohen
. Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/core/uverbs_main.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index e93ba9125198..1740a0

Re: [PATCH] IB/core: Allow legacy verbs through extended interfaces

2015-11-05 Thread Eli Cohen
On Thu, Nov 05, 2015 at 11:41:57AM +0100, Yann Droneaud wrote: > > Those checks were written with the assumption the command and flags > masks could be different between the legacy and the new verb format. > > But since it did happen (yet), it's ok to avoid the duplication (I > would have prefer

[PATCH] IB/core: Allow legacy verbs through extended interfaces

2015-11-04 Thread Eli Cohen
. In addition, avoid code duplication by moving sanity checks to a common area. Change-Id: Iedba714224fa07b85325c146621c07e0dbf349fb Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/core/uverbs_main.c | 30 ++ 1 file changed, 10 insertions(+), 20 del

RE: [PATCH 2/2] IB/mlx5: Publish mlx5 driver support for extended create QP

2015-11-04 Thread Eli Cohen
Following this email is another one with the fix. -Original Message- From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] Sent: Wednesday, October 28, 2015 2:20 PM To: Eli Cohen <e...@mellanox.com> Cc: dledf...@redhat.com; linux-rdma@vger.kernel.org; Or Gerlitz

RE: [PATCH 2/2] IB/mlx5: Publish mlx5 driver support for extended create QP

2015-10-28 Thread Eli Cohen
> Did you read the above thread? > > Don't set uverbs_ex_cmd_mask in drivers. But that's not how it is currently. IB core does not set any of the extended verbs flags for all the devices. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to

RE: [PATCH 2/2] IB/mlx5: Publish mlx5 driver support for extended create QP

2015-10-28 Thread Eli Cohen
> Same comment as last time. > > http://thread.gmane.org/gmane.linux.drivers.rdma/26110/focus=26163 > >This still hasn't been fixed. Jason, The relevant IB core patches have been accepted. Can you elaborate more on what your comments against this are?

RE: [PATCH 1/2] mlx4: Expose correct max_sge_rd limit

2015-10-27 Thread Eli Cohen
; Nicholas A. Bellinger; Or Gerlitz; Doug Ledford; Eli Cohen Subject: Re: [PATCH 1/2] mlx4: Expose correct max_sge_rd limit > Hello Sagi, > > Is this the same issue as what has been discussed in > http://www.spinics.net/lists/linux-rdma/msg21799.html ? Looks like it. I think this pat

[PATCH 0/2] Loopback prevention support

2015-10-27 Thread Eli Cohen
Hi Doug, This two patch series adds support for loopback prevention in mlx5_ib for userspace consumers. Eli *** Resending since may have had some problem with my subscription so the *** patchest did not make it to the rdma list Eli Cohen (2): IB/mlx5: Add debug print to signify if block

[PATCH 1/2] IB/mlx5: Add debug print to signify if block multicast is used

2015-10-27 Thread Eli Cohen
Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/hw/mlx5/qp.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 6f521a3..b80b2bd 100644 --- a/drivers/infiniband/hw/mlx5/qp.c

[PATCH 2/2] IB/mlx5: Publish mlx5 driver support for extended create QP

2015-10-27 Thread Eli Cohen
Signed-off-by: Eli Cohen <e...@mellanox.com> --- drivers/infiniband/hw/mlx5/main.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index f1ccd40..634de84 100644 --- a/drivers/infiniband/h

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

2015-07-27 Thread Eli Cohen
Acked-by: Eli Cohen e...@mellanox.com 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

Re: [PATCH linux-next v5] mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures

2015-04-20 Thread Eli Cohen
:221:(pid 1519): page not found -- cosnole log - Fixes: bf0bf77f6519 ('mlx5: Support communicating arbitrary host page size to firmware') Signed-off-by: Honggang Li ho...@redhat.com --- Acked-by: Eli Cohen e...@mellanox.com -- To unsubscribe from this list

Re: [PATCH linux-next v3] mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures

2015-04-14 Thread Eli Cohen
Acked-by: Eli Cohen e...@mellanox.com On Wed, Apr 15, 2015 at 11:19:17AM +0800, Honggang Li wrote: If CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for x86 systems and physical memory is more than 4GB, dma_map_page may return a valid memory address which greater than 0x. As a result, the mlx5

Re: [PATCH linux-next v2] mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures

2015-04-14 Thread Eli Cohen
On Mon, Apr 13, 2015 at 05:21:58PM +0800, Honggang Li wrote: @@ -241,7 +243,7 @@ static void free_4k(struct mlx5_core_dev *dev, u64 addr) static int alloc_system_page(struct mlx5_core_dev *dev, u16 func_id) { struct page *page; - u64 addr; + u64 addr = 0; int err;

RE: [linux-next PATCH] mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures

2015-04-13 Thread Eli Cohen
On Mon, Apr 13, 2015 at 08:33:33AM +0800, Honggang LI wrote: Yes, replaced all of the PAGE_MASK in the file. Please see attched new patch. I think you need to send the new patch inline in your email. @@ -241,7 +243,7 @@ static void free_4k(struct mlx5_core_dev *dev, u64 addr)

RE: [linux-next PATCH] mlx5: wrong page mask if CONFIG_ARCH_DMA_ADDR_T_64BIT enabled for 32Bit architectures

2015-04-12 Thread Eli Cohen
Good catch, thanks! There are more places in this file where PAGE_MASK is wrongly used. Need to fix them as well. Also, see below [Eli] -Original Message- From: Honggang Li [mailto:ho...@redhat.com] Sent: Sunday, April 12, 2015 2:06 PM To: Eli Cohen; net...@vger.kernel.org; linux

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

2015-02-04 Thread Eli Cohen
Acked-by: Eli Cohen e...@mellanox.com On Wed, Feb 04, 2015 at 03:22:33PM +0100, SF Markus Elfring wrote: From: Markus Elfring elfr...@users.sourceforge.net Date: Wed, 4 Feb 2015 15:17:00 +0100 The vunmap() function performs also input parameter validation. Thus the test around the call

Re: [PATCH] mlx5: avoid build warnings on 32-bit

2015-01-13 Thread Eli Cohen
On Tue, Jan 13, 2015 at 05:08:06PM +0100, Arnd Bergmann wrote: Hi Arnd, wouldn't it work by casting to uintptr_t instead of unsigned long? The mlx5 driver passes a string pointer in through a 'u64' variable, which on 32-bit machines causes a build warning:

Re: [PATCH] infiniband: mlx5: avoid a compile-time warning

2015-01-13 Thread Eli Cohen
Acked-by: Eli Cohen e...@mellanox.com On Tue, Jan 13, 2015 at 05:09:43PM +0100, Arnd Bergmann wrote: The return type of find_first_bit() is architecture specific, on ARM it is 'unsigned int', while the asm-generic code used on x86 and a lot of other architectures returns 'unsigned long

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

2015-01-12 Thread Eli Cohen
Acked-by: Eli Cohen e...@mellanox.com Thanks! On Mon, Jan 12, 2015 at 11:14:29AM +0300, Dan Carpenter wrote: 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

Re: RDMA atomic operations fail

2014-12-28 Thread Eli Cohen
On Wed, Dec 24, 2014 at 03:08:45AM +, floaterions wrote: When I try to submit an RDMA FETCH_AND_ADD or CMP_AND_SWAP , the ibv_post_send() function fails, with Errno set to Invalid argument. I have no such problems with RDMA READ/WRITE. I developed my entire code using RDMA CM (so no

[PATCH net-next 0/9] mlx5 driver updates

2014-12-02 Thread Eli Cohen
Hi Dave, The following series contains some fixes to mlx5 as well as update to the list of supported devices. Thanks, Eli Eli Cohen (8): net/mlx5_core: Request the mlx5 IB module on driver load net/mlx5_core: Fix min vectors value in mlx5_enable_msix net/mlx5_core: Fix command queue size

[PATCH net-next 2/9] net/mlx5_core: Fix min vectors value in mlx5_enable_msix

2014-12-02 Thread Eli Cohen
mlx5 requires at least one interrupt vector for completions so fix the minvec argument to pci_enable_msix_range() accordingly. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH net-next 1/9] net/mlx5_core: Request the mlx5 IB module on driver load

2014-12-02 Thread Eli Cohen
Call request module on mlx5_ib so it will be available for applications requiring it, such as installers that require boot over IB. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net

[PATCH net-next 9/9] mlx5: Fix error flow in add_keys

2014-12-02 Thread Eli Cohen
If mlx5_core_create_mkey fails, decrease the pending counter to undo the previous increment. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/mr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c

[PATCH net-next 7/9] net/mlx5_core: Add more supported devices

2014-12-02 Thread Eli Cohen
Add ConnectX-4LX to the list of supported devices as well as their virtual functions. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[PATCH net-next 6/9] net/mlx5_core: Clear outbox of dealloc uar

2014-12-02 Thread Eli Cohen
From: Majd Dibbiny m...@mellanox.com The outbox should be cleared before executing the command. Signed-off-by: Majd Dibbiny m...@mellanox.com Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/uar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

[PATCH net-next 5/9] net/mlx5_core: Print resource number on QP/SRQ async events

2014-12-02 Thread Eli Cohen
Useful for debugging purposes. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index

[PATCH net-next 4/9] net/mlx5_core: Remove unused dev cap enum fields

2014-12-02 Thread Eli Cohen
These enumerations are not used so remove them. Signed-off-by: Eli Cohen e...@mellanox.com --- include/linux/mlx5/device.h | 8 1 file changed, 8 deletions(-) diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index 1d67fd32e71c..ea4f1c46f761 100644 --- a/include

[PATCH net-next 3/9] net/mlx5_core: Fix command queue size enforcement

2014-12-02 Thread Eli Cohen
Command queue descriptor page size is 4KB and not the page size used by the kernel. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b

[PATCH net-next 8/9] mlx5: Fix sparse warnings

2014-12-02 Thread Eli Cohen
1. Add required __acquire/__release statements to balance spinlock usage. 2. Change the index parameter of begin_wqe() to be unsigned to match supplied argument type. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/qp.c | 16 +++- 1 file changed, 15

Re: mlx5: don't duplicate kvfree()

2014-11-20 Thread Eli Cohen
Acked-by: Eli Cohen e...@mellanox.com -- 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 1/5] IB/core: Add DC transport support

2014-11-09 Thread Eli Cohen
On Thu, Nov 06, 2014 at 06:39:17PM +0200, Or Gerlitz wrote: On 11/6/2014 5:52 PM, Eli Cohen wrote: ib_modify_qp_ex - is an extension to ib_modify_qp which allows to pass the 64 bit DC key. we don't add new such kernel verb, probably just left over in the change-log from earlier internal

Re: [PATCH for-next 2/5] IB/core: Add support for extended query device caps

2014-11-06 Thread Eli Cohen
On Tue, Nov 04, 2014 at 02:35:09PM +0200, Haggai Eran wrote: On 03/11/2014 10:02, Eli Cohen wrote: + + if (ucore-outlen sizeof(resp)) + return -ENOSPC; This check may cause compatibility problems when running a newer kernel with old userspace. The userspace code will have

[PATCH net 2/2] net/mlx5_core: Fix race on driver load

2014-11-06 Thread Eli Cohen
When events arrive at driver load, the event handler gets called even before the spinlock and list are initialized. Fix this by moving the initialization before EQs creation. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++-- 1 file changed, 2

[PATCH net 0/2] mlx5_core fixes for 3.18

2014-11-06 Thread Eli Cohen
Hi Dave, the following two patches fix races to could lead to kernel panic in some cases. Thanks, Eli Eli Cohen (2): net/mlx5_core: Fix race in create EQ net/mlx5_core: Fix race on driver load drivers/net/ethernet/mellanox/mlx5/core/eq.c | 7 +++ drivers/net/ethernet/mellanox/mlx5

[PATCH net 1/2] net/mlx5_core: Fix race in create EQ

2014-11-06 Thread Eli Cohen
After the EQ is created, it can possibly generate interrupts and the interrupt handler is referencing eq-dev. It is therefore required to set eq-dev before calling request_irq() so if an event is generated before request_irq() returns, we will have a valid eq-dev field. Signed-off-by: Eli Cohen e

[PATCH v1 for-next 5/5] IB/mlx4: Modify mlx4 to comply with extended atomic definitions

2014-11-06 Thread Eli Cohen
Set the extended masked atomic capabilities. For ConnectX devices argument size is fixed to 8 bytes and bit boundary is 64. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx4/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/mlx4/main.c b

[PATCH v1 for-next 4/5] IB/mlx5: Add extended atomic support

2014-11-06 Thread Eli Cohen
and publish capabilities. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c | 47 +- drivers/infiniband/hw/mlx5/qp.c| 26 ++-- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 51 +++- drivers

[PATCH v1 for-next 3/5] IB/core: Extend atomic operations

2014-11-06 Thread Eli Cohen
size possible. Signed-off-by: Eli Cohen e...@mellanox.com --- Changes from v0: Don not enforce comp_mask to the know masks defined by ~IB_UVERBS_EX_QUERY_DEV_MAX_MASK. drivers/infiniband/core/uverbs_cmd.c | 14 ++ include/rdma/ib_verbs.h | 7 ++- include/uapi/rdma

[PATCH v1 for-next 1/5] IB/mlx5: Fix sparse warnings

2014-11-06 Thread Eli Cohen
1. Add required __acquire/__release statements to balance spinlock usage. 2. Change the index parameter of begin_wqe() to be unsigned to match supplied argument type. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/qp.c | 16 +++- 1 file changed, 15

[PATCH v1 for-next 2/5] IB/core: Add support for extended query device caps

2014-11-06 Thread Eli Cohen
Add extensible query device capabilities verb to allow adding new features. ib_uverbs_ex_query_device is added and copy_query_dev_fields is used to copy capability fields to be used by both ib_uverbs_query_device and ib_uverbs_ex_query_device. Signed-off-by: Eli Cohen e...@mellanox.com

[PATCH for-next 0/5] Dynamically Connected support

2014-11-06 Thread Eli Cohen
Hi Roland, the following series of patches introduces a new transport service named DC. Support is added at IB/core layer, uverbs interface to userspace and mlx5 for Connect-IB devices. Details on the new transport can be found in the first patch in the series. Eli Eli Cohen (5): IB/core: Add

[PATCH for-next 1/5] IB/core: Add DC transport support

2014-11-06 Thread Eli Cohen
. ib_modify_qp_ex - is an extension to ib_modify_qp which allows to pass the 64 bit DC key. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/core/verbs.c | 87 + include/rdma/ib_verbs.h | 87 - 2 files changed

[PATCH for-next 3/5] mlx5_core: Add DC support at mlx5 core layer

2014-11-06 Thread Eli Cohen
Update debugfs, implement DC commands and handle events. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 110 + drivers/net/ethernet/mellanox/mlx5/core/eq.c | 15 +- drivers/net/ethernet/mellanox/mlx5/core/main.c| 6

[PATCH for-next 2/5] IB/uverbs: Add userspace interface to DC verbs

2014-11-06 Thread Eli Cohen
Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/core/uverbs.h | 11 + drivers/infiniband/core/uverbs_cmd.c | 474 +- drivers/infiniband/core/uverbs_main.c | 35 ++- include/rdma/ib_verbs.h | 1 + include/uapi/rdma

[PATCH for-next 5/5] mlx5_core: Update mlx5_command_str with DC commands

2014-11-06 Thread Eli Cohen
Add support for DC commands and make a few other minor fixes. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b

[PATCH for-next 4/5] mlx5_ib: Add support for DC

2014-11-06 Thread Eli Cohen
Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c| 19 +++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 24 +++ drivers/infiniband/hw/mlx5/qp.c | 289 ++- drivers/infiniband/hw/mlx5/user.h| 41 + 4 files changed, 370

[PATCH for-next 0/5] Extended atomics enhancements

2014-11-03 Thread Eli Cohen
changes which went in rc1 and are assumed by some of the patches. Eli Eli Cohen (5): IB/mlx5: Fix sparse warnings IB/core: Add support for extended query device caps IB/core: Extend atomic operations IB/mlx5: Add extended atomic support IB/mlx4: Modify mlx4 to comply with extended

[PATCH for-next 1/5] IB/mlx5: Fix sparse warnings

2014-11-03 Thread Eli Cohen
1. Add required __acquire/__release statements to balance spinlock usage. 2. Change the index parameter of begin_wqe() to be unsigned to match supplied argument type. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/qp.c | 16 +++- 1 file changed, 15

[PATCH for-next 2/5] IB/core: Add support for extended query device caps

2014-11-03 Thread Eli Cohen
Add extensible query device capabilities verb to allow adding new features. ib_uverbs_ex_query_device is added and copy_query_dev_fields is used to copy capability fields to be used by both ib_uverbs_query_device and ib_uverbs_ex_query_device. Signed-off-by: Eli Cohen e...@mellanox.com

[PATCH for-next 3/5] IB/core: Extend atomic operations

2014-11-03 Thread Eli Cohen
size possible. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/core/uverbs_cmd.c | 16 +++- include/rdma/ib_verbs.h | 7 ++- include/uapi/rdma/ib_user_verbs.h| 14 ++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git

[PATCH for-next 5/5] IB/mlx4: Modify mlx4 to comply with extended atomic definitions

2014-11-03 Thread Eli Cohen
Set the extended masked atomic capabilities. For ConnectX devices argument size is fixed to 8 bytes and bit boundary is 64. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx4/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/mlx4/main.c b

[PATCH for-next 4/5] IB/mlx5: Add extended atomic support

2014-11-03 Thread Eli Cohen
and publish capabilities. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c | 47 +- drivers/infiniband/hw/mlx5/qp.c| 26 ++-- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 51 +++- drivers

Re: [GIT PULL] please pull infiniband.git

2014-11-02 Thread Eli Cohen
On Mon, Nov 03, 2014 at 06:06:45AM +1000, Dave Airlie wrote: On 17 October 2014 08:52, Roland Dreier rol...@kernel.org wrote: Hi Linus, Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git tags/rdma-for-linus

Re: Can someone help me understand the reason for this code in ib_isert.c?

2014-10-28 Thread Eli Cohen
On Tue, Oct 28, 2014 at 12:06:06PM +0200, Or Gerlitz wrote: we already have reported max_sge value. Maybe what we need is another field, guarnateed_num_sge so applicatios providing this value can be sure it would succeed (or there is some other problem). Then they can either use this value or

Re: Can someone help me understand the reason for this code in ib_isert.c?

2014-10-26 Thread Eli Cohen
On Sun, Oct 26, 2014 at 01:57:33PM +0100, Bart Van Assche wrote: Applications really need a way to query what the maximum supported number of scatter/gather entries per work request is. The current approach, namely using dev_attr.max_sge - magic value is cumbersome since this approach

Re: Can someone help me understand the reason for this code in ib_isert.c?

2014-10-23 Thread Eli Cohen
On Tue, Oct 21, 2014 at 12:13:22AM +0300, Or Gerlitz wrote: On Mon, Oct 20, 2014 at 6:29 PM, Chris Moore chris.mo...@emulex.com wrote: The following code is in isert_conn_setup_qp() in ib_isert.c: /* * FIXME: Use devattr.max_sge - 2 for max_send_sge as *

Re: ib_post_send execution time

2014-10-23 Thread Eli Cohen
On Thu, Oct 23, 2014 at 11:45:05AM -0700, Roland Dreier wrote: 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

Re: [PATCH RFC 2/2] IB/mlx5: Implement Fast Indirect Memory Registration Feature

2014-10-21 Thread Eli Cohen
On Mon, Oct 13, 2014 at 11:32:09AM +0300, Sagi Grimberg wrote: +static void set_indir_umr_segment(struct mlx5_wqe_umr_ctrl_seg *umr, + struct ib_send_wr *wr) +{ +u64 mask; +u32 list_len = wr-wr.indir_reg.indir_list_len; + +memset(umr, 0, sizeof(*umr)); + +

Re: [PATCH RFC 2/2] IB/mlx5: Implement Fast Indirect Memory Registration Feature

2014-10-21 Thread Eli Cohen
On Sun, Oct 19, 2014 at 10:34:04PM +0300, Sagi Grimberg wrote: +mlx5_ib_warn(dev, \n); Will the warning generated by this code allow a user to find out which code triggered that warning ? Not at all - and it should be fixed. will do. This macro expands to

Re: mlx5_core: Fix PowerPC support

2014-10-19 Thread Eli Cohen
On Thu, Oct 16, 2014 at 02:08:52PM +0300, Dan Carpenter wrote: Hello Eli Cohen, The patch 05bdb2ab6b09: mlx5_core: Fix PowerPC support from Jan 14, 2014, leads to the following static checker warning: drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:225 free_4k() warn

[PATCH for-next 3/6] IB/core: Avoid leakage from kernel to user space

2014-09-14 Thread Eli Cohen
Clear the reserved field of struct ib_uverbs_async_event_desc which is copied to user space. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/core/uverbs_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core

[PATCH for-next 4/6] IB/mlx5: Fix possible array overflow

2014-09-14 Thread Eli Cohen
The check to verify that userspace does not provide an invalid index to the micro UAR was placed too late. Fix this by moving the check before using the index. Reported by: Shachar Raindel rain...@mellanox.com Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c | 6

[PATCH for-next 6/6] IB/mlx5: Modify to work with arbitrary page size

2014-09-14 Thread Eli Cohen
-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/mem.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mem.c b/drivers/infiniband/hw/mlx5/mem.c index a3e81444c825..dae07eae9507 100644 --- a/drivers/infiniband/hw/mlx5

[PATCH for-next 2/6] IB/mlx5: Improve debug prints in mlx5_ib_reg_user_mr

2014-09-14 Thread Eli Cohen
Print access flags and error code from ib_umem_get. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/mr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 80b3c63eab5d

[PATCH for-next 5/6] IB/mlx5: Remove duplicate code from mlx5_set_path

2014-09-14 Thread Eli Cohen
Some of the fields where set twice. Re-organize to avoid that. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/qp.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5

[PATCH for-next 1/6] IB/mlx5: Clear umr resources after ib_unregister_device

2014-09-14 Thread Eli Cohen
Some ULPs may make use of resources created in create_umr_res so make sure to call destroy_umrc_res after returning from ib_unregister_device which makes sure all ULPs have closed their resources. Signed-off-by: Eli Cohen e...@mellanox.com --- drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file

[PATCH for-next 0/6] minor mlx5 fixes for 3.18

2014-09-14 Thread Eli Cohen
(mainly avoidance of hidden casts) 9603b61 mlx5: Move pci device handling from mlx5_ib to mlx5_core Eli 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

Re: [PATCH 1/1] IB/mlx5: use ARRAY_SIZE instead of sizeof/sizeof[0]

2014-07-24 Thread Eli Cohen
On Tue, Jul 01, 2014 at 09:58:44PM +0200, Fabian Frederick wrote: use macro definition Acked-by: Eli Cohen e...@mellanox.com -- 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: [PATCH 1/1] IB/mlx5: use ARRAY_SIZE instead of sizeof/sizeof[0]

2014-07-02 Thread Eli Cohen
Acked-by: Eli Cohen e...@mellanox.com On Tue, Jul 01, 2014 at 09:58:44PM +0200, Fabian Frederick wrote: use macro definition -- 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-26 Thread Eli Cohen
On Fri, Jun 20, 2014 at 08:58:32PM +0300, Dan Carpenter wrote: 976 977err_create: 978if (qp-create_type == MLX5_QP_USER) 979destroy_qp_user(pd, qp); ^^^ But we dereference it inside

Re: [PATCHv1 2/4] RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_srq

2014-06-26 Thread Eli Cohen
On Thu, Jun 05, 2014 at 09:38:03AM +0200, Yann Droneaud wrote: Le dimanche 11 mai 2014 à 10:12 +0300, Eli Cohen a écrit : Acked by: Eli Cohen e...@mellanox.com This Acked-by: tag was not applied on commit 43bc889380c2, in for-next branch (HEAD at ca846ce98ca3). PS: Eli, you've made

Re: [PATCHv1 1/4] RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_cq

2014-05-11 Thread Eli Cohen
Acked by: Eli Cohen e...@mellanox.com -- 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: [PATCHv1 2/4] RDMA/mlx5: add missing padding at end of struct mlx5_ib_create_srq

2014-05-11 Thread Eli Cohen
Acked by: Eli Cohen e...@mellanox.com -- 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 2/2] IB/mlx5: Free resources during PCI error

2014-03-17 Thread Eli Cohen
On Fri, Mar 14, 2014 at 12:14:58PM -0500, cls...@linux.vnet.ibm.com wrote: Hi Carol, see my comments below. Also, can please share with us if you've been making any testing to these patches, how you tested and what were the results? @@ -471,9 +471,12 @@ static void clean_keys(struct mlx5_ib_de

Re: [Patch 1/2] IB/mlx5: Implementation of PCI error handler

2014-03-13 Thread Eli Cohen
On Wed, Mar 12, 2014 at 06:34:12PM +, Ben Hutchings wrote: enum { - /* one minute for the sake of bringup. Generally, commands must always + /* 10 msecs for the sake of bringup. Generally, commands must always * complete and we may need to increase this

Re: [Patch 1/2] IB/mlx5: Implementation of PCI error handler

2014-03-13 Thread Eli Cohen
On Thu, Mar 13, 2014 at 10:12:19AM -0500, Carol Soto wrote: In mlx4 code, I do not recall a timeout for commands this big. So the reason in mlx5 is 2 hrs is just for debugging purposes? So if for any reason a command hang then the user can not remove this module for the next 2 hrs? Hi

  1   2   3   4   5   >