[PATCH 4/9] RDMA/ocrdma: drop unneeded goto

2015-05-28 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr Delete jump to a label on the next line, when that label is not used elsewhere. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // smpl @r@ identifier l; @@ -if (...) goto l; -l: // /smpl

[PATCH 0/9] drop unneeded goto

2015-05-28 Thread Julia Lawall
These patches drop gotos that jump to a label that is at the next instruction, in the case that the label is not used elsewhere in the function. The complete semantic patch that performs this transformation is as follows: // smpl @r@ position p; identifier l; @@ if (...) goto l@p; l:

Re: [PATCH for-next V1 00/11] Add completion timestamping support

2015-05-28 Thread Steve Wise
On 5/21/2015 9:56 AM, Or Gerlitz wrote: Hi Doug, This patchset adds completion timestamping supports for verbs consumers. Timestamping is used by applications in order to know when a WQE was received/transmitted by the HW. The value is given is HCA hardware cycles, but could be easily

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 03:34:00PM -0500, Christoph Lameter wrote: On Thu, 28 May 2015, Jason Gunthorpe wrote: Second: What about wrap around? Does it even make sense to expose less than 64 bits to userspace? Should the driver manage wrap around to create a flat 64 bit space? The wrap

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Christoph Lameter
On Thu, 28 May 2015, Jason Gunthorpe wrote: Second: What about wrap around? Does it even make sense to expose less than 64 bits to userspace? Should the driver manage wrap around to create a flat 64 bit space? The wrap around is given by the mask. Cycle registers are often shorter than 64

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Doug Ledford
On Thu, 2015-05-28 at 22:05 +0300, Or Gerlitz wrote: On Thu, May 28, 2015 at 9:22 PM, Doug Ledford dledf...@redhat.com wrote: I don't think that is what Doug said. Indeed. There is no need to scrap things, but if the design as it stands, and the intended means of creating objects for

NFSoRDMA bi-weekly developers meeting minutes (5/28/15)

2015-05-28 Thread Shirley Ma
Attendees: Jeff Becker (NASA) Yan Burman (Mellanox) Chuck Lever (Oracle) Rupert Dance (Soft Forge) Steve Dickson (Red Hat) Shirley Ma (Oracle) Anna Schumaker (Net App) Devesh Sharma (Avago Tech) Today's meeting notes: NFSoRDMA deployment (Jeff) --- NASA is interested in

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Or Gerlitz
On Thu, May 28, 2015 at 9:22 PM, Doug Ledford dledf...@redhat.com wrote: I don't think that is what Doug said. Indeed. There is no need to scrap things, but if the design as it stands, and the intended means of creating objects for use in containers, is going to result in an unworkable

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 12:14:15PM -0500, Christoph Lameter wrote: On Thu, 28 May 2015, Jason Gunthorpe wrote: After a quick look through, the biggest question in my mind is what should the timestamp value in the wc be? Right now it is some coded thing in clock cycles. This is

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Christoph Lameter
On Thu, 28 May 2015, Jason Gunthorpe wrote: After a quick look through, the biggest question in my mind is what should the timestamp value in the wc be? Right now it is some coded thing in clock cycles. This is sufficient since it can be converted to ns or whatever one wants. Should we

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 01:30:52PM -0500, Christoph Lameter wrote: On Thu, 28 May 2015, Jason Gunthorpe wrote: This is sufficient since it can be converted to ns or whatever one wants. Sure it is sufficient, but is it a robust UAPI, will it support multiple hardware vendors? What

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Christoph Lameter
On Thu, 28 May 2015, Jason Gunthorpe wrote: This is sufficient since it can be converted to ns or whatever one wants. Sure it is sufficient, but is it a robust UAPI, will it support multiple hardware vendors? What would prevent other hardware vendors from exporting their counters? Is

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 07:21:11PM +0300, Or Gerlitz wrote: Anything else except for that (you said reworking of the network scripts and NetworkManager assumptions to make it work)?? IPv6 becomes very broken, child interfaces will generate the same IPv6 addreses for radv and link local

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Doug Ledford
On Thu, 2015-05-28 at 11:43 -0600, Jason Gunthorpe wrote: On Thu, May 28, 2015 at 07:21:11PM +0300, Or Gerlitz wrote: Anything else except for that (you said reworking of the network scripts and NetworkManager assumptions to make it work)?? IPv6 becomes very broken, child interfaces will

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

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 07:34:36PM +0300, Or Gerlitz wrote: As for the RoCE GID table itself, adding in properly net-devices in their native Linux kernel form, namely with if_index and name-space -- seems to me the correct way to go. Well, no, it is goofy. Callers with a path have a

Re: [PATCH 0/3] Add const to various core functions

2015-05-28 Thread ira.weiny
On Thu, May 21, 2015 at 04:40:21PM -0400, ira.we...@intel.com wrote: From: Ira Weiny ira.we...@intel.com Doug, Jason, Were there any issues with these clean ups? I think they stand on their own but I can add them to the OPA series if you prefer. Ira In order to support some of Jason's

Re: [PATCH V3 for-next 1/3] IB/uverbs: Enable device removal when there are active user space applications

2015-05-28 Thread Jason Gunthorpe
On Wed, May 27, 2015 at 11:47:31PM +0300, Yishai Hadas wrote: That's correct, it was chosen from performance reasons to enable parallel commands as part of ib_uverbs_write with minimum synchronization overhead comparing the rwsem. The locking scheme makes no sense, see my other email, design

Re: [PATCH 00/14] IB/mad: Add support for OPA MAD processing.

2015-05-28 Thread Or Gerlitz
On 5/20/2015 11:13 AM, ira.we...@intel.com wrote: Ira Weiny (14): IB/mad: Clean up ib_find_send_mad IB/mad: Create an RMPP Base header IB/mad: Create handle_ib_smi IB/mad: Add helper function for smi_handle_dr_smp_send IB/mad: Add helper function for smi_handle_dr_smp_recv

Re: [PATCH 00/14] IB/mad: Add support for OPA MAD processing.

2015-05-28 Thread Or Gerlitz
On 5/20/2015 11:13 AM, ira.we...@intel.com wrote: Ira Weiny (14): IB/mad: Clean up ib_find_send_mad IB/mad: Create an RMPP Base header IB/mad: Create handle_ib_smi IB/mad: Add helper function for smi_handle_dr_smp_send IB/mad: Add helper function for smi_handle_dr_smp_recv

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Or Gerlitz
On 5/28/2015 1:21 AM, Jason Gunthorpe wrote: exists to support a unique feature of a single hardware vendor that few understand the use case for Responding in EIM (End In Mind) manner The use case is very clear, low latency applications using UD or RAW PACKET QPs that needs to know the time

Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-05-28 Thread Haggai Eran
On 21/05/2015 20:43, Jason Gunthorpe wrote: On Thu, May 21, 2015 at 08:33:53AM +0300, Haggai Eran wrote: To create a new child interface on the default P_Key, its possible to use iproute: # ip link add link ib0 name ib0.1 type ipoib Uh.. A key invariant of the IP stack is that is it

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Haggai Eran
On 26/05/2015 16:34, Doug Ledford wrote: On Sun, 2015-05-17 at 08:50 +0300, Haggai Eran wrote: Thanks again everyone for the review comments. I've updated the patch set accordingly. The main changes are in the first patch to use a read-write semaphore instead of an SRCU, and with the reference

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Haggai Eran
On 26/05/2015 20:46, Doug Ledford wrote: Remember, this isn't RDMA namespaces, this is netdev namespace support for RDMA-CM - very different things. That was the point of my email. This is a very myopic view of the feature. It *should* at least have an idea of these other things too. We

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Haggai Eran
On 26/05/2015 19:59, Jason Gunthorpe wrote: The big open question for ethernet is how to work without relying on VLAN to create delgated netdevs - typically one would use a bridge and veth's, which do not seem very RDMA compatible. But that doesn't need to be answered right now. I think in

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

2015-05-28 Thread Matan Barak
On Wed, May 20, 2015 at 9:17 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Wed, May 20, 2015 at 07:27:15PM +0300, Matan Barak wrote: 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

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Doug Ledford
On Thu, 2015-05-28 at 16:07 +0300, Haggai Eran wrote: On 26/05/2015 16:34, Doug Ledford wrote: On Sun, 2015-05-17 at 08:50 +0300, Haggai Eran wrote: This is a core feature more than anything else. Namespaces for RDMA devices is not unique to IB or RoCE in any way. Yet no thought has been

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Christoph Lameter
On Thu, 28 May 2015, Or Gerlitz wrote: The use case is very clear, low latency applications using UD or RAW PACKET QPs that needs to know the time it takes for different HW/SW layers to get their packets through. The verbs version of SO_TIMESTAMP and friends

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Or Gerlitz
On 5/28/2015 5:07 PM, Doug Ledford wrote: You would think that, but sometimes important information comes from totally different places. See mine and Jason's comments back and forth in the SRIOV thread started by Or. Long story short: ip link add dev ib0 name ib0.1 type ipoib is totally

RE: [PATCH 14/14] IB/mad: Add final OPA MAD processing

2015-05-28 Thread Liran Liss
Why do you have RDMA_NODE_IB_SWITCH related stuff inside the handle_opa_smi() function? Is there a node type of switch in OPA similar to IB? Yes. OPA uses the same node types as IB. Ira No, OPA cannot impersonate IB. It has to have distinct node and link types. --Liran -- To

Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 09:13:41AM -0500, Christoph Lameter wrote: What we have to do without this is to use RDTSC to get a timestamp but the packet reception / sending time then is inaccurate due to the instructions that have to be executed before and after. And there is additional overhead

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

2015-05-28 Thread Or Gerlitz
On 5/28/2015 7:07 PM, Jason Gunthorpe wrote: Patch 8 (the ndev part) is relevant. GID is now related to a ndev and we would like to expose this information to the user. In non rdma-cm applications, how would a user select the gid_index he wants? I don't mean drop forever, I mean, concentrate on

RE: [RESEND PATCH V3 for-next 0/3] HW Device hot-removal support

2015-05-28 Thread Liran Liss
From: Doug Ledford [mailto:dledf...@redhat.com] I suppose that the main issue would be handling existing user memory mappings, which cannot be just invalidated -- the user-space driver may not be aware of the device removal and may access this memory concurrently, and we don't want it

RE: [RESEND PATCH V3 for-next 0/3] HW Device hot-removal support

2015-05-28 Thread Liran Liss
From: Doug Ledford [mailto:dledf...@redhat.com] I suppose that the main issue would be handling existing user memory mappings, which cannot be just invalidated -- the user-space driver may not be aware of the device removal and may access this memory concurrently, and we don't want it

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

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 04:50:09PM +0300, Matan Barak wrote: The argument for removing the gid_type seems reasonable to me. However, I don't think we should be removing net. if_index should always come with net - passing only if_index makes roce_gid_table's API a bit broken. Well, get rid of

Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 02:51:51PM +0300, Haggai Eran wrote: But RDMA CM doesn't provide the QPN. So when RDMA CM searches the netdevs for an address it cannot *uniquely* map to a IPoIB interface. This is technically true, but if someone configures their system that way, they will also

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Jason Gunthorpe
On Thu, May 28, 2015 at 04:22:36PM +0300, Haggai Eran wrote: wouldn't care if they share the QP number namespace, etc. RDMA CM ports are different because they are chosen by the applications, but they map directly to the network namespace, so they don't require their own namespace. Different