Re: [PATCH V3 for-next 3/4] IB/core: Export ib_create/destroy_flow through uverbs

2013-07-18 Thread Matan Barak
On 18/7/2013 2:31 AM, Hefty, Sean wrote: +ssize_t ib_uverbs_create_flow(struct ib_uverbs_file *file, + const char __user *buf, int in_len, + int out_len) +{ + struct ib_uverbs_create_flow cmd; + struct

Re: [PATCH V5 for-next 3/4] IB/core: Export ib_create/destroy_flow through uverbs

2013-08-27 Thread Matan Barak
On 26/8/2013 10:01 PM, Roland Dreier wrote: On Wed, Aug 14, 2013 at 3:58 AM, Or Gerlitz ogerl...@mellanox.com wrote: + if (cmd.flow_attr.num_of_specs) { + kern_flow_attr = kmalloc(cmd.flow_attr.size, GFP_KERNEL); + if (!kern_flow_attr) +

Re: [PATCH V5 for-next 1/4] IB/core: Add receive Flow Steering support

2013-08-27 Thread Matan Barak
On 26/8/2013 10:07 PM, Roland Dreier wrote: On Wed, Aug 14, 2013 at 3:58 AM, Or Gerlitz ogerl...@mellanox.com wrote: +struct _ib_flow_spec { Just out of curiousity, why does this structure name start with _? In fact why have the struct at all, since all it's doing is wrapping an anonymous

[PATCH V4 for-next 0/4] Add receive Flow Steering support

2013-08-28 Thread Matan Barak
Hi Roland, V6 changes: - Addressed comments from Roland on patch #1 and #3 - Don't allow unsupported comp_mask values - Added a check in ib_uverbs_create_flow to verify the size passed from the user space. - Cosmetic changes: don't use anonymous union as the only field in a struct.

[PATCH V4 for-next 1/4] IB/core: Add receive Flow Steering support

2013-08-28 Thread Matan Barak
-by: Hadar Hen Zion had...@mellanox.com Signed-off-by: Or Gerlitz ogerl...@mellanox.com Signed-off-by: Matan Barak mat...@mellanox.com --- drivers/infiniband/core/verbs.c | 27 + include/rdma/ib_verbs.h | 121 ++- 2 files changed, 146 insertions

[PATCH V4 for-next 2/4] IB/core: Infrastructure to support verbs extensions through uverbs

2013-08-28 Thread Matan Barak
From: Igor Ivanov igor.iva...@itseez.com Add infra-structure to support extended uverbs capabilities in a forward/backward manner. Uverbs command opcodes which are based on the verbs extensions approach should be greater or equal to IB_USER_VERBS_CMD_THRESHOLD. They have new header format and

[PATCH V4 for-next 4/4] IB/mlx4: Add receive Flow Steering support

2013-08-28 Thread Matan Barak
-off-by: Or Gerlitz ogerl...@mellanox.com Signed-off-by: Matan Barak mat...@mellanox.com --- drivers/infiniband/hw/mlx4/main.c| 235 ++ drivers/infiniband/hw/mlx4/mlx4_ib.h | 12 ++ include/linux/mlx4/device.h |5 - 3 files changed, 247 insertions

Re: [PATCH V4 for-next 3/4] IB/core: Export ib_create/destroy_flow through uverbs

2013-09-01 Thread Matan Barak
On 28/8/2013 7:21 PM, Jason Gunthorpe wrote: On Wed, Aug 28, 2013 at 03:47:54PM +0300, Matan Barak wrote: + + if (cmd.comp_mask) + return -EINVAL; So, how do you propose to interoperate with new user space/old kernels? How will user space know what comp_mask values

Re: [PATCH V4 for-next 3/4] IB/core: Export ib_create/destroy_flow through uverbs

2013-09-02 Thread Matan Barak
On 2/9/2013 1:23 AM, Jason Gunthorpe wrote: On Sun, Sep 01, 2013 at 12:18:00PM +0300, Matan Barak wrote: How will user space know what comp_mask values the kernel will support? struct ib_uverbs_create_flow_resp contains a comp_mask value. This value should contain the supported comp_masks

Re: [PATCH V4 for-next 3/4] IB/core: Export ib_create/destroy_flow through uverbs

2013-09-03 Thread Matan Barak
On 3/9/2013 7:16 AM, Jason Gunthorpe wrote: On Mon, Sep 02, 2013 at 12:26:06PM +0300, Matan Barak wrote: The correct comp_mask should always match the fields that are initialized by the caller. That is simple to explain and easy to audit for correctness. I agree, but the request could

Re: [PATCH V4 8/9] IB/core: Add RoCE IP based addressing extensions for rdma_ucm

2013-09-17 Thread Matan Barak
On 11/9/2013 3:36 PM, Yann Droneaud wrote: Le 11.09.2013 13:32, Or Gerlitz a écrit : On 11/09/2013 12:52, Yann Droneaud wrote: Le 10.09.2013 16:41, Or Gerlitz a écrit : +static ssize_t ucma_init_qp_attr_ex(struct ucma_file *file, +const char __user *inbuf, +

Re: [PATCH V4 for-next 3/4] IB/core: Export ib_create/destroy_flow through uverbs

2013-09-17 Thread Matan Barak
On 11/9/2013 5:04 PM, Yann Droneaud wrote: Le mercredi 28 août 2013 à 15:47 +0300, Matan Barak a écrit : From: Hadar Hen Zion had...@mellanox.com Implement ib_uverbs_create_flow and ib_uverbs_destroy_flow to support flow steering for user space applications. Change-Id

Re: [PATCH V4 8/9] IB/core: Add RoCE IP based addressing extensions for rdma_ucm

2013-09-17 Thread Matan Barak
On 17/9/2013 1:25 PM, Yann Droneaud wrote: Hi, Le 17.09.2013 12:02, Matan Barak a écrit : That's right - we're not checking anything here. struct ib_uverbs_qp_attr_ex contains 2 user pointers: + /* represents: struct ib_uverbs_ah_attr_ex * __user */ + void __user *ah_attr_ex

Re: [PATCH V4 8/9] IB/core: Add RoCE IP based addressing extensions for rdma_ucm

2013-09-22 Thread Matan Barak
On 18/9/2013 1:07 PM, Yann Droneaud wrote: Hi, Le 18.09.2013 10:40, Matan Barak a écrit : On 17/9/2013 6:43 PM, Yann Droneaud wrote: Le 17.09.2013 17:13, Matan Barak a écrit : On 17/9/2013 1:25 PM, Yann Droneaud wrote: Hi, Le 17.09.2013 12:02, Matan Barak a écrit : That's right - we're

[PATCH for-next] IB/core: clarify overflow/underflow checks on ib_create/destroy_flow

2013-09-22 Thread Matan Barak
-by: Matan Barak mat...@mellanox.com --- Hi Roland, This patch cleans up the overflow/underflow checks for flow stearing uverbs commands. The issues were discovered by Yann Droneaud's review. Clauses 2 3 affects user space, but since there isn't an official release of linux kernel with flow steering

Re: [PATCH] An improved infrastructure for uverbs commands (My take at designing extensible scheme)

2013-10-01 Thread Matan Barak
On 1/10/2013 4:13 PM, Yann Droneaud wrote: Hi, Le 01.10.2013 13:43, Matan Barak a écrit : On 1/10/2013 1:58 PM, Or Gerlitz wrote: On 24/09/2013 19:16, Yann Droneaud wrote: The patch should be titled as follows IB/core: An improved infrastructure for extending uverbs commands

Re: [PATCH] An improved infrastructure for uverbs commands (My take at designing extensible scheme)

2013-10-01 Thread Matan Barak
On 1/10/2013 4:53 PM, Yann Droneaud wrote: Hi, Le 01.10.2013 15:32, Matan Barak a écrit : On 1/10/2013 4:13 PM, Yann Droneaud wrote: Hi, Le 01.10.2013 13:43, Matan Barak a écrit : On 1/10/2013 1:58 PM, Or Gerlitz wrote: On 24/09/2013 19:16, Yann Droneaud wrote: The patch should

Re: [PATCH v2 4/4] IB/core: extended command: add a common extended response header

2013-10-08 Thread Matan Barak
) . || ++ The most notable drawbacks of this approach are: - increase in complexity, - inability to handle error gracefully when writing the response header. Cc: Igor Ivanov igor.iva...@itseez.com Cc: Matan Barak mat...@mellanox.com Signed-off-by: Yann Droneaud ydrone...@opteya.com Link: http://marc.info

Re: [PATCH 2/9] IB/core: Includes flow attribute size in uverbs create_flow

2013-10-14 Thread Matan Barak
On 11/10/2013 8:19 PM, Yann Droneaud wrote: In patch IB/core: clarify overflow/underflow checks on ib_create/destroy_flow, the meaning of the size field was modified to only represent the size of the flow_spec appended to the flow_attr structure. The size of the flow_attr structure must be

Re: [PATCH 7/9] IB/core: Remove ib_uverbs_flow_spec structure from userspace

2013-10-14 Thread Matan Barak
On 11/10/2013 8:56 PM, Yann Droneaud wrote: The structure holding any types of flow_spec is of no use to userspace. It would be wrong for userspace to do: struct ib_uverbs_flow_spec flow_spec; flow_spec.type =B_FLOW_SPEC_TCP; flow_spec.size =izeof(flow_spec); Instead, userspace

Re: [PATCH 3/9] IB/core: Don't include command header size in uverbs create_flow

2013-10-14 Thread Matan Barak
On 11/10/2013 8:19 PM, Yann Droneaud wrote: Flow spec length don't depend on the size of the command header: they are part of different layers. Signed-off-by: Yann Droneaud ydrone...@opteya.com Link: http://marc.info/?i=ver.1381510045.git.ydrone...@opteya.com Link:

Re: [PATCH 8/9] IB/core: extended command: an improved infrastructure for uverbs commands

2013-10-14 Thread Matan Barak
...@itseez.com Cc: Matan Barak mat...@mellanox.com Signed-off-by: Yann Droneaud ydrone...@opteya.com Link: http://marc.info/?i=ver.1381510045.git.ydrone...@opteya.com Link: http://mid.gmane.org/cover.1381510045.git.ydrone...@opteya.com --- drivers/infiniband/core/uverbs.h | 18 - drivers

Re: [PATCH 9/9] IB/core: extended command: move comp_mask to the extended header

2013-10-14 Thread Matan Barak
/destroy_flow commands to the extended command header. Then comp_mask is passed as part of function parameters. [1]: http://marc.info/?iÊl1rgdxjtrc849m6_xnzt5xo1+ybktlwgq6yg6lhosskpsm...@mail.gmail.com Cc: Igor Ivanov igor.iva...@itseez.com Cc: Matan Barak mat...@mellanox.com Signed-off-by: Yann

Re: [PATCH 8/9] IB/core: extended command: an improved infrastructure for uverbs commands

2013-10-17 Thread Matan Barak
On 14/10/2013 6:38 PM, Matan Barak wrote: On 11/10/2013 8:57 PM, Yann Droneaud wrote: Commit 400dbc9 added an infrastructure for extensible uverbs commands while later commit 436f2ad exported ib_create_flow()/ib_destroy_flow() functions using this new infrastructure. According to the commit

Re: [PATCH/RFC] IB/core: Temporarily disable create_flow/destroy_flow uverbs

2013-10-22 Thread Matan Barak
On 21/10/2013 9:40 PM, Roland Dreier wrote: From: Yann Droneaud ydrone...@opteya.com The create_flow/destroy_flow uverbs and the associated extensions to the user-kernel verbs ABI are under review and are too experimental to freeze at this point. So userspace is not exposed to experimental

[PATCH for-next V1 1/8] IB/core: re-enable create_flow/destroy_flow uverbs

2013-10-30 Thread Matan Barak
in this series will apply the suggested fixes. Signed-off-by: Matan Barak mat...@mellanox.com --- drivers/infiniband/Kconfig| 11 --- drivers/infiniband/core/uverbs.h | 2 -- drivers/infiniband/core/uverbs_cmd.c | 4 drivers/infiniband/core/uverbs_main.c | 6

[PATCH for-next V1 3/8] IB/core: Rename 'flow' structs to match other uverbs structs

2013-10-30 Thread Matan Barak
From: Yann Droneaud ydrone...@opteya.com Commit 436f2ad added public data structures to support receive flow steering. The new structs are not following the 'uverbs' pattern: they're lacking the common prefix 'ib_uverbs'. This patch replaces ib_kern prefix by ib_uverbs. Signed-off-by: Yann

[PATCH for-next V1 0/8] uverbs extensions fixes

2013-10-30 Thread Matan Barak
Yann's series (V0 http://marc.info/?l=linux-rdmam=138151196022025): 1. Re-enable flow steering verbs and the extension verbs mechanism. 2. Squashed patches 1 and 2 from the original series 3. ib_uverbs_write should return the number of bytes including the header's size (Patch 7). Matan Barak (2

[PATCH for-next V1 7/8] IB/core: extended command: an improved infrastructure for uverbs commands

2013-10-30 Thread Matan Barak
design is to ensure that the extensible infrastructure is itself extensible while begin more reliable with more input and bound checking. [1]: http://marc.info/?i=CAL1RGDWxmM17W2o_era24A-TTDeKyoL6u3NRu_=t_dhv_za...@mail.gmail.com Cc: Igor Ivanov igor.iva...@itseez.com Cc: Matan Barak mat

[PATCH for-next V1 2/8] IB/core: clarify overflow/underflow checks on ib_create/destroy_flow

2013-10-30 Thread Matan Barak
-by: Matan Barak mat...@mellanox.com --- drivers/infiniband/core/uverbs_cmd.c | 32 +++- include/uapi/rdma/ib_user_verbs.h| 1 + 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c

[PATCH for-next V1 6/8] IB/core: Remove ib_uverbs_flow_spec structure from userspace

2013-10-30 Thread Matan Barak
From: Yann Droneaud ydrone...@opteya.com The structure holding any types of flow_spec is of no use to userspace. It would be wrong for userspace to do: struct ib_uverbs_flow_spec flow_spec; flow_spec.type = IB_FLOW_SPEC_TCP; flow_spec.size = sizeof(flow_spec); Instead, userspace should

[PATCH for-next V1 8/8] IB/core: extended command: move comp_mask to the extended header

2013-10-30 Thread Matan Barak
/destroy_flow commands to the extended command header. Then comp_mask is passed as part of function parameters. [1]: http://marc.info/?i=cal1rgdxjtrc849m6_xnzt5xo1+ybktlwgq6yg6lhosskpsm...@mail.gmail.com Cc: Igor Ivanov igor.iva...@itseez.com Cc: Matan Barak mat...@mellanox.com Signed-off-by: Yann Droneaud

[PATCH for-next V1 4/8] IB/core: Makes uverbs flow structure using names more similar to verbs ones

2013-10-30 Thread Matan Barak
From: Yann Droneaud ydrone...@opteya.com This patch add flow prefix to most of data structure added as part of commit 436f2ad to keep those names in sync with the data structures added in commit 319a441. It's just a matter of translating 'ib_flow' to 'ib_uverbs_flow'. Signed-off-by: Yann

[PATCH for-next V1 5/8] IB/core: Uses a common header for uverbs flow_specs

2013-10-30 Thread Matan Barak
From: Yann Droneaud ydrone...@opteya.com A common header will allows better checking of flow specs size, while ensuring strict alignment to 64bits. Signed-off-by: Yann Droneaud ydrone...@opteya.com Link: http://marc.info/?i=cover.1381510045.git.ydrone...@opteya.com Link:

Re: [PATCH for-next v2 0/7] uverbs extensions fixes

2013-11-07 Thread Matan Barak
.1381177342.git.ydrone...@opteya.com [5] [PATCH] An improved infrastructure for uverbs commands (My take at designing extensible scheme) http://marc.info/?i=1380039392-15480-1-git-send-email-ydrone...@opteya.com Matan Barak (2): IB/core: clarify overflow/underflow checks on ib_create

Re: [PATCH for v3.13 2/7] IB/uverbs: remove implicit cast in INIT_UDATA()

2013-11-27 Thread Matan Barak
On 27/11/2013 12:02 AM, Yann Droneaud wrote: Currently, INIT_UDATA() does an implicit cast to a pointer, so that 'response' address, eg. output buffer, can be used as is to initialize a struct ib_udata: do {\

Re: [PATCH for v3.13 0/7] create_flow/destroy_flow fixes for v3.13

2013-11-27 Thread Matan Barak
On 27/11/2013 12:02 AM, Yann Droneaud wrote: Hi, Please find a patchset against create_flow/destroy_flow and associated extended command scheme. These are fixes that must be applied before making the new uverbs widely available. This patchset gather some patches already sent independently: -

Re: [PATCH -next] IB/cm: Fix missing unlock on error in cm_init_qp_rtr_attr()

2014-01-16 Thread Matan Barak
On 16/1/2014 10:28 AM, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function cm_init_qp_rtr_attr() in the error handling case. Fixes: dd5f03beb4f7 ('IB/core: Ethernet L2 attributes in verbs/cm structures') Signed-off-by: Wei

[PATCH for-next] IB/core: Add a dependency of ib_core in ib_addr

2014-01-16 Thread Matan Barak
IP based addressing introduces the usage of rdma_addr_find_dmac_by_grh within ib_core. Since this function is declared in ib_addr, ib_addr should be a part of the INFINIBAND modules, rather than INFINIBAND_ADDR_TRANS. Signed-off-by: Matan Barak mat...@mellanox.com --- Hi Roland, This patch adds

[PATCH for-next] IB/mlx4: Add dependency INET

2014-01-16 Thread Matan Barak
Since mlx4_ib supports IP based addressing, a dependency on INET should be added. This is mandatory since mlx4_ib registers itself to net device events. Signed-off-by: Matan Barak mat...@mellanox.com --- Hi Roland, The mlx4_ib driver registers itself to network events. This is mandatory

Re: [PATCH libibverbs 1/3] Add ibv_port_cap_flags

2014-02-02 Thread Matan Barak
On 2/2/2014 5:54 PM, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com Add an enum that describes ibv_port_cap_flags that complies with the respective kernel enum and modify the existing field in struct ibv_port_attr to be of that type. This value could be fetched when using

Re: [PATCH V1 libibverbs 2/3] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-02-12 Thread Matan Barak
On 11/2/2014 5:18 PM, Yann Droneaud wrote: Le mardi 11 février 2014 à 14:31 +0200, Or Gerlitz a écrit : From: Matan Barak mat...@mellanox.com In order to implement RoCE IP based addressing for UD QPs, without introducing uverbs changes, we need a way to resolve the L2 Ethernet addresses from

Re: [PATCH libibverbs V4 1/5] Add ibv_port_cap_flags

2014-05-20 Thread Matan Barak
On 18/5/2014 12:38 PM, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com Add an enum that describes ibv_port_cap_flags that complies with the respective kernel enum. This value could be fetched when using ibv_query_port in port_cap_flags. Signed-off-by: Matan Barak mat...@mellanox.com

Re: [PATCH libibverbs V4 2/5] Extend create_ah in order to pass L2 parameters to the provider

2014-05-22 Thread Matan Barak
On 21/5/2014 10:55 PM, Jason Gunthorpe wrote: On Sun, May 18, 2014 at 12:38:46PM +0300, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com In order to support IP based addressing, one needs to pass the L2 parameters to the provider drive. This is done through a new extendable

Re: [PATCH libibverbs V4 4/5] Add ibv_query_port_ex support

2014-05-22 Thread Matan Barak
On 21/5/2014 11:10 PM, Jason Gunthorpe wrote: On Sun, May 18, 2014 at 12:38:48PM +0300, Or Gerlitz wrote: +enum ibv_query_port_ex_attr_mask { + IBV_QUERY_PORT_EX_STATE = 1 0, + IBV_QUERY_PORT_EX_MAX_MTU = 1 1, + IBV_QUERY_PORT_EX_ACTIVE_MTU

Re: [PATCH libmlx4 V3 1/2] Add RoCE IP based addressing support for UD QPs

2014-05-22 Thread Matan Barak
On 21/5/2014 11:00 PM, Jason Gunthorpe wrote: On Sun, May 18, 2014 at 12:39:11PM +0300, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com In order to implement IP based addressing for UD QPs, we need a way to resolve the addresses internally. The L2 params are passed to the provider

Re: [PATCH libibverbs V4 3/5] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-06-12 Thread Matan Barak
On 21/5/2014 11:31 PM, Jason Gunthorpe wrote: On Sun, May 18, 2014 at 12:38:47PM +0300, Or Gerlitz wrote: struct ibv_ah *__ibv_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr) { - struct ibv_ah *ah = pd-context-ops.create_ah(pd, attr); + int err; + struct ibv_ah *ah

Re: [PATCH for-next 2/3] mlx4_core: Add helper functions to support MR re-registration

2014-08-17 Thread Matan Barak
On 6/8/2014 1:42 PM, Sagi Grimberg wrote: On 7/31/2014 11:01 AM, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com Add few helper functions to support a mechanism of getting an MPT, modifying it and updating the HCA with the modified object. The code takes 2 paths, one for directly

[PATCH libibverbs V5 2/2] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-08-20 Thread Matan Barak
query until we started monitoring it 6. query vlan id from the interface This solution depends on libnl-3 with backports to libnl-1. Signed-off-by: Matan Barak mat...@mellanox.com Signed-off-by: Or Gerlitz ogerl...@mellanox.com --- Makefile.am| 24 +- configure.ac

[PATCH libibverbs V5 1/2] Add ibv_port_cap_flags

2014-08-20 Thread Matan Barak
Add an enum that describes ibv_port_cap_flags that complies with the respective kernel enum. This value could be fetched when using ibv_query_port in port_cap_flags. Signed-off-by: Matan Barak mat...@mellanox.com Signed-off-by: Or Gerlitz ogerl...@mellanox.com --- include/infiniband/verbs.h

[PATCH libibverbs V5 0/2] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-08-20 Thread Matan Barak
to enum (size could change) - ibv_ah_attr_ex is extendable and contains ibv_ah_attr Matan Barak (2): Add ibv_port_cap_flags Use neighbour lookup for RoCE UD QPs Eth L2 resolution Makefile.am| 24 +- configure.ac | 31 ++ include/infiniband/verbs.h | 29 ++ src

[PATCH libmlx4 V4 2/2] Add RoCE IP based addressing support for UD QPs

2014-08-20 Thread Matan Barak
In order to implement IP based addressing for UD QPs, we need a way to resolve the addresses internally. When the provider detects an Ethernet link layer with IP based gids, it calls a helper function in libibverbs in order to resolve the Ethernet L2 params. Signed-off-by: Matan Barak mat

[PATCH libmlx4 V4 0/2] Add RoCE IP based addressing support for UD QPs

2014-08-20 Thread Matan Barak
mechanism Matan Barak (2): Add ibv_query_port caching support Add RoCE IP based addressing support for UD QPs src/mlx4.c |2 + src/mlx4.h |7 ++ src/verbs.c | 66 +- 3 files changed, 69 insertions(+), 6 deletions

[PATCH libmlx4 V4 1/2] Add ibv_query_port caching support

2014-08-20 Thread Matan Barak
Return fields according to the port cache rather than calling the kernel. Signed-off-by: Matan Barak mat...@mellanox.com Signed-off-by: Or Gerlitz ogerl...@mellanox.com --- src/mlx4.c |2 ++ src/mlx4.h |7 +++ src/verbs.c | 40 ++-- 3 files

Re: [PATCH libibverbs V5 2/2] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-08-24 Thread Matan Barak
On 20/8/2014 8:01 PM, Jason Gunthorpe wrote: On Wed, Aug 20, 2014 at 09:49:41AM +0300, Matan Barak wrote: +#define MAX(a, b) ((a) (b) ? (a) : (b)) +#define MIN(a, b) ((a) (b) ? (a) : (b)) +#define print_hdr PFX resolver: +#define print_err(...) fprintf(stderr, print_hdr __VA_ARGS__

Re: [PATCH libibverbs V5 2/2] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-08-28 Thread Matan Barak
kernels only. I would like to avoid creating such a dependency. Matan -Original Message- From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- ow...@vger.kernel.org] On Behalf Of Jason Gunthorpe Sent: Tuesday, August 26, 2014 9:39 PM To: Or Gerlitz Cc: Doug Ledford; Matan Barak

Re: [PATCH libibverbs V5 2/2] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-08-28 Thread Matan Barak
On 26/8/2014 7:08 PM, Jason Gunthorpe wrote: On Tue, Aug 26, 2014 at 03:18:37PM +0300, Or Gerlitz wrote: On 25/08/2014 22:33, Doug Ledford wrote: On Aug 25, 2014, at 1:33 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: +timer_fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK

Re: [PATCH libibverbs V5 2/2] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-08-31 Thread Matan Barak
On 28/8/2014 8:48 PM, Devesh Sharma wrote: Hi Matan, Thanks for quick response, my further comments are inline below: -Original Message- From: Matan Barak [mailto:mat...@mellanox.com] Sent: Thursday, August 28, 2014 9:51 PM To: Devesh Sharma; Jason Gunthorpe; Or Gerlitz Cc: Doug

[PATCH libibverbs V6 1/2] Add ibv_port_cap_flags

2014-09-18 Thread Matan Barak
Add an enum that describes ibv_port_cap_flags that complies with the respective kernel enum. This value could be fetched when using ibv_query_port in port_cap_flags. Change-Id: I499565f17d378f525796ee187ef0fac91fd48c21 Signed-off-by: Matan Barak mat...@mellanox.com Signed-off-by: Or Gerlitz

[PATCH libibverbs V6 0/2] Use neighbour lookup for RoCE UD QPs Eth L2 resolution

2014-09-18 Thread Matan Barak
is extendable and contains ibv_ah_attr Matan Barak (2): Add ibv_port_cap_flags Use neighbour lookup for RoCE UD QPs Eth L2 resolution Makefile.am| 24 +- configure.ac | 31 ++ include/infiniband/verbs.h | 31 ++ src/libibverbs.map |2 + src/neigh.c

Re: [PATCH libibverbs] Add MR re-registeration

2014-11-03 Thread Matan Barak
On 3/11/2014 4:50 AM, Jason Gunthorpe wrote: On Sun, Nov 02, 2014 at 11:30:05AM +0200, Or Gerlitz wrote: @@ -886,7 +887,7 @@ struct ibv_context_ops { int (*dealloc_pd)(struct ibv_pd *pd); struct ibv_mr * (*reg_mr)(struct ibv_pd *pd, void *addr,

[PATCH v1 libibverbs 0/2] Add memory re-registration support

2014-11-04 Thread Matan Barak
-- provider's library API change Add MR re-registration support Matan Barak (2): Change rereg_mr API between libibverbs and the provider's library Add MR re-registeration include/infiniband/driver.h | 5 include/infiniband/kern-abi.h | 20 include/infiniband/verbs.h

[PATCH v1 libibverbs 1/2] Change rereg_mr API between libibverbs and the provider's library

2014-11-04 Thread Matan Barak
, size_t length, int access); As a result, this API call returns the exact same pointer it gets. Instead, we propose retuning a status int, which is far more useful than the current return value. Signed-off-by: Matan Barak mat...@mellanox.com

[PATCH v1 libibverbs 2/2] Add MR re-registeration

2014-11-04 Thread Matan Barak
Memory re-registeration is a feature that enables one to change the attributes of a memory region, including PD, translation (address and length) and access flags. Signed-off-by: Matan Barak mat...@mellanox.com Signed-off-by: Or Gerlitz ogerl...@mellanox.com --- include/infiniband/driver.h

[PATCH v2 libibverbs 1/2] Change rereg_mr API between libibverbs and the provider's library

2014-11-05 Thread Matan Barak
, size_t length, int access); As a result, this API call returns the exact same pointer it gets. Instead, we propose retuning a status int, which is far more useful than the current return value. Signed-off-by: Matan Barak mat...@mellanox.com

[PATCH v2 libibverbs 0/2] Add memory re-registration support

2014-11-05 Thread Matan Barak
: - Split to 2 patches: libibverbs -- provider's library API change Add MR re-registration support Matan Barak (2): Change rereg_mr API between libibverbs and the provider's library Add MR re-registeration include/infiniband/driver.h | 5 +++ include/infiniband/kern-abi.h | 20

[PATCH v2 libibverbs 2/2] Add MR re-registeration

2014-11-05 Thread Matan Barak
Memory re-registeration is a feature that enables one to change the attributes of a memory region, including PD, translation (address and length) and access flags. Signed-off-by: Matan Barak mat...@mellanox.com Signed-off-by: Or Gerlitz ogerl...@mellanox.com --- include/infiniband/driver.h

Re: IB_CQ_VECTOR_LEAST_ATTACHED

2014-12-07 Thread Matan Barak
On 12/7/2014 12:20 PM, Sagi Grimberg wrote: On 12/4/2014 9:41 PM, Shirley Ma wrote: On 12/04/2014 10:43 AM, Bart Van Assche wrote: On 12/04/14 17:47, Shirley Ma wrote: What's the history of this patch? http://lists.openfabrics.org/pipermail/general/2008-May/050813.html I am working on

Re: IB_CQ_VECTOR_LEAST_ATTACHED

2014-12-07 Thread Matan Barak
On 12/7/2014 2:59 PM, Or Gerlitz wrote: On 12/7/2014 2:22 PM, Matan Barak wrote: Applications might want to create a CQ on n different cores You mean like an IRQ can flush on a mask potentially made of multiple CPUs? Sort of. In both cases you try to spread the resources such that you'll

Re: [PATCH ] mlx4_core: Enhance device capabilities flags debug printouts

2014-12-10 Thread Matan Barak
On 12/8/2014 1:48 AM, Yuval Shaia wrote: 1. Add indication whether feature is supported or not. 2. Add descriptions of all features. Without this fix there is no way to tell if feature is not supported or that description is not exist. Signed-off-by: Yuval Shaia yuval.sh...@oracle.com ---

Re: [PATCH ] mlx4_core: Verify that port types are the same only if DPDP supported

2014-12-10 Thread Matan Barak
On 12/7/2014 7:05 PM, Yuval Shaia wrote: This patch is merely makes code more nice and readable. Instead of checking for DPDP on every loop cycle the check moves out of the loop. Signed-off-by: Yuval Shaia yuval.sh...@oracle.com --- drivers/net/ethernet/mellanox/mlx4/main.c |7 +++

Re: [PATCH 02/30] IB/core: Add kref to IB devices

2015-02-19 Thread Matan Barak
On Thu, Feb 19, 2015 at 12:57 PM, Haggai Eran hagg...@mellanox.com wrote: On 20/02/2015 00:02, Somnath Kotur wrote: From: Matan Barak mat...@mellanox.com Previously. we used device_mutex lock in order to protect the device's list. That means that in order to guarantee a device isn't freed

Re: [PATCH 08/30] IB/core: Support find sgid index using a filter function

2015-02-19 Thread Matan Barak
On 2/19/2015 2:41 PM, Haggai Eran wrote: On 20/02/2015 00:02, Somnath Kotur wrote: @@ -111,6 +111,33 @@ int ib_find_cached_gid_by_port(struct ib_device *device, struct net *net, int if_index,

Re: [PATCH v1 1/3] IB/core: Add support for extended query device caps

2015-02-19 Thread Matan Barak
On Wed, Feb 18, 2015 at 9:26 AM, Haggai Eran hagg...@mellanox.com wrote: From: Eli Cohen e...@mellanox.com 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

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

2015-02-19 Thread Matan Barak
On 2/19/2015 2:52 PM, Haggai Eran wrote: On 20/02/2015 00:02, Somnath Kotur wrote: --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -2089,15 +2089,16 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file, attr-alt_ah_attr.port_num =

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

2015-02-19 Thread Matan Barak
On 2/19/2015 4:37 PM, Haggai Eran wrote: On 20/02/2015 00:02, Somnath Kotur wrote: @@ -203,21 +235,30 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc, memset(ah_attr, 0, sizeof *ah_attr); if (is_eth) { + u16 vlan_id =

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

2015-02-19 Thread Matan Barak
On 2/19/2015 5:03 PM, Haggai Eran wrote: On 20/02/2015 00:02, Somnath Kotur wrote: @@ -502,9 +547,7 @@ EXPORT_SYMBOL(ib_create_qp); static const struct { int valid; enum ib_qp_attr_maskreq_param[IB_QPT_MAX]; - enum ib_qp_attr_mask

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

2015-02-19 Thread Matan Barak
On 2/19/2015 5:18 PM, Haggai Eran wrote: On 20/02/2015 00:02, Somnath Kotur wrote: --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -458,7 +458,7 @@ static void resolve_cb(int status, struct sockaddr *src_addr, } int rdma_addr_find_dmac_by_grh(union ib_gid

Re: [PATCH 10/30] IB/core: Add gid_type to path and rdma_id_private

2015-02-19 Thread Matan Barak
On 2/19/2015 5:51 PM, Haggai Eran wrote: On 20/02/2015 00:02, Somnath Kotur wrote: @@ -1521,6 +1520,8 @@ static int cm_req_handler(struct cm_work *work) struct ib_cm_id *cm_id; struct cm_id_private *cm_id_priv, *listen_cm_id_priv; struct cm_req_msg *req_msg; +

Re: [PATCH] mlx4_core: Enhance device capabilities flags debug printouts

2015-02-17 Thread Matan Barak
On 2/16/2015 7:32 PM, Yuval Shaia wrote: ping On Mon, Jan 26, 2015 at 06:30:23AM -0800, Yuval Shaia wrote: 1. Add descriptions of all features. 2. Add indication whether feature is supported or not. With this enhancement all device features will be printed along with flags that shows if

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

2015-02-23 Thread Matan Barak
On 2/23/2015 12:32 PM, Somnath Kotur wrote: -Original Message- From: Matan Barak [mailto:mat...@mellanox.com] Sent: Monday, February 23, 2015 3:47 PM To: Devesh Sharma; Somnath Kotur; rol...@kernel.org Cc: linux-rdma@vger.kernel.org Subject: Re: [PATCH 09/30] IB/core: Modify

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

2015-02-23 Thread Matan Barak
...@kernel.org Cc: linux-rdma@vger.kernel.org; Matan Barak; Somnath Kotur Subject: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache From: Matan Barak mat...@mellanox.com Previously, we resolved the dmac and took the smac and vlan from the resolved address. Changing

Re: [PATCH v1 1/3] IB/core: Add support for extended query device caps

2015-02-22 Thread Matan Barak
On Sun, Feb 22, 2015 at 9:14 AM, Haggai Eran hagg...@mellanox.com wrote: On 19/02/2015 20:27, Jason Gunthorpe wrote: On Thu, Feb 19, 2015 at 02:30:29PM +0200, Matan Barak wrote: Furthermore, ibv_create_flow and ibv_destroy_flow were already accepted using the old schema. IIRC they didn't

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

2015-02-24 Thread Matan Barak
On 2/23/2015 6:59 PM, Devesh Sharma wrote: -Original Message- From: Matan Barak [mailto:mat...@mellanox.com] Sent: Monday, February 23, 2015 3:47 PM To: Devesh Sharma; Somnath Kotur; rol...@kernel.org Cc: linux-rdma@vger.kernel.org Subject: Re: [PATCH 09/30] IB/core: Modify ib_verbs

Re: [PATCH v3 for-next 01/33] IB/core: Add RoCE GID cache

2015-04-14 Thread Matan Barak
On 4/14/2015 2:50 AM, Hefty, Sean wrote: Yes, this comment probably could use a reword.. + IB_GID_TYPE_IB= 0, + IB_GID_TYPE_ROCE_V2 = 1, + IB_GID_TYPE_SIZE +}; Can you explain the purpose of defining a 'GID type'. A GID is just a global address. Why does it

Re: [PATCH v3 for-next 02/33] IB/core: Add kref to IB devices

2015-04-14 Thread Matan Barak
On 3/26/2015 1:46 AM, Bart Van Assche wrote: On 03/25/2015 02:19 PM, Somnath Kotur wrote: +static void ib_device_complete_cb(struct kref *kref) +{ +struct ib_device *device = container_of(kref, struct ib_device, +refcount); + +if (device-reg_state =

Re: [PATCH v3 for-next 02/33] IB/core: Add kref to IB devices

2015-04-28 Thread Matan Barak
On 4/28/2015 2:51 PM, Or Gerlitz wrote: On Mon, Apr 27, 2015 at 11:25 AM, Matan Barak mat...@mellanox.com wrote: On 4/26/2015 11:10 PM, Or Gerlitz wrote: On Thu, Mar 26, 2015 at 12:19 AM, Somnath Kotur somnath.ko...@emulex.com wrote: From: Matan Barak mat...@mellanox.com Previously. we

Re: [PATCH v3 for-next 02/33] IB/core: Add kref to IB devices

2015-04-28 Thread Matan Barak
On 4/28/2015 7:03 PM, Jason Gunthorpe wrote: On Tue, Apr 28, 2015 at 11:32:08AM +0300, Matan Barak wrote: This was already asked by Haggai Eran awhile ago and was answered. Anyway, in ib_unregister_device we delete all client's related data. We would like to ensure that all references were

Re: [PATCH v3 for-next 01/33] IB/core: Add RoCE GID cache

2015-04-27 Thread Matan Barak
On 4/26/2015 8:20 PM, Or Gerlitz wrote: On Thu, Mar 26, 2015 at 12:19 AM, Somnath Kotur somnath.ko...@emulex.com wrote: From: Matan Barak mat...@mellanox.com In order to manage multiple types, vlans and MACs per GID, we need to store them along the GID itself. We store the net device as well

Re: [PATCH v3 for-next 02/33] IB/core: Add kref to IB devices

2015-04-27 Thread Matan Barak
On 4/26/2015 11:10 PM, Or Gerlitz wrote: On Thu, Mar 26, 2015 at 12:19 AM, Somnath Kotur somnath.ko...@emulex.com wrote: From: Matan Barak mat...@mellanox.com Previously. we used device_mutex lock in order to protect the device's list. That means that in order to guarantee a device isn't

Re: [PATCH v3 for-next 02/33] IB/core: Add kref to IB devices

2015-04-28 Thread Matan Barak
On 4/27/2015 7:22 PM, Jason Gunthorpe wrote: On Mon, Apr 27, 2015 at 11:25:56AM +0300, Matan Barak wrote: On 4/26/2015 11:10 PM, Or Gerlitz wrote: On Thu, Mar 26, 2015 at 12:19 AM, Somnath Kotur somnath.ko...@emulex.com wrote: From: Matan Barak mat...@mellanox.com Previously. we used

Re: [PATCH v3 for-next 02/33] IB/core: Add kref to IB devices

2015-04-29 Thread Matan Barak
On 4/28/2015 8:43 PM, Jason Gunthorpe wrote: On Tue, Apr 28, 2015 at 05:03:11PM +0300, Matan Barak wrote: The cleanup of roce_gid_cache is done in a different context, so we need to make sure the device is still alive while doing so. This explanation doesn't look right to me. I don't see

Re: [PATCH v3 for-next 01/33] IB/core: Add RoCE GID cache

2015-04-28 Thread Matan Barak
On 4/27/2015 9:22 PM, Or Gerlitz wrote: On Mon, Apr 27, 2015 at 10:32 AM, Matan Barak mat...@mellanox.com wrote: On 4/26/2015 8:20 PM, Or Gerlitz wrote: On Thu, Mar 26, 2015 at 12:19 AM, Somnath Kotur somnath.ko...@emulex.com wrote: From: Matan Barak mat...@mellanox.com In order

Re: [PATCH v3 for-next 01/33] IB/core: Add RoCE GID cache

2015-04-16 Thread Matan Barak
, 2015 12:08 PM To: Somnath Kotur; Matan Barak; rol...@kernel.org Cc: linux-rdma@vger.kernel.org Subject: RE: [PATCH v3 for-next 01/33] IB/core: Add RoCE GID cache It does not break every app, the choice of which GID type to use is made by the RDMA-CM based on network topology hint obtained from

Re: [PATCH v3 for-next 01/33] IB/core: Add RoCE GID cache

2015-04-14 Thread Matan Barak
On 3/26/2015 1:42 AM, Bart Van Assche wrote: On 03/25/2015 02:19 PM, Somnath Kotur wrote: +if (cache-data_vec[ix].attr.ndev +cache-data_vec[ix].attr.ndev != old_net_dev) A few lines earlier the memory old_net_dev points at was freed. If two instances of this function run

Re: [PATCH for-next 02/10] IB/core: Add flags parameter for ib_create_cq

2015-05-20 Thread Matan Barak
On Wed, May 20, 2015 at 6:24 PM, Yann Droneaud ydrone...@opteya.com wrote: Hi, Le dimanche 17 mai 2015 à 16:36 +0300, Or Gerlitz a écrit : diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index cc2dd35..922d322 100644 ---

Re: [PATCH v4 for-next 02/14] IB/core: Replace device_mutex with rwsem

2015-05-20 Thread Matan Barak
On Tue, May 19, 2015 at 8:36 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Tue, May 19, 2015 at 05:27:05PM +0300, Matan Barak wrote: device_mutex is replaced rwsem in order to allow clients' work to run concurrently with register_device, unregister_device, register_client

Re: [PATCH for-next 02/10] IB/core: Add flags parameter for ib_create_cq

2015-05-20 Thread Matan Barak
On Wed, May 20, 2015 at 11:54 AM, Sagi Grimberg sa...@dev.mellanox.co.il wrote: On 5/19/2015 9:47 PM, Jason Gunthorpe wrote: On Sun, May 17, 2015 at 04:36:18PM +0300, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com We add a flags parameter for ib_create_cq in order to specify

Re: [PATCH v4 for-next 04/14] IB/core: Add default GID for RoCE GID table

2015-05-20 Thread Matan Barak
On Tue, May 19, 2015 at 8:41 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Tue, May 19, 2015 at 05:27:07PM +0300, Matan Barak wrote: When RoCE is used, a default GID address should be generated for every supported RoCE type. These default GID addresses are generated based

Re: [PATCH v4 for-next 07/14] IB/core: GID attribute should be returned from verbs API and cache API

2015-05-20 Thread Matan Barak
On Tue, May 19, 2015 at 9:06 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Tue, May 19, 2015 at 05:27:10PM +0300, Matan Barak wrote: +#define __IB_ONLY What is this? I annotated functions that should be called with IB link layer only as __IB_ONLY. I think it's make the code

  1   2   3   4   5   >