Re: [PATCH] IB/ipoib: Expose ioctl command to retrieve SGID of a given socket

2016-01-06 Thread Haggai Eran
On 06/01/2016 13:03, Yuval Shaia wrote: > On Thu, Dec 31, 2015 at 05:34:03PM +0200, Haggai Eran wrote: >>> + sock = sockfd_lookup(fd, ); >>> + if (IS_ERR_OR_NULL(sock)) >>> + return -EINVAL; >>> + >>> + inetsock = inet_sk(so

Re: SoftRoCE V1

2015-12-31 Thread Haggai Eran
On 29/12/2015 18:01, Wenda Ni wrote: > Hi experts, > > We have several Mellanox RoCE V1 NIC cards, and would like to try > communicating with SoftRoCE V1. > > We are using branch rxe-3.0 from https://github.com/SoftRoCE/rxe-dev > according to the Soft-RoCE README Rev 1.0 issued from Mellanox

Re: [PATCH 2/6] IB/uapi: expose uverbs send WR flags

2015-12-31 Thread Haggai Eran
+ IB_UVERBS_SEND_END = (1 << 5), Do you think we need a check in ib_uverbs_post_send to see only user flags are passed? I think it would be safer. Other than that, Reviewed-by: Haggai Eran <hagg...@mellanox.com> -- To unsubscribe from this list

Re: [PATCH 6/6] IB/uapi: expose device capability flags

2015-12-31 Thread Haggai Eran
On 24/12/2015 16:39, Christoph Hellwig wrote: > Expose the device capability flags which can be queried through uverbs in > the uapi headers. > > Signed-off-by: Christoph Hellwig > --- > include/rdma/ib_verbs.h | 94 > +++- >

Re: [PATCH] IB/ipoib: Expose ioctl command to retrieve SGID of a given socket

2015-12-31 Thread Haggai Eran
On 31/12/2015 16:41, Yuval Shaia wrote: > To support security applications, that need to filter out connections based > on SGID, an ioctl command to retrieve SGID of a given socket is added. Could you elaborate on the security applications? How do you see this ioctl being used? > diff --git

Re: [PATCH 10/10] IB: remove the unused usecnt field from struct ib_mr

2015-12-20 Thread Haggai Eran
On 20/12/2015 11:31, Sagi Grimberg wrote: > >>> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h >>> index 284916d..e45776e 100644 >>> --- a/include/rdma/ib_verbs.h >>> +++ b/include/rdma/ib_verbs.h >>> @@ -1306,7 +1306,6 @@ struct ib_mr { >>> u64 iova; >>> u32

Re: [PATCH for-next V2 2/5] IB/core: Add ib_is_udata_cleared

2015-12-16 Thread Haggai Eran
On 15/12/2015 20:30, Matan Barak wrote: > Extending core and vendor verb commands require us to check that the > unknown part of the user's given command is all zeros. > Adding ib_is_udata_cleared in order to do so. > > Signed-off-by: Matan Barak <mat...@mellanox.com> Rev

Re: [PATCH for-next V1 2/5] IB/core: Add ib_is_udata_cleared

2015-12-15 Thread Haggai Eran
On 14/12/2015 18:31, Matan Barak wrote: > I'm not sure regarding the string.c location, as it deals with user > buffers, but in order not to > be dependent on this, I'll change this code to the following. > > static inline bool ib_is_udata_cleared(struct ib_udata *udata, >

Re: [PATCH for-next V1 2/5] IB/core: Add ib_is_udata_cleared

2015-12-13 Thread Haggai Eran
On 10/12/2015 19:29, Matan Barak wrote: > On Thu, Dec 10, 2015 at 5:20 PM, Haggai Eran <hagg...@mellanox.com> wrote: >> On 10/12/2015 16:59, Matan Barak wrote: >>> On Mon, Dec 7, 2015 at 3:18 PM, Haggai Eran <hagg...@mellanox.com> wrote: >>>>

Re: [PATCH 04/37] IB/rdmavt: Add ib core device attributes to rvt driver params list

2015-12-10 Thread Haggai Eran
On 07/12/2015 22:43, Dennis Dalessandro wrote: > struct rvt_dev_info { > + /* > + * Prior to calling for registration the driver will be responsible for > + * allocating space for this structure. The driver will also need to > + * allocate space for any private device or per

Re: [PATCH 04/37] IB/rdmavt: Add ib core device attributes to rvt driver params list

2015-12-10 Thread Haggai Eran
On 07/12/2015 22:43, Dennis Dalessandro wrote: > + /* > + * Drivers will need to support a number of notifications to rvt in > + * accordance with certain events. This structure should contain a mask > + * of the supported events. Such events that the rvt may need to know > +

Re: [PATCH 01/37] IB/rdmavt: Create module framework and handle driver registration

2015-12-10 Thread Haggai Eran
On 07/12/2015 22:43, Dennis Dalessandro wrote: > +struct rvt_dev_info { > + struct ib_device ibdev; > + int (*port_callback)(struct ib_device *, u8, struct kobject *); > + > + /* > + * TODO: > + * need to reflect module parameters that may vary by dev > + */ > +};

Re: [PATCH 02/37] IB/rdmavt: Consolidate dma ops in rdmavt.

2015-12-10 Thread Haggai Eran
A few nits: On 07/12/2015 22:43, Dennis Dalessandro wrote: > +static int rvt_map_sg(struct ib_device *dev, struct scatterlist *sgl, > + int nents, enum dma_data_direction direction) > +{ > + struct scatterlist *sg; > + u64 addr; > + int i; > + int ret = nents; >

Re: [PATCH 04/37] IB/rdmavt: Add ib core device attributes to rvt driver params list

2015-12-10 Thread Haggai Eran
On 10/12/2015 15:25, Dennis Dalessandro wrote: > On Thu, Dec 10, 2015 at 02:26:11PM +0200, Haggai Eran wrote: >> On 07/12/2015 22:43, Dennis Dalessandro wrote: >>> +/* >>> + * Drivers will need to support a number of notifications to rvt in >>> +

Re: [PATCH for-next V1 2/5] IB/core: Add ib_is_udata_cleared

2015-12-10 Thread Haggai Eran
On 10/12/2015 16:59, Matan Barak wrote: > On Mon, Dec 7, 2015 at 3:18 PM, Haggai Eran <hagg...@mellanox.com> wrote: >> On 12/03/2015 05:44 PM, Matan Barak wrote: >>> Extending core and vendor verb commands require us to check that the >>> unknown part of the

Re: [PATCH for-next V2 07/11] IB/core: Validate route in ib_init_ah_from_wc and ib_init_ah_from_path

2015-12-07 Thread Haggai Eran
On 12/03/2015 03:47 PM, Matan Barak wrote: > +static int addr_resolve_neigh(struct dst_entry *dst, > + const struct sockaddr *dst_in, > + struct rdma_dev_addr *addr) > +{ > + if (dst->dev->flags & IFF_LOOPBACK) { > + int ret; > +

Re: [PATCH libibverbs] init.c: increase sysfs read buffer size to 16

2015-12-07 Thread Haggai Eran
from ibv_devinfo when > reading usNIC devices. > > This commit therefore increases the buffer size to 16, which is long > enough to read the usNIC node_type value. Reviewed-by: Haggai Eran <hagg...@mellanox.com> -- To unsubscribe from this list: send the line "unsubscribe l

Re: [PATCH libmlx5 V1 6/6] Add always_inline check

2015-12-07 Thread Haggai Eran
On 12/03/2015 06:02 PM, Matan Barak wrote: > Always inline isn't supported by every compiler. Adding it to > configure.ac in order to support it only when possible. > Inline other poll_one data path functions in order to eliminate > "ifs". > > Signed-off-by: Matan Barak >

Re: [PATCH for-next V1 2/5] IB/core: Add ib_is_udata_cleared

2015-12-07 Thread Haggai Eran
On 12/03/2015 05:44 PM, Matan Barak wrote: > Extending core and vendor verb commands require us to check that the > unknown part of the user's given command is all zeros. > Adding ib_is_udata_cleared in order to do so. > Why not copy the data into kernel space and run memchr_inv() on it? -- To

Re: [PATCH] infiniband:core:Add needed error path in cm_init_av_by_path

2015-12-06 Thread Haggai Eran
On Friday, December 4, 2015 8:02 PM, Nicholas Krause <xerofo...@gmail.com> wrote: > To: dledf...@redhat.com > Cc: sean.he...@intel.com; hal.rosenst...@gmail.com; Haggai Eran; > jguntho...@obsidianresearch.com; Matan Barak; yun.w...@profitbricks.com; > ted.h@oracle.com

Re: [PATCH v1 10/10] IB/iser: Support the remote invalidation exception

2015-11-30 Thread Haggai Eran
On 24/11/2015 18:23, Sagi Grimberg wrote: > From: Jenny Derzhavetz > > Declare that we support remote invalidation in case we are: > 1. using Fastreg method > 2. always registering memory. > > Detect the invalidated rkey from the work completion info so we > won't

Re: [PATCH 3/3] IB/core: constify mmu_notifier_ops structures

2015-11-29 Thread Haggai Eran
On 30/11/2015 00:02, Julia Lawall wrote: > This mmu_notifier_ops structure is never modified, so declare it as > const, like the other mmu_notifier_ops structures. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall <julia.law...@lip6.fr> Review

Re: [PATCH] IB/cma: Add a missing rcu_read_unlock()

2015-11-22 Thread Haggai Eran
On 20/11/2015 21:04, Bart Van Assche wrote: > Ensure that validate_ipv4_net_dev() calls rcu_read_unlock() if > fib_lookup() fails. Detected by sparse. Compile-tested only. > > Fixes: "IB/cma: Validate routing of incoming requests" (commit f887f2ac87c2). > Cc: Haggai E

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

2015-11-08 Thread Haggai Eran
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, >> > } >> > >> > command = hdr.command & IB_USER_VERBS_CMD_COMMAND_MASK; >> > + if (verify_command_mask(ib_dev, command)) { >> > +

Re: RFC rdma cgroup

2015-11-04 Thread Haggai Eran
On 03/11/2015 21:11, Parav Pandit wrote: > So it looks like below, > #cat rdma.resources.verbs.list > Output: > mlx4_0 uctx ah pd cq mr mw srq qp flow > mlx4_1 uctx ah pd cq mr mw srq qp flow rss_wq What happens if you set a limit of rss_wq to mlx4_0 in this example? Would it fail? I think it

Re: RFC rdma cgroup

2015-11-02 Thread Haggai Eran
On 29/10/2015 20:46, Parav Pandit wrote: > On Thu, Oct 29, 2015 at 8:27 PM, Haggai Eran <hagg...@mellanox.com> wrote: >> On 28/10/2015 10:29, Parav Pandit wrote: >>> 3. Resources are not defined by the RDMA cgroup. Resources are defined >>> by RDMA/IB subsystem an

Re: RFC rdma cgroup

2015-10-29 Thread Haggai Eran
On 28/10/2015 10:29, Parav Pandit wrote: > 3. Resources are not defined by the RDMA cgroup. Resources are defined > by RDMA/IB subsystem and optionally by HCA vendor device drivers. > Rationale: This allows rdma cgroup to remain constant while RDMA/IB > subsystem can evolve without the need of

Re: [PATCH v6 0/4] Add network namespace support in the RDMA-CM

2015-10-22 Thread Haggai Eran
On 22/10/2015 06:37, Doug Ledford wrote: > On 08/27/2015 10:29 AM, Haggai Eran wrote: >> Hi, >> >> Now that the code for demuxing requests is inside rdma_cm, here are the >> patches >> to add InfiniBand network namespace again. >> >> Changes from

[PATCH v7 1/4] IB/addr: Pass network namespace as a parameter

2015-10-22 Thread Haggai Eran
upport is added on more levels. Signed-off-by: Haggai Eran <hagg...@mellanox.com> Signed-off-by: Yotam Kenneth <yota...@mellanox.com> Signed-off-by: Shachar Raindel <rain...@mellanox.com> Signed-off-by: Guy Shapiro <gu...@mellanox.com> --- drivers/infiniband/core/addr.c |

[PATCH v7 0/4] Add network namespace support in the RDMA-CM

2015-10-22 Thread Haggai Eran
as a parameter IB/cma: Add support for network namespaces IB/ucma: Take the network namespace from the process Haggai Eran (1): IB/cma: Separate port allocation to network namespaces drivers/infiniband/core/addr.c | 17 +-- drivers/infiniband/core/cma.c

[PATCH v7 3/4] IB/cma: Add support for network namespaces

2015-10-22 Thread Haggai Eran
alling rdma_destroy_id. In order to preserve the current behavior init_net is passed when calling from other modules. Signed-off-by: Guy Shapiro <gu...@mellanox.com> Signed-off-by: Haggai Eran <hagg...@mellanox.com> Signed-off-by: Yotam Kenneth <yota...@mellanox.com> Signed-off-b

[PATCH v7 4/4] IB/ucma: Take the network namespace from the process

2015-10-22 Thread Haggai Eran
From: Guy Shapiro <gu...@mellanox.com> Add support for network namespaces from user space. This is done by passing the network namespace of the process instead of init_net. Signed-off-by: Haggai Eran <hagg...@mellanox.com> Signed-off-by: Yotam Kenneth <yota...@mellanox.

Re: [PATCH v3 for-next 1/7] IB/core: Extend ib_uverbs_create_qp

2015-10-21 Thread Haggai Eran
drivers/infiniband/core/uverbs.h | 1 + > drivers/infiniband/core/uverbs_cmd.c | 254 > +- > drivers/infiniband/core/uverbs_main.c | 1 + > include/uapi/rdma/ib_user_verbs.h | 26 > 4 files changed, 217 insertions(+), 65 deletions(-) &

Re: [PATCH v2 for-next 1/7] IB/core: Extend ib_uverbs_create_qp

2015-10-21 Thread Haggai Eran
On 21/10/2015 16:46, eran ben elisha wrote: >>> +ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, >>> >> + struct ib_device *ib_dev, >>> >> + const char __user *buf, int in_len, >>> >> + int out_len) >>> >> +{ >>> >> +

Re: [PATCH] IB/cma: Use inner P_Key to determine netdev

2015-10-21 Thread Haggai Eran
On 20/10/2015 19:44, Jason Gunthorpe wrote: > On Tue, Oct 20, 2015 at 09:45:27AM +0300, Haggai Eran wrote: >> On 19/10/2015 21:19, Jason Gunthorpe wrote: >>> On Mon, Oct 19, 2015 at 09:09:25PM +0300, Haggai Eran wrote: >>>> When discussing the patches to demux i

Re: [PATCH v2 for-next 1/7] IB/core: Extend ib_uverbs_create_qp

2015-10-21 Thread Haggai Eran
On 21/10/2015 12:53, Sagi Grimberg wrote: > On 10/15/2015 2:44 PM, Eran Ben Elisha wrote: >> ib_uverbs_ex_create_qp follows the extension verbs >> mechanism. New features (for example, QP creation flags >> field which is added in a downstream patch) could used >> via user-space libraries without

Re: [PATCH v2 for-next 1/7] IB/core: Extend ib_uverbs_create_qp

2015-10-21 Thread Haggai Eran
On 15/10/2015 14:44, Eran Ben Elisha wrote: > ib_uverbs_ex_create_qp follows the extension verbs > mechanism. New features (for example, QP creation flags > field which is added in a downstream patch) could used > via user-space libraries without breaking the ABI. > > Signed-off-by: Eran Ben

Re: [PATCH v2 for-next 2/7] IB/core: Allow setting create flags in QP init attribute

2015-10-21 Thread Haggai Eran
ret = -EINVAL; > goto err_put; > } > FWIW Reviewed-by: Haggai Eran <hagg...@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

[PATCH v1] IB/cma: Use inner P_Key to determine netdev

2015-10-20 Thread Haggai Eran
during the GSI QP initialization. Change the rdma_cm code to look at the P_Key value that is part of the packet payload as a workaround. Once the drivers are fixed this patch can be reverted. Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to RDMA CM") Signed-off-by: H

Re: [PATCH v1] IB/cma: Use inner P_Key to determine netdev

2015-10-20 Thread Haggai Eran
On 20/10/2015 10:20, Doug Ledford wrote: > On 10/20/2015 02:53 AM, Haggai Eran wrote: >> When discussing the patches to demux ids in rdma_cm instead of ib_cm, it >> was decided that it is best to use the P_Key value in the packet headers. >> However, the mlx5 and ipath drivers

Re: [PATCH] IB/cma: Use inner P_Key to determine netdev

2015-10-20 Thread Haggai Eran
On 19/10/2015 21:19, Jason Gunthorpe wrote: > On Mon, Oct 19, 2015 at 09:09:25PM +0300, Haggai Eran wrote: >> When discussing the patches to demux ids in rdma_cm instead of ib_cm, it >> was decided that it is best to use the P_Key value in the packet headers >> [1].

Re: [PATCH 0/6] IB/mad: Support devices taking pkey_index from the GSI QP

2015-10-19 Thread Haggai Eran
On 10/14/2015 08:54 PM, Jason Gunthorpe wrote: > What this series is doing (src QPN != 1) is absolutely not complainant > with the spec. Hal convinced me that the spec implicitly requires that. Originally I thought that it was allowed, based this paragraph from Section 13.5.1 (MAD Interfaces): >

[PATCH] IB/cma: Use inner P_Key to determine netdev

2015-10-19 Thread Haggai Eran
of the packet payload as a workaround. Once the drivers are fixed this patch can be reverted. Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to RDMA CM") Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/core/cma.c | 4 ++-- 1 file chang

[PATCH 0/6] IB/mad: Support devices taking pkey_index from the GSI QP

2015-10-14 Thread Haggai Eran
ltiple QPs on the same ib_mad_qp_info struct, and patch 6 adds a P_Key change event handler to update the table when the SM changes the available P_Keys. [1] mlx5: Fix incorrect wc pkey_index assignment for GSI messages http://www.spinics.net/lists/linux-rdma/msg28374.html Regards, Haggai Haggai Eran (6)

[PATCH 2/6] IB/mad: Add QP parameters to ib_mad_qp_info

2015-10-14 Thread Haggai Eran
In preparation for having an array of QPs in each ib_mad_qp_info, add the qp_type and qp_num parameters to the ib_mad_qp_info struct so that clients won't need to access the QPs themselves for this information. Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/core

[PATCH 3/6] IB/core: Add capability bit to tell whether per-WR P_Key change in GSI is supported

2015-10-14 Thread Haggai Eran
<infinip...@intel.com> Cc: Eli Cohen <e...@mellanox.com> Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/hw/mlx5/main.c| 1 + drivers/staging/rdma/ipath/ipath_verbs.c | 1 + include/rdma/ib_verbs.h | 2 ++ 3 files changed, 4 inserti

[PATCH 5/6] IB/mad: Create multiple QPs for supporting different P_Keys

2015-10-14 Thread Haggai Eran
-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/core/mad.c | 404 +++-- drivers/infiniband/core/mad_priv.h | 4 +- 2 files changed, 299 insertions(+), 109 deletions(-) diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c

[PATCH 1/6] IB/mad: Use helpers to get ib_device and ib_pd from ib_mad_agent

2015-10-14 Thread Haggai Eran
ib_mad_agent currently exposes an ib_qp and an ib_device unnecessarily. Replace these fields with a single ib_pd, and use helper functions to get the device and pd instead of accessing the fields directly. Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/core/a

[PATCH 6/6] IB/mad: P_Key change event handler

2015-10-14 Thread Haggai Eran
be added later on. Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/core/mad.c | 51 -- drivers/infiniband/core/mad_priv.h | 2 ++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/m

[PATCH 4/6] IB/mad: Use a SRQ for receiving GMPs

2015-10-14 Thread Haggai Eran
As a preparation for supporting multiple transmission QPs for each GSI QP, add a SRQ that will be used for all the receive buffers of these QPs. Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/core/mad.c | 58 ++ d

[PATCH] [RESEND] IB/cma: Accept connection without a valid netdev on RoCE

2015-10-06 Thread Haggai Eran
the netdev enforcement for each incoming connections when the link layer is RoCE. Fixes: 4c21b5bcef73 ("IB/cma: Add net_dev and private data checks to RDMA CM") Reported-by: Kamal Heib <kam...@mellanox.com> Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- I accid

Re: [PATCH 3.2] IB/qib: Change lkey table allocation to support more MRs

2015-10-05 Thread Haggai Eran
On 02/10/2015 16:10, Marciniszyn, Mike wrote: >>> The lkey table is allocated with with a get_user_pages() with an >> Don't you mean __get_free_pages? >> > > I was a nit in the original upstream commit. > > I don’t think it is a big deal since the patch context clarifies. I agree it's not a big

Re: [PATCH 3.2] IB/qib: Change lkey table allocation to support more MRs

2015-09-30 Thread Haggai Eran
On 29/09/2015 17:51, Mike Marciniszyn wrote: > The lkey table is allocated with with a get_user_pages() with an Don't you mean __get_free_pages? Regards, Haggai > order based on a number of index bits from a module parameter. > > The underlying kernel code cannot allocate that many contiguous

Re: shrink struct ib_send_wr V4

2015-09-29 Thread Haggai Eran
On 13/09/2015 18:13, Christoph Hellwig wrote: > This series shrinks the WR size by splitting out the different WR > types. > > Patch number one is too large for the mailinglist, so if you didn't > get it grab it here: > > >

RoCE RDMA CM handling after the demux patches

2015-09-27 Thread Haggai Eran
Hi, I noticed that the "Demux IB CM requests in the rdma_cm module" patches, while intended to only apply to InfiniBand connections, accidentally also affect RoCE connections. The patches used a query to IPoIB for the netdev associated with a request, and RoCE devices therefore fail to answer

[PATCH] IB/cma: Potential NULL dereference in cma_id_from_event

2015-09-21 Thread Haggai Eran
If the lookup of a listening ID failed for an AF_IB request, the code would try to call dev_put() on a NULL net_dev. Fixes: be688195bd08 ("IB/cma: Fix net_dev reference leak with failed requests") Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: H

Re: [PATCH 0/7] devcg: device cgroup extension for rdma resource

2015-09-20 Thread Haggai Eran
On 15/09/2015 06:45, Jason Gunthorpe wrote: > No, I'm saying the resource pool is *well defined* and *fixed* by each > hardware. > > The only question is how do we expose the N resource limits, the list > of which is totally vendor specific. I don't see why you say the limits are vendor

Re: [PATCH 5/7] devcg: device cgroup's extension for RDMA resource.

2015-09-08 Thread Haggai Eran
On 07/09/2015 23:38, Parav Pandit wrote: > +void devcgroup_rdma_uncharge_resource(struct ib_ucontext *ucontext, > + enum devcgroup_rdma_rt type, int num) > +{ > + struct dev_cgroup *dev_cg, *p; > + struct task_struct *ctx_task; > + > + if (!num) > +

Re: [PATCH 6/7] devcg: Added support to use RDMA device cgroup.

2015-09-08 Thread Haggai Eran
On 07/09/2015 23:38, Parav Pandit wrote: > +static void init_ucontext_lists(struct ib_ucontext *ucontext) > +{ > + INIT_LIST_HEAD(>pd_list); > + INIT_LIST_HEAD(>mr_list); > + INIT_LIST_HEAD(>mw_list); > + INIT_LIST_HEAD(>cq_list); > + INIT_LIST_HEAD(>qp_list); > +

Re: [PATCH 5/7] devcg: device cgroup's extension for RDMA resource.

2015-09-08 Thread Haggai Eran
On 07/09/2015 23:38, Parav Pandit wrote: > +/* RDMA resources from device cgroup perspective */ > +enum devcgroup_rdma_rt { > + DEVCG_RDMA_RES_TYPE_UCTX, > + DEVCG_RDMA_RES_TYPE_CQ, > + DEVCG_RDMA_RES_TYPE_PD, > + DEVCG_RDMA_RES_TYPE_AH, > + DEVCG_RDMA_RES_TYPE_MR, > +

Re: [PATCH 4/7] devcg: Added rdma resource tracker object per task

2015-09-08 Thread Haggai Eran
On 08/09/2015 10:04, Parav Pandit wrote: > On Tue, Sep 8, 2015 at 11:18 AM, Haggai Eran <hagg...@mellanox.com> wrote: >> On 07/09/2015 23:38, Parav Pandit wrote: >>> @@ -2676,7 +2686,7 @@ static inline int thread_group_empty(struct >>> task_struct *p) >

Re: [PATCH 0/7] devcg: device cgroup extension for rdma resource

2015-09-08 Thread Haggai Eran
On 07/09/2015 23:38, Parav Pandit wrote: > Currently user space applications can easily take away all the rdma > device specific resources such as AH, CQ, QP, MR etc. Due to which other > applications in other cgroup or kernel space ULPs may not even get chance > to allocate any rdma resources. >

Re: [PATCH 6/7] devcg: Added support to use RDMA device cgroup.

2015-09-08 Thread Haggai Eran
On 08/09/2015 13:22, Parav Pandit wrote: > On Tue, Sep 8, 2015 at 2:10 PM, Haggai Eran <hagg...@mellanox.com> wrote: >> On 07/09/2015 23:38, Parav Pandit wrote: >>> +static void init_ucontext_lists(struct ib_ucontext *ucontext) >>> +{ >>> + INIT_LIS

Re: [PATCH 5/7] devcg: device cgroup's extension for RDMA resource.

2015-09-08 Thread Haggai Eran
On 08/09/2015 13:50, Parav Pandit wrote: > On Tue, Sep 8, 2015 at 2:06 PM, Haggai Eran <hagg...@mellanox.com> wrote: >> On 07/09/2015 23:38, Parav Pandit wrote: >>> +void devcgroup_rdma_uncharge_resource(struct ib_ucontext *ucontext, >>> +

Re: [PATCH 5/7] devcg: device cgroup's extension for RDMA resource.

2015-09-08 Thread Haggai Eran
On 08/09/2015 13:18, Parav Pandit wrote: >> > >>> >> + * RDMA resource limits are hierarchical, so the highest configured >>> >> limit of >>> >> + * the hierarchy is enforced. Allowing resource limit configuration to >>> >> default >>> >> + * cgroup allows fair share to kernel space ULPs as

Re: [PATCH 3/7] devcg: Added infrastructure for rdma device cgroup.

2015-09-07 Thread Haggai Eran
On 07/09/2015 23:38, Parav Pandit wrote: > diff --git a/include/linux/device_cgroup.h b/include/linux/device_cgroup.h > index 8b64221..cdbdd60 100644 > --- a/include/linux/device_cgroup.h > +++ b/include/linux/device_cgroup.h > @@ -1,6 +1,57 @@ > +#ifndef _DEVICE_CGROUP > +#define _DEVICE_CGROUP >

Re: [PATCH 4/7] devcg: Added rdma resource tracker object per task

2015-09-07 Thread Haggai Eran
On 07/09/2015 23:38, Parav Pandit wrote: > @@ -2676,7 +2686,7 @@ static inline int thread_group_empty(struct task_struct > *p) > * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring > * subscriptions and synchronises with wait4(). Also used in procfs. Also > * pins the final

[PATCH] libmlx5: Implement query device extended verb

2015-09-06 Thread Haggai Eran
Simply pass the extended query device verb to back to libiverbs, in order to support it. Also share some code with the legacy query device verb. Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- src/mlx5.c | 1 + src/mlx5.h | 3 +++ src/verbs.

[PATCH v1 1/3] Add support for extended query device capabilities

2015-09-03 Thread Haggai Eran
From: Eli Cohen <e...@mellanox.com> Add the verb ibv_query_device_ex which is extensible and allows following commits to add new features to define additional properties. Cc: Moshe Lazer <mos...@mellanox.com> Signed-off-by: Eli Cohen <e...@mellanox.com> Signed-off-by:

[PATCH v1 0/3] libibverbs: On-demand paging support

2015-09-03 Thread Haggai Eran
a const pointer instead of a by-value struct. * check that the application has enough space for ODP capabilities in the provided ibv_device_attr_ex struct. Eli Cohen (1): Add support for extended query device capabilities Haggai Eran (1): Add on-demand paging support Majd Dibbiny (1

[PATCH v1 3/3] libibverbs/examples: Support odp in rc_pingpong

2015-09-03 Thread Haggai Eran
From: Majd Dibbiny <m...@mellanox.com> Signed-off-by: Majd Dibbiny <m...@mellanox.com> Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- examples/rc_pingpong.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/exampl

[PATCH v1 2/3] Add on-demand paging support

2015-09-03 Thread Haggai Eran
the IBV_ACCESS_ON_DEMAND access flag to allow registration of on-demand paging enabled memory regions. Signed-off-by: Shachar Raindel <rain...@mellanox.com> Signed-off-by: Majd Dibbiny <m...@mellanox.com> Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- examples/devinfo

Re: [PATCH 2/3] Add on-demand paging support

2015-09-03 Thread Haggai Eran
On 02/09/2015 22:17, Sagi Grimberg wrote: > On 8/27/2015 6:22 PM, Haggai Eran wrote: >> On-demand paging feature allows registering memory regions without >> pinning >> their pages. Unfortunately the feature doesn't work together will all >> transports and all

[PATCH] IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow

2015-09-01 Thread Haggai Eran
emand paging by adding support for MMU notifiers") Cc: Eli Cohen <e...@mellanox.com> Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- A quick resend without spaces between the Fixes: line and the rest of the signatures, per Or Gerlitz's request. drivers/infiniband/hw/mlx5/mr.

[PATCH] IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow

2015-09-01 Thread Haggai Eran
emand paging by adding support for MMU notifiers") Cc: Eli Cohen <e...@mellanox.com> Signed-off-by: Haggai Eran <hagg...@mellanox.com> --- drivers/infiniband/hw/mlx5/mr.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/i

Re: [PATCH v4 09/14] IB/cm: Expose BTH P_Key in CM and SIDR request events

2015-08-31 Thread Haggai Eran
On 30/08/2015 21:23, Sagi Grimberg wrote: > > Looks like for some reason cm_get_bth_pkey got pkey_index of 0x > instead of 0 (working on the default pkey 0x at entry 0). It looks like the mlx5 driver doesn't interpret the completion format correctly. It takes a field defined in the

[PATCH] IB/cma: Fix net_dev reference leak with failed requests

2015-08-27 Thread Haggai Eran
When no matching listening ID is found for a given request, the net_dev that was used to find the request isn't released. Fixes: 20c36836ecad (IB/cma: Use found net_dev for passive connections) Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 4 1 file

[PATCH v6 1/4] IB/addr: Pass network namespace as a parameter

2015-08-27 Thread Haggai Eran
is added on more levels. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off-by: Guy Shapiro gu...@mellanox.com --- drivers/infiniband/core/addr.c | 17 + drivers/infiniband

[PATCH v6 2/4] IB/cma: Separate port allocation to network namespaces

2015-08-27 Thread Haggai Eran
for the new port-space API. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off-by: Guy Shapiro gu...@mellanox.com --- drivers/infiniband/core/cma.c | 94

[PATCH v6 4/4] IB/ucma: Take the network namespace from the process

2015-08-27 Thread Haggai Eran
From: Guy Shapiro gu...@mellanox.com Add support for network namespaces from user space. This is done by passing the network namespace of the process instead of init_net. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar

[PATCH v6 0/4] Add network namespace support in the RDMA-CM

2015-08-27 Thread Haggai Eran
for network namespaces IB/ucma: Take the network namespace from the process Haggai Eran (1): IB/cma: Separate port allocation to network namespaces drivers/infiniband/core/addr.c | 17 +-- drivers/infiniband/core/cma.c | 129 +++-- drivers

[PATCH v6 3/4] IB/cma: Add support for network namespaces

2015-08-27 Thread Haggai Eran
rdma_destroy_id. In order to preserve the current behavior init_net is passed when calling from other modules. Signed-off-by: Guy Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com

[PATCH 2/3] Add on-demand paging support

2015-08-27 Thread Haggai Eran
the IBV_ACCESS_ON_DEMAND access flag to allow registration of on-demand paging enabled memory regions. Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off-by: Majd Dibbiny m...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com --- examples/devinfo.c| 51

[PATCH 0/3] libibverbs: On-demand paging support

2015-08-27 Thread Haggai Eran
): Add support for extended query device capabilities Haggai Eran (1): Add on-demand paging support Majd Dibbiny (1): libibverbs/examples: Support odp in rc_pingpong Makefile.am | 3 +- examples/devinfo.c| 67 -- examples/rc_pingpong.c

[PATCH 1/3] Add support for extended query device capabilities

2015-08-27 Thread Haggai Eran
From: Eli Cohen e...@mellanox.com Add the verb ibv_query_device_ex which is extensible and allows following commits to add new features to define additional properties. Signed-off-by: Eli Cohen e...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com --- Makefile.am

Re: [PATCH for-next 00/10] Add RoCE support to the mlx5 driver

2015-08-25 Thread Haggai Eran
On 25/08/2015 16:06, Achiad Shochat wrote: On 8/25/2015 3:32 PM, Tom Talpey wrote: But I don't understand how it will work per-GID. What if the target node is RoCEv2 and on another subnet? How will it discover the remote's capability and establish the right protocol? How does the initiator

Re: [PATCH v9 0/4] Sending kernel pathrecord query to user cache server

2015-08-25 Thread Haggai Eran
On 24/08/2015 17:32, Wan, Kaike wrote: On Fri, Aug 14, 2015 at 08:52:05AM -0400, kaike@intel.com wrote: Some tests with namespace have been performed: 1. An unprivileged user cannot bind to the RDMA_NL_GROUP_LS multicast group; 2. An unprivileged user cannot create a new

Re: [PATCH v9 0/4] Sending kernel pathrecord query to user cache server

2015-08-25 Thread Haggai Eran
On 24/08/2015 17:32, Wan, Kaike wrote: On Fri, Aug 14, 2015 at 08:52:05AM -0400, kaike@intel.com wrote: Some tests with namespace have been performed: 1. An unprivileged user cannot bind to the RDMA_NL_GROUP_LS multicast group; 2. An unprivileged user cannot create a new

Re: [PATCH v9 0/4] Sending kernel pathrecord query to user cache server

2015-08-24 Thread Haggai Eran
On 24/08/2015 17:32, Wan, Kaike wrote: On Fri, Aug 14, 2015 at 08:52:05AM -0400, kaike@intel.com wrote: Some tests with namespace have been performed: 1. An unprivileged user cannot bind to the RDMA_NL_GROUP_LS multicast group; 2. An unprivileged user cannot create a new

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-24 Thread Haggai Eran
On 24/08/2015 09:55, Christoph Hellwig wrote: On Mon, Aug 24, 2015 at 09:52:14AM +0300, Haggai Eran wrote: Okay. Maybe you can just add a case for IB_WR_SEND in this patch to avoid hurting bisectability. I've done this already, just waiting for more feedback before resending: http

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-24 Thread Haggai Eran
On 22/08/2015 11:25, Christoph Hellwig wrote: On Sat, Aug 22, 2015 at 06:38:47AM +, Haggai Eran wrote: It looks like the default case in the non-UD branch is currently used to handle plain IB_WR_SEND operations, so the patch would cause these to return an error. Indeed. It's handled

Re: [PATCH v9 0/4] Sending kernel pathrecord query to user cache server

2015-08-22 Thread Haggai Eran
On Saturday, August 22, 2015 2:07 AM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Fri, Aug 14, 2015 at 08:52:05AM -0400, kaike@intel.com wrote: Some tests with namespace have been performed: 1. An unprivileged user cannot bind to the RDMA_NL_GROUP_LS multicast group;

Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes

2015-08-22 Thread Haggai Eran
On Thursday, August 20, 2015 11:52 AM, linux-rdma-ow...@vger.kernel.org linux-rdma-ow...@vger.kernel.org on behalf of Sagi Grimberg sa...@dev.mellanox.co.il wrote: On 8/19/2015 7:37 PM, Christoph Hellwig wrote: We have many WR opcodes that are only supported in kernel space and/or require

Re: [PATCH] IB/sa: Restrict SA Netlink to admin users

2015-08-10 Thread Haggai Eran
On 07/08/2015 00:08, ira.we...@intel.com wrote: @@ -754,6 +764,12 @@ static int ib_nl_handle_resolve_resp(struct sk_buff *skb, int found = 0; int ret; + if (!ns_capable(sock_net(skb-sk)-user_ns, CAP_NET_ADMIN)) { + pr_warn_ratelimited(SA netlink: invalid perm

Re: [PATCH for-next 1/2] IB/core: Add support for RX/TX checksum offload capabilities report

2015-08-06 Thread Haggai Eran
On Wednesday, August 5, 2015 8:16 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Wed, Aug 05, 2015 at 06:34:26PM +0300, Amir Vadai wrote: struct ib_uverbs_ex_query_device { __u32 comp_mask; + __u32 csum_caps; __u32 reserved; }; Uh no. This is the struct

Re: [PATCH for-next 1/2] IB/core: Add support for RX/TX checksum offload capabilities report

2015-08-06 Thread Haggai Eran
On 08/06/2015 02:18 PM, Parav Pandit wrote: On Thu, Aug 6, 2015 at 4:30 PM, Haggai Eran hagg...@mellanox.com mailto:hagg...@mellanox.com wrote: On Wednesday, August 5, 2015 8:16 PM, Jason Gunthorpe jguntho...@obsidianresearch.com mailto:jguntho...@obsidianresearch.com wrote

Re: [PATCH v2 01/12] IB/core: Guarantee that a local_dma_lkey is available

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

[PATCH v4 12/14] IB/cma: Use found net_dev for passive connections

2015-07-30 Thread Haggai Eran
When receiving a new connection in cma_req_handler, we actually already know the net_dev that is used for the connection's creation. Instead of calling cma_translate_addr to resolve the new connection id's source address, just use the net_dev that was found. Signed-off-by: Haggai Eran hagg

[PATCH v4 03/14] IB/core: Find the network device matching connection parameters

2015-07-30 Thread Haggai Eran
ipvlan-like configurations for RDMA CM with IPoIB. To resolve the device in these cases the code will also take the IP address as an additional input. Reviewed-by: Jason Gunthorpe jguntho...@obsidianresearch.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota

[PATCH v4 13/14] IB/cma: Share ib_cm_ids between rdma_cm_ids

2015-07-30 Thread Haggai Eran
. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 59 +++ 1 file changed, 4 insertions(+), 55 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index c1cd47eab149..1f26bff5f780 100644

  1   2   3   4   >