Re: [PATCH 03/37] IB/rdmavt: Add protection domain to rdmavt.

2015-12-10 Thread Dennis Dalessandro
On Tue, Dec 08, 2015 at 09:20:27AM +0200, Leon Romanovsky wrote: On Tue, Dec 08, 2015 at 08:28:17AM +0200, Leon Romanovsky wrote: On Mon, Dec 07, 2015 at 03:43:10PM -0500, Dennis Dalessandro wrote: > + > +/* > + * Things that are driver specific, module parameters in hfi1 and qib > + */ >

Re: [PATCH 06/13] irq_poll: remove unused data and max fields

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: [ ... ] Reviewed-by: Bart Van Assche -- 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

Re: [PATCH 09/13] IB/srpt: use the new CQ API

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: [ ... ] Reviewed-by: Bart Van Assche -- 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

Re: [PATCH 03/37] IB/rdmavt: Add protection domain to rdmavt.

2015-12-10 Thread ira.weiny
On Thu, Dec 10, 2015 at 11:49:40AM -0500, Dalessandro, Dennis wrote: > On Tue, Dec 08, 2015 at 02:52:36PM -0500, ira. weiny wrote: > >On Tue, Dec 08, 2015 at 01:17:48PM -0600, Sean Hefty wrote: > >>> > > +struct ib_pd *rvt_alloc_pd(struct ib_device *ibdev, > >>> > > +struct

RE: [PATCH 22/37] IB/rdmavt: Add queue pair data structure to rdmavt

2015-12-10 Thread Hefty, Sean
> >> +struct rvt_rwqe { > >> + u64 wr_id; > >> + u8 num_sge; > >> + struct ib_sge sg_list[0]; > >> +}; > >> + > >> +/* > >> + * This structure is used to contain the head pointer, tail pointer, > >> + * and receive work queue entries as a single memory allocation so > >> + * it can be mmap'ed

RE: [PATCH 03/37] IB/rdmavt: Add protection domain to rdmavt.

2015-12-10 Thread Hefty, Sean
> > How about I reword the comment to say that while we could continue > > allocating PDs being only constrained by system resources, the spec says > > there is a limit so we enforce that? > > I'm ok with that, Sean? That's fine -- To unsubscribe from this list: send the line "unsubscribe

[PATCH for-next 5/6] net/mlx5_core: Warn on unsupported events of QP/RQ/SQ

2015-12-10 Thread Majd Dibbiny
When an event arrives on QP/RQ/SQ, check whether it's supported, and WARN_ON otherwise. Signed-off-by: Majd Dibbiny --- drivers/net/ethernet/mellanox/mlx5/core/qp.c | 52 1 file changed, 52 insertions(+) diff --git

Re: [PATCH 22/37] IB/rdmavt: Add queue pair data structure to rdmavt

2015-12-10 Thread Dennis Dalessandro
On Mon, Dec 07, 2015 at 03:48:17PM -0600, Hefty, Sean wrote: +struct rvt_rwqe { + u64 wr_id; + u8 num_sge; + struct ib_sge sg_list[0]; +}; + +/* + * This structure is used to contain the head pointer, tail pointer, + * and receive work queue entries as a single memory

Re: [PATCH] IB/usnic: Handle 0 counts in resource allocation

2015-12-10 Thread Nelson Escobar
On 12/9/2015 10:47 PM, Leon Romanovsky wrote: > On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote: >> -if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 || !owner) >> +if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 0 || !owner) > Before this change you returned

Re: [PATCH] IB/usnic: Handle 0 counts in resource allocation

2015-12-10 Thread l...@leon.nu
On Thu, Dec 10, 2015 at 11:22:24AM -0800, Nelson Escobar wrote: > On 12/9/2015 10:47 PM, Leon Romanovsky wrote: > > On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote: > >> - if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 || !owner) > >> + if (usnic_vnic_res_free_cnt(vnic,

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

2015-12-10 Thread Dennis Dalessandro
On Thu, Dec 10, 2015 at 07:52:31PM +0200, Leon Romanovsky wrote: On Thu, Dec 10, 2015 at 11:17:09AM -0500, Dennis Dalessandro wrote: On Tue, Dec 08, 2015 at 08:08:21AM +0200, Leon Romanovsky wrote: >On Mon, Dec 07, 2015 at 03:43:06PM -0500, Dennis Dalessandro wrote: >>+ >>+#define

[PATCH for-next 6/6] IB/mlx5: Add Raw Packet Queue Pair (QP) support

2015-12-10 Thread Majd Dibbiny
This patchs adds support for Raw Packet QP for the mlx5 device. Raw Packet QP, unlike other QP types, has no matching mlx5_core_qp object but rather it is built of RQ/SQ/TIR/TIS/TD mlx5_core object. The Raw Packet QP state changes are implemented by changing the state of the sub-objects. Since

[PATCH for-next 1/6] IB/mlx5: Add CQE version 1 support to user space

2015-12-10 Thread Majd Dibbiny
From: Haggai Abramonvsky This patch prepares the infrastructure to work with CQE version 1 if the user-space works this way, otherwise work with CQE version 0. After this patch the kernel still reports CQE version 0. Signed-off-by: Haggai Abramovsky

[PATCH] IB/mlx5: Add Raw Packet Queue Pair (QP) support

2015-12-10 Thread Majd Dibbiny
This patchs adds support for Raw Packet QP for the mlx5 device. Raw Packet QP, unlike other QP types, has no matching mlx5_core_qp object but rather it is built of RQ/SQ/TIR/TIS/TD mlx5_core object. The Raw Packet QP state changes are implemented by changing the state of the sub-objects. Since

[PATCH for-next 3/6] net/mlx5_core: Export transport objects

2015-12-10 Thread Majd Dibbiny
To be used by mlx5_ib in the following patches for implementing RAW PACKET QP. Signed-off-by: Majd Dibbiny --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/srq.c | 2 +-

[PATCH for-next 4/6] net/mlx5_core: Add RQ and SQ event handling

2015-12-10 Thread Majd Dibbiny
RQ/SQ will be used to implement IB verbs QPs, so the IB QP affiliated events are affiliated also with SQs and RQs. Since SQ, RQ and QP resource numbers do not share the same name space, a queue type field was added to the event data to specify the SW object that the event is affiliated with.

[PATCH libmlx5] Add Raw Packet Queue Pair (QP) support

2015-12-10 Thread Majd Dibbiny
1. Add support for RAW Packet WQEs in the post send. 2. Allocate different buffers for RQ and SQ to ensure alignment of the SQ buffer. Signed-off-by: Majd Dibbiny --- Hi Eli, This patch adds support for Raw Packet QP in libmlx5. Raw Packet QP enables the user to send

[PATCH for-next 0/6] Raw Packet QP user-space support for mlx5

2015-12-10 Thread Majd Dibbiny
Hi Eli, This patch set adds support for Raw Packet QP for user-space applications. Raw Packet QP enables the user to send and receive raw packets. The user is responsible of building the packet including the headers. Raw Packet QP is composed of the following sub-objects: 1. RQ: Receive Queue

[PATCH for-next 2/6] IB/mlx5: Exposed CQE version to user-space

2015-12-10 Thread Majd Dibbiny
From: Haggai Abramonvsky Report the CQE version to the user-space via the response of alloc_ucontext command. Signed-off-by: Haggai Abramovsky --- drivers/infiniband/hw/mlx5/main.c | 4 +++- drivers/infiniband/hw/mlx5/user.h

Re: [PATCH v2 03/10] IB/iser: Don't register memory for all immediate data writes

2015-12-10 Thread Sagi Grimberg
On 09/12/2015 21:30, Christoph Hellwig wrote: The iser_reg_rdma_mem calling conventions seem rather confusing, and this patch doesn't help that. But I think that's something to be addressed in bigger cleanup later on. I do plan to rework this area. It would be nice to have it simpler, But I

Re: [PATCH for-next V2 05/11] IB/core: Add rdma_network_type to wc

2015-12-10 Thread Moni Shoua
> No, I am defining an API that *make sense* and doesn't leak useless > details. Of course that doesn't force code duplication or anyhting > like that, just implement it smartly. > > I think mlx made a big mistake returning network_type instead of gid > index, and I don't want to see that error

Re: [PATCH v2 07/10] iser-target: Declare correct flags when accepting a connection

2015-12-10 Thread Sagi Grimberg
Only mrginally related, but can someone explain what zero based virtual addresses means in this context? Does this means it uses the old RFC5046-style header without the read/write_va fields? Or does it mean those fields exist but must always be zero? That's correct, negotiating this bit

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Sagi Grimberg
Doug this is going to conflict with the rdmavt work. So if you take this could you respond on the list. It will also conflict with the iser remote invalidate series. Doug it would help if you share your plans so people can rebase accordingly. -- To unsubscribe from this list: send the line

Re: [PATCH v2 02/10] IB/iser: Reuse ib_sg_to_pages

2015-12-10 Thread Sagi Grimberg
On 09/12/2015 21:28, Christoph Hellwig wrote: On Wed, Dec 09, 2015 at 02:12:00PM +0200, Sagi Grimberg wrote: We have in iser iser_sg_to_page_vec which has exactly the same role as ib_sg_to_pages. Customize the page_vec to hold a fake MR so we can reuse ib_sg_to_pages. Looks good. In the

Re: [PATCH libibcm] cmpost.c: Handle ibv_get_device_list returning no IB devices in init()

2015-12-10 Thread Doug Ledford
On 11/05/2015 12:46 PM, Hefty, Sean wrote: > Merged - thanks. > > This is the first patch against the libibcm in over 4 years. Is there a > reason why this is being used instead of the librdmacm? I ask because I > assumed that the libibcm was basically deprecated. The last release was over

RE: [PATCH V2 1/1] [PATCH 1/1] Ibacm: default pkey for partitioned fabrics

2015-12-10 Thread Hefty, Sean
Thanks - applied -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] IB/mad: Ensure fairness in ib_mad_completion_handler

2015-12-10 Thread ira . weiny
From: Dean Luick It was found that when a process was rapidly sending MADs other processes could be hung in their unregister calls. This would happen when process A was injecting packets fast enough that the single threaded workqueue was never exiting

[PULL REQUEST] Please pull rdma.git

2015-12-10 Thread Doug Ledford
Hi Linus, The following changes since commit 527e9316f8ec44bd53d90fb9f611fa752bb9: Linux 4.4-rc4 (2015-12-06 15:43:12 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git tags/for-linus for you to fetch changes up to

Re: [PATCH] IB/usnic: Handle 0 counts in resource allocation

2015-12-10 Thread Nelson Escobar
On 12/10/2015 11:47 AM, l...@leon.nu wrote: > On Thu, Dec 10, 2015 at 11:22:24AM -0800, Nelson Escobar wrote: >> On 12/9/2015 10:47 PM, Leon Romanovsky wrote: >>> On Wed, Dec 09, 2015 at 10:42:19AM -0800, Nelson Escobar wrote: - if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 1 ||

[PATCH] staging/rdma/hfi1: Fix for module parameter hdrq_entsize when it's 0

2015-12-10 Thread Mike Marciniszyn
From: Sebastian Sanchez If driver is loaded with parameter hdrq_entsize=0, then there's a NULL dereference when the driver gets unloaded. This causes a kernel Oops and prevents the module from being unloaded. This patch fixes this issue by making sure -EINVAL gets

Re: [PATCH v2 1/1] IB/sa: Put netlink request into the request list before sending

2015-12-10 Thread Doug Ledford
On 11/13/2015 08:57 AM, Wan, Kaike wrote: >> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- >> ow...@vger.kernel.org] On Behalf Of kaike@intel.com >> Sent: Friday, October 30, 2015 8:24 AM >> To: linux-rdma@vger.kernel.org >> Cc: Wan, Kaike >> Subject: [PATCH v2 1/1] IB/sa: Put

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

2015-12-10 Thread Jason Gunthorpe
On Thu, Dec 10, 2015 at 03:41:12PM -0800, Christoph Hellwig wrote: > On Thu, Dec 10, 2015 at 10:44:13AM -0700, Jason Gunthorpe wrote: > > > the signature of the function in struct ib_dma_mapping_ops. > > > > It is supposed to be a dma_addr_t 'cookie' not a u64. > > > > A patch to cleanup the

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 12:46:54PM -0500, Doug Ledford wrote: > Organization. Let's be fair, the totally flat namespace you are > preferring is the equivalent of a teenager that is completely incapable > of picking thier dirty laundry up off the floor. It is sloppy, > disorganized, often full of

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 11:07:03AM -0700, Jason Gunthorpe wrote: > The ARM folks do this sort of stuff on a regular basis.. Very early on > Doug prepares a topic branch with only the big change, NFS folks pull > it and then pull your work. Then Doug would send the topic branch to > Linus as soon

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Chuck Lever
> On Dec 10, 2015, at 6:30 PM, Christoph Hellwig wrote: > > On Thu, Dec 10, 2015 at 11:07:03AM -0700, Jason Gunthorpe wrote: >> The ARM folks do this sort of stuff on a regular basis.. Very early on >> Doug prepares a topic branch with only the big change, NFS folks pull >>

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

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:44:13AM -0700, Jason Gunthorpe wrote: > > the signature of the function in struct ib_dma_mapping_ops. > > It is supposed to be a dma_addr_t 'cookie' not a u64. > > A patch to cleanup the core in this area would be appreciated. I walked through the ib_dma_* mess in

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

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 05:29:50PM -0700, Jason Gunthorpe wrote: > Hrm.. sizeof(void *) > sizeof(dma_addr_t) seemed pretty obscure to me, > here is the original discussion: > > https://lkml.org/lkml/2006/12/13/245 > > Sounds like someone was worried about sparc64. I doubt it is an actual > issue

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: net/mlx5: E-Switch, Add SR-IOV (FDB) support

2015-12-10 Thread Dan Carpenter
Hello Saeed Mahameed, The patch 81848731ff40: "net/mlx5: E-Switch, Add SR-IOV (FDB) support" from Dec 1, 2015, leads to the following static checker warning: drivers/net/ethernet/mellanox/mlx5/core/eswitch.c:579 esw_fdb_set_vport_rule() warn: passing zero to 'PTR_ERR'

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 03/37] IB/rdmavt: Add protection domain to rdmavt.

2015-12-10 Thread Dennis Dalessandro
On Tue, Dec 08, 2015 at 02:52:36PM -0500, ira. weiny wrote: On Tue, Dec 08, 2015 at 01:17:48PM -0600, Sean Hefty wrote: > > > +struct ib_pd *rvt_alloc_pd(struct ib_device *ibdev, > > > + struct ib_ucontext *context, > > > + struct ib_udata

Re: [PATCH for-next V2 05/11] IB/core: Add rdma_network_type to wc

2015-12-10 Thread Jason Gunthorpe
On Thu, Dec 10, 2015 at 09:58:51AM +0200, Moni Shoua wrote: > > creating a horrible API, or requiring all vendors to implement a > > network type flag. > > > Actually you haven't suggested anything yet besides a name to the function. > I already said that calculating gid_index from wc and grh

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Jason Gunthorpe
On Thu, Dec 10, 2015 at 11:07:37AM -0500, Chuck Lever wrote: > Invasive IB core changes like this clean up are especially > burdensome for me because NFS/RDMA changes do not normally > go through Doug's tree, so it takes extra co-ordination. The ARM folks do this sort of stuff on a regular

Re: [PATCH 02/13] irq_poll: don't disable new irq_poll instances

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: There is no good reason to start out disabled - drivers can control if the poll instance can be scheduled by simply not scheduling it yet. Reviewed-by: Bart Van Assche -- To unsubscribe from this list: send the line

Re: [PATCH 05/13] irq_poll: mark __irq_poll_complete static

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: [ ... ] Reviewed-by: Bart Van Assche -- 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

Re: [PATCH 04/13] irq_poll: fold irq_poll_disable_pending into irq_poll_softirq

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: > [ ... ] Reviewed-by: Bart Van Assche -- 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

Re: [PATCH 03/13] irq_poll: fold irq_poll_sched_prep into irq_poll_sched

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: @@ -58,7 +62,7 @@ EXPORT_SYMBOL(__irq_poll_complete); * Description: * If a driver consumes less than the assigned budget in its run of the * iopoll handler, it'll end the polled mode by calling this function. The - * iopoll

Re: [PATCH 10/13] IB/srp: use the new CQ API

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: +static void srp_send_done(struct ib_cq *cq, struct ib_wc *wc) +{ + struct srp_iu *iu = container_of(wc->wr_cqe, struct srp_iu, cqe); + struct srp_rdma_ch *ch = cq->cq_context; + + if (likely(wc->status != IB_WC_SUCCESS)) { +

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Doug Ledford
On 12/09/2015 01:44 PM, Christoph Hellwig wrote: > On Wed, Dec 09, 2015 at 01:13:29AM +0200, Or Gerlitz wrote: >> >> Christoph patch is here indeed, it does two things >> >> 1. remove all the ULP device attr alloc, device query, attr free hassle >> 2. adds tons of new fields to struct ib_device >>

Re: [PATCH 03/37] IB/rdmavt: Add protection domain to rdmavt.

2015-12-10 Thread Leon Romanovsky
On Thu, Dec 10, 2015 at 11:40:48AM -0500, Dennis Dalessandro wrote: > On Tue, Dec 08, 2015 at 08:28:17AM +0200, Leon Romanovsky wrote: > >On Mon, Dec 07, 2015 at 03:43:10PM -0500, Dennis Dalessandro wrote: > >>+ > >>+/* > >>+ * Things that are driver specific, module parameters in hfi1 and qib >

Re: [PATCH 07/13] IB: add a proper completion queue abstraction

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: This adds an abstraction that allows ULP to simply pass a completion ^^^ I think this should either be changed into either "an ULP" or "ULPs". +/** + * ib_process_direct_cq - process a CQ in caller

Re: [PATCH 01/13] irq_poll: make blk-iopoll available outside the block layer

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: -enum { - IOPOLL_F_SCHED = 0, - IOPOLL_F_DISABLE= 1, -}; [ ... ] +enum { + IRQ_POLL_F_SCHED= 0, + IRQ_POLL_F_DISABLE = 1, +}; A nitpick: the values of these constants were aligned

Re: [PATCH 08/13] IB/srpt: chain RDMA READ/WRITE requests

2015-12-10 Thread Bart Van Assche
On 12/07/2015 12:51 PM, Christoph Hellwig wrote: Remove struct rdma_iu and instead allocate the struct ib_rdma_wr array early and fill out directly. This allows us to chain the WRs, and thus archive both less lock contention on the HCA workqueue as well as much ^^^ Did you perhaps

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

2015-12-10 Thread Jason Gunthorpe
On Thu, Dec 10, 2015 at 11:17:09AM -0500, Dennis Dalessandro wrote: > On Tue, Dec 08, 2015 at 08:08:21AM +0200, Leon Romanovsky wrote: > >On Mon, Dec 07, 2015 at 03:43:06PM -0500, Dennis Dalessandro wrote: > >>+ > >>+#define BAD_DMA_ADDRESS ((u64)0) Just use DMA_ERROR_CODE. > >>+static u64

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Doug Ledford
On 12/10/2015 11:10 AM, Steve Wise wrote: > > >> -Original Message- >> From: linux-rdma-ow...@vger.kernel.org >> [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Chuck Lever >> Sent: Thursday, December 10, 2015 10:08 AM >> To: linux-rdma@vger.kernel.org >> Cc: ira.weiny; Christoph

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

2015-12-10 Thread Matan Barak
On Thu, Dec 10, 2015 at 5:20 PM, Haggai Eran wrote: > On 10/12/2015 16:59, Matan Barak wrote: >> On Mon, Dec 7, 2015 at 3:18 PM, Haggai Eran wrote: >>> On 12/03/2015 05:44 PM, Matan Barak wrote: Extending core and vendor verb commands require us

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-10 Thread Matan Barak
On Mon, Dec 7, 2015 at 3:42 PM, Haggai Eran wrote: > 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)

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

2015-12-10 Thread Leon Romanovsky
On Thu, Dec 10, 2015 at 11:17:09AM -0500, Dennis Dalessandro wrote: > On Tue, Dec 08, 2015 at 08:08:21AM +0200, Leon Romanovsky wrote: > >On Mon, Dec 07, 2015 at 03:43:06PM -0500, Dennis Dalessandro wrote: > >>+ > >>+#define BAD_DMA_ADDRESS ((u64)0) > >What is the advantage in using directly u64

[PATCH V2 1/1] [PATCH 1/1] Ibacm: default pkey for partitioned fabrics

2015-12-10 Thread kaike . wan
From: Kaike Wan In an insecure IB fabric, the default pkey in a port is 0x, where each node is allowed to talk to any other node in the fabric, including the SA node. However, in a secure fabric, to limit member access, not all nodes can have the full-member default pkey

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

2015-12-10 Thread Dennis Dalessandro
On Thu, Dec 10, 2015 at 02:29:18PM +0200, Haggai Eran wrote: 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

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

2015-12-10 Thread Dennis Dalessandro
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 +* accordance with certain events. This structure should contain a mask +* of the

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

2015-12-10 Thread Dennis Dalessandro
On Thu, Dec 10, 2015 at 01:49:31PM +0200, Haggai Eran wrote: 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

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread santosh.shilim...@oracle.com
+Dave, On 12/10/15 4:49 PM, Chuck Lever wrote: On Dec 10, 2015, at 6:30 PM, Christoph Hellwig wrote: On Thu, Dec 10, 2015 at 11:07:03AM -0700, Jason Gunthorpe wrote: The ARM folks do this sort of stuff on a regular basis.. Very early on Doug prepares a topic branch with

[PATCH for-next] iw_cxgb4: Pass qid range to user space driver

2015-12-10 Thread Hariprasad Shenai
Enhances the t4_dev_status_page to pass the qid start and size attributes from iw_cxgb4 to libcxgb4. Bump the ABI Version to 3 -> To allow libcxgb4 to detect old drivers and revert to the old way of computing the qid ranges. Signed-off-by: Hariprasad Shenai Signed-off-by:

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Chuck Lever
> On Dec 10, 2015, at 3:27 AM, Sagi Grimberg wrote: > > > >> Doug this is going to conflict with the rdmavt work. So if you take this >> could >> you respond on the list. > > It will also conflict with the iser remote invalidate series. > > Doug it would help if

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

2015-12-10 Thread Jason Gunthorpe
On Thu, Dec 10, 2015 at 04:46:24PM -0800, Christoph Hellwig wrote: > On Thu, Dec 10, 2015 at 05:29:50PM -0700, Jason Gunthorpe wrote: > > Hrm.. sizeof(void *) > sizeof(dma_addr_t) seemed pretty obscure to me, > > here is the original discussion: > > > > https://lkml.org/lkml/2006/12/13/245 > > >

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Jason Gunthorpe
On Thu, Dec 10, 2015 at 11:56:50PM -0500, Doug Ledford wrote: > Looking at struct netdevice, it has the sort of organization I would > call reasonable. Things like struct tx_stats is a struct, even though > it's embedded in the parent struct and not a pointer and there is > exactly and only one

Re: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Doug Ledford
On 12/10/2015 06:29 PM, Christoph Hellwig wrote: > On Thu, Dec 10, 2015 at 12:46:54PM -0500, Doug Ledford wrote: >> Organization. Let's be fair, the totally flat namespace you are >> preferring is the equivalent of a teenager that is completely incapable >> of picking thier dirty laundry up off

Re: [PATCH v2 02/10] IB/iser: Reuse ib_sg_to_pages

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:28:59AM +0200, Sagi Grimberg wrote: > We can do that. We'd need to add ib_mr a list member just for fmr > routines. We'll also need that for a FR pool abstraction that would be very helpful. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the

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

2015-12-10 Thread Matan Barak
On Mon, Dec 7, 2015 at 3:18 PM, Haggai Eran 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 user's given command is all zeros. >> Adding ib_is_udata_cleared in order to do so.

[PATCH 2/2] staging/rdma/hfi1: HFI now sends OPA Traps instead of IBTA

2015-12-10 Thread Mike Marciniszyn
From: Erik E. Kahn send_trap() was still using old ib_smp instead of opa_smp for formatting and sending traps. Reviewed-by: Arthur Kepner Reviewed-by: Ira Weiny Reviewed-by: Dennis Dalessandro

[PATCH 0/2] Convert IBTA traps to OPA traps

2015-12-10 Thread Mike Marciniszyn
This two patch series gets rid of the vestigal use of IBTA traps in the hfi1 driver. --- Erik E. Kahn (1): staging/rdma/hfi1: HFI now sends OPA Traps instead of IBTA Jubin John (1): staging/rdma/hfi1: add definitions for OPA traps drivers/staging/rdma/hfi1/mad.c | 121

Re: [PATCH 26/37] IB/rdmavt: Move memory registration into rdmavt

2015-12-10 Thread Sagi Grimberg
/** @@ -83,7 +357,31 @@ struct ib_mr *rvt_reg_phys_mr(struct ib_pd *pd, int num_phys_buf, int acc, u64 *iova_start) { Why do we even bother with reg_phys_mr? Let's drop it entirely. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in

Re: net/mlx5: E-Switch, Add SR-IOV (FDB) support

2015-12-10 Thread Saeed Mahameed
On Thu, Dec 10, 2015 at 12:35 PM, Dan Carpenter wrote: > Hello Saeed Mahameed, > > The patch 81848731ff40: "net/mlx5: E-Switch, Add SR-IOV (FDB) > support" from Dec 1, 2015, leads to the following static checker > warning: > >

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

2015-12-10 Thread Matan Barak
On Mon, Dec 7, 2015 at 3:07 PM, Haggai Eran wrote: > 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

[PATCH 1/2] staging/rdma/hfi1: add definitions for OPA traps

2015-12-10 Thread Mike Marciniszyn
From: Jubin John These new definitions will be used by follow-on patches for formating and sending OPA traps. Reviewed-by: Ira Weiny Signed-off-by: Jubin John --- drivers/staging/rdma/hfi1/mad.h | 114

Re: [PATCH 37/37] IB/rdmavt: Add support for new memory registration API

2015-12-10 Thread Sagi Grimberg
commit 38071a461f0a ("IB/qib: Support the new memory registration API")" added support for map_mr_sg to qib. This patch brings that support into rdmavt, it also adds a register mr function that will be called from the post send routine which is inline with the qib patch. Hi Dennis and Ira,

Re: [PATCH 26/37] IB/rdmavt: Move memory registration into rdmavt

2015-12-10 Thread Christoph Hellwig
On Thu, Dec 10, 2015 at 10:14:56AM -0500, Dennis Dalessandro wrote: > Why? Because, it exists in qib and hfi1. > > However, it seems no one is actually using this in the kernel these days and > the core support was removed in commit 1241d7bf. Yet the function pointer > still exists in struct

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 >>> + * accordance with certain events. This

Re: [PATCH 26/37] IB/rdmavt: Move memory registration into rdmavt

2015-12-10 Thread Dennis Dalessandro
On Thu, Dec 10, 2015 at 04:24:44PM +0200, Sagi Grimberg wrote: /** @@ -83,7 +357,31 @@ struct ib_mr *rvt_reg_phys_mr(struct ib_pd *pd, int num_phys_buf, int acc, u64 *iova_start) { Why do we even bother with reg_phys_mr? Let's drop it entirely. Why?

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

2015-12-10 Thread Dennis Dalessandro
On Thu, Dec 10, 2015 at 05:12:52PM +0200, Haggai Eran wrote: 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

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 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 user's given command is all zeros. >>>

RE: device attr cleanup (was: Handle mlx4 max_sge_rd correctly)

2015-12-10 Thread Steve Wise
> -Original Message- > From: linux-rdma-ow...@vger.kernel.org > [mailto:linux-rdma-ow...@vger.kernel.org] On Behalf Of Chuck Lever > Sent: Thursday, December 10, 2015 10:08 AM > To: linux-rdma@vger.kernel.org > Cc: ira.weiny; Christoph Hellwig; Jason Gunthorpe; Or Gerlitz; Steve Wise;

[PATCH] staging/rdma/hfi1: Fix a possible null pointer dereference

2015-12-10 Thread Mike Marciniszyn
From: Easwar Hariharan A code inspection pointed out that kmalloc_array may return NULL and memset doesn't check the input pointer for NULL, resulting in a possible NULL dereference. This patch fixes this. Reviewed-by: Mike Marciniszyn

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

2015-12-10 Thread Dennis Dalessandro
On Tue, Dec 08, 2015 at 08:08:21AM +0200, Leon Romanovsky wrote: On Mon, Dec 07, 2015 at 03:43:06PM -0500, Dennis Dalessandro wrote: + +#define BAD_DMA_ADDRESS ((u64)0) What is the advantage in using directly u64 values instead of pointers? You will get NULL and functions which return pointers

Re: [PATCH 03/37] IB/rdmavt: Add protection domain to rdmavt.

2015-12-10 Thread Dennis Dalessandro
On Tue, Dec 08, 2015 at 08:28:17AM +0200, Leon Romanovsky wrote: On Mon, Dec 07, 2015 at 03:43:10PM -0500, Dennis Dalessandro wrote: + +/* + * Things that are driver specific, module parameters in hfi1 and qib + */ +struct rvt_driver_params { + int max_pds; Can it be negative value? +};