Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH v1] rdma_rxe: Ensure rdma_rxe init occurs at correct time
From: Stephen Bates @ 2016-09-23 15:32 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, monis-VPRAkNaXOzVWk0Htik3J/w,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, yonatanc-VPRAkNaXOzVWk0Htik3J/w

This patch is based off v4.8-rc6 with the recent rxe bugfix patchset
applied [1].

There is a problem when CONFIG_RDMA_RXE=y and CONFIG_IPV6=y. This
results in the rdma_rxe initialization occurring before the IPv6
services are ready. This patch delays the initialization of rdma_rxe
until after the IPv6 services are ready. This fix is based on one
proposed by Logan Gunthorpe on a much older code base [2].

[1] http://marc.info/?l=linux-rdma&m=147307739626544&w=2

[2] https://github.com/sbates130272/qemu-minimal/blob/rdma/patches/\
  0001-Changes-needed-to-use-rxe-compiled-into-the-kernel.patch

Changes since v0:
 Improved the commit message
 Added a Reviewed-by tag from Yonatan

Signed-off-by: Stephen Bates <sbates-pv7U853sEMVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yonatan Cohen <yonatanc-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 08e09d9..97bc74a 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -392,5 +392,5 @@ static void __exit rxe_module_exit(void)
 	pr_info("rxe: unloaded\n");
 }

-module_init(rxe_module_init);
+late_initcall(rxe_module_init);
 module_exit(rxe_module_exit);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH rdma-core] Improve global COPYING files
From: Jason Gunthorpe @ 2016-09-23 15:24 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Doug Ledford
In-Reply-To: <20160923080655.GM4088-2ukJVAZIZ/Y@public.gmane.org>

On Fri, Sep 23, 2016 at 11:06:55AM +0300, Leon Romanovsky wrote:
> On Thu, Sep 22, 2016 at 10:13:40PM -0600, Jason Gunthorpe wrote:
> > Upon deeper analysis it seems there are two variations of the 'OpenIB.org BSD
> > license', I am calling them the MIT and FreeBSD variants. They differ only in
> > the text of the disclaimer. The MIT version is used widely as the source
> > license so that version should be the 'default' in the source tree, not the
> > FreeBSD version I had selected initially.
> >
> > Retain the FreeBSD version as we will refer to it in future commits.
> >
> > Elaborate the COPYING file to discuss the license situation in
> > more depth.
> 
> I doubt that we have appropriate knowledge to come into meaningful
> conclusion after "discussion". It is legal issue which should be
> handled by relevant legal departments.

Hi Leon,

I think the commit message was not clear, let me try again:

[PATCH] Document copyright situation and select default license

This patch is not intended to change the copyright or license
situation of any of the original code.

Documentation is provided that identifies the various licenses we
have in the source tree.

The default license for new items after the 'Initial commit' merge is
corrected to match the majority license already in use. This is the
license we recommend all new code use. This corrects a mistake I made
in the 'Unified CMake build system' patch which selected the wrong
license file.

Also provide specific guidance on how the 18 different COPYING files
and per-file copyright headers are intended to be interpreted
within the merged tree.

=======

As you know I've sent emails to various parties on licensing issues,
as those issues are corrected we can update the tree and the copying
summary.

We've already had success correcting one mistake from Intel and
Chelsio, thank you very much to those companies.

It is important we clearly document the current situation so our
downstreams can properly distribute this code.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH v3 0/9] SELinux support for Infiniband RDMA
From: Daniel Jurgens @ 2016-09-23 13:26 UTC (permalink / raw)
  To: Paul Moore, Jason Gunthorpe
  Cc: Leon Romanovsky,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	chrisw-69jw2NvuJkxg9hUCZPvPmw@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	Stephen Smalley,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
In-Reply-To: <CAHC9VhRXDMiK5V0rOQTvtZB0Q8jTX7XecGmAfRhm8oqF9aBaiw@mail.gmail.com>

On 9/20/2016 6:43 PM, Paul Moore wrote:
> On Tue, Sep 6, 2016 at 4:02 PM, Jason Gunthorpe
> <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
>> On Thu, Sep 01, 2016 at 02:06:46PM -0400, Paul Moore wrote:
>>
>>> Jason and/or Daniel, I think it would be helpful if you could explain
>>> both the InifiniBand and IP based approaches for those of us who know
>>> SELinux, but not necessarily the RDMA and InfiniBand portions of this
>>> discussion.  Be verbose and explain it as if we were idiots (I get
>>> called that enough, it must be true).
>> Well, I'm not really familiar with SELinux, I know a little bit about
>> how labels are applied in the netstack, but not that much...
>>
>> The RDMA subsystem supports 4 different networking standards, and they
>> each have their own objects..
> All right, I'm done traveling for a bit and it seems like this
> discussion has settled into a stalemate so let's try to pick things
> back up and sort this out.
>
> Starting we a better RDMA education for me.
>
> So far the discussion has been around providing access controls at the
> transport layer, are there any RDMA entities that are transport
> agnostic that might be better suited for what we are trying to do?  Or
> is it simply that the RDMA layer is tied so tightly to the underlying
> transport that we can't separate the two and have to consider them as
> one?
Welcome back Paul.

I don't think there is a transport agnostic way to provide the kind of control I use in this patch set, which is very Infiniband specific.  RoCE uses VLANs and they are conceptually similar to subnet partitions, but the means of using them is completely different.  To use a different VLAN the user must select a GID for that VLAN.  One could provide a means to control RoCE access to VLANs by labeling GIDs and controlling them in a similar way to how I do PKeys.  That approach doesn't help with Infiniband partitions though, because the same GID can be used on multiple partitions.  It's also not very desirable from a policy writers perspective because it makes it so a bespoke policy is required per node.

Regardless of any other approaches one might like to use to provide access control for RDMA non-Infiniband transport I think controlling access to Infiniband PKeys is still a desirable feature and I don't see any other way to have that.


_______________________________________________
Selinux mailing list
Selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org
To unsubscribe, send email to Selinux-leave-+05T5uksL2pAGbPMOrvdOA@public.gmane.org
To get help, send an email containing "help" to Selinux-request-+05T5uksL2pAGbPMOrvdOA@public.gmane.org

^ permalink raw reply

* [PATCH TRIVIAL infiniband-diags] ibportstate.c: When not switch, port can be router port
From: Hal Rosenstock @ 2016-09-23 13:17 UTC (permalink / raw)
  To: Weiny, Ira; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org


Indicate PortInfo is on CA/RT port rather than just CA port when not
on Switch port. RT is what's used by ibnetdiscover for router nodes.

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/ibportstate.c b/src/ibportstate.c
index cb47aa9..cfb8be7 100644
--- a/src/ibportstate.c
+++ b/src/ibportstate.c
@@ -522,9 +522,9 @@ int main(int argc, char **argv)
 		IBEXIT("Can't set M_Key fields on switch port != 0");
 
 	if (port_op != QUERY || changed)
-		printf("Initial %s PortInfo:\n", is_switch ? "Switch" : "CA");
+		printf("Initial %s PortInfo:\n", is_switch ? "Switch" : "CA/RT");
 	else
-		printf("%s PortInfo:\n", is_switch ? "Switch" : "CA");
+		printf("%s PortInfo:\n", is_switch ? "Switch" : "CA/RT");
 	espeed_cap = get_port_info(&portid, data, portnum, is_switch);
 	show_port_info(&portid, data, portnum, espeed_cap, is_switch);
 	if (is_mlnx_ext_port_info_supported(devid)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH infiniband-diags] ibportstate: Fixed peer port probing when using DR routing
From: Hal Rosenstock @ 2016-09-23 13:06 UTC (permalink / raw)
  To: Knut Omang, Ira Weiny
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Line Holen, Dag Moxnes
In-Reply-To: <430aa17fd12cdcfd735b4215938dc4279e33572d.1474612678.git-series.knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

On 9/23/2016 2:42 AM, Knut Omang wrote:
> From: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Title might be better as:
ibportstate: Fixed switch peer port probing when using DR routing

> 
> When querying a remote port 

on a switch

> using ibportportstate,

Typo: ibportstate

> queries to the peer port
> would result in timeouts. The reason for this is that the DR path (or partial
> DR path was not correctly constructed.

It looks like there are 2 cases fixed below and it's best to describe
them. My take on it is:
1. local LID (for switch port 0) is not yet configured
2. SMI requester port (I think this is what you term remote port above)
is on local rather than remote switch
Is that accurate ?

> Signed-off-by: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Line Holen <line.holen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  src/ibportstate.c | 36 +++++++++++++++++++++++++++---------
>  1 file changed, 27 insertions(+), 9 deletions(-)
> 
> diff --git a/src/ibportstate.c b/src/ibportstate.c
> index cb47aa9..cd0f680 100644
> --- a/src/ibportstate.c
> +++ b/src/ibportstate.c
> @@ -1,6 +1,8 @@
>  /*
>   * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
>   * Copyright (c) 2010,2011 Mellanox Technologies LTD.  All rights reserved.
> + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
> + *
>   *
>   * This software is available to you under a choice of one of two
>   * licenses.  You may choose to be licensed under the terms of the GNU
> @@ -655,15 +657,31 @@ int main(int argc, char **argv)
>  
>  			/* Setup portid for peer port */
>  			memcpy(&peerportid, &portid, sizeof(peerportid));
> -			peerportid.drpath.cnt = 1;
> -			peerportid.drpath.p[1] = (uint8_t) portnum;
> -
> -			/* Set DrSLID to local lid */
> -			if (resolve_self(ibd_ca, ibd_ca_port, &selfportid,
> -						&selfport, 0) < 0)
> -				IBEXIT("could not resolve self");
> -			peerportid.drpath.drslid = (uint16_t) selfportid.lid;
> -			peerportid.drpath.drdlid = 0xffff;
> +			if (portid.lid == 0) {
> +				peerportid.drpath.cnt = portid.drpath.cnt + 1;
> +				if (peerportid.drpath.cnt == IB_SUBNET_PATH_HOPS_MAX) {
> +					exit(0);

Nit: IBEXIT("Too many hops") rather than exit(0)

> +				}
> +				peerportid.drpath.p[peerportid.drpath.cnt] = (uint8_t) portnum;
> +			} else {
> +				/* Set DrSLID to local lid */
> +				if (resolve_portid_str(ibd_ca, ibd_ca_port, &portid, argv[0],
> +						       ibd_dest_type, ibd_sm_id, srcport) < 0)
> +					IBEXIT("could not resolve self");
> +
> +				peerportid.drpath.cnt = 1;
> +				peerportid.drpath.p[1] = (uint8_t) portnum;
> +
> +

Nit: Eliminate extra blank line

> +				/* Use partial LID routing if remote switch */
> +				if ((portid.lid == selfportid.lid)) {
> +					peerportid.drpath.drslid = 0xffff;
> +					peerportid.drpath.drdlid = 0xffff;
> +				} else {
> +					peerportid.drpath.drslid = selfportid.lid;
> +					peerportid.drpath.drdlid = 0xffff;
> +				}

The following can be factored out of the above if/else:
				peerportid.drpath.drdlid = 0xffff;

> +			}
>  
>  			/* Get peer port NodeInfo to obtain peer port number */
>  			is_peer_switch = get_node_info(&peerportid, data);
> 
> base-commit: 2937cf99350a2e423b705e8b8dd10499796a7b41
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH rdma-core] Improve global COPYING files
From: Leon Romanovsky @ 2016-09-23  8:06 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Doug Ledford
In-Reply-To: <20160923041340.GA11269-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 9514 bytes --]

On Thu, Sep 22, 2016 at 10:13:40PM -0600, Jason Gunthorpe wrote:
> Upon deeper analysis it seems there are two variations of the 'OpenIB.org BSD
> license', I am calling them the MIT and FreeBSD variants. They differ only in
> the text of the disclaimer. The MIT version is used widely as the source
> license so that version should be the 'default' in the source tree, not the
> FreeBSD version I had selected initially.
>
> Retain the FreeBSD version as we will refer to it in future commits.
>
> Elaborate the COPYING file to discuss the license situation in
> more depth.

I doubt that we have appropriate knowledge to come into meaningful
conclusion after "discussion". It is legal issue which should be
handled by relevant legal departments.

>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  COPYING         |  6 ------
>  COPYING.BSD     | 26 ----------------------
>  COPYING.BSD_FB  | 22 +++++++++++++++++++
>  COPYING.BSD_MIT | 20 +++++++++++++++++
>  COPYING.md      | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 109 insertions(+), 32 deletions(-)
>  delete mode 100644 COPYING
>  delete mode 100644 COPYING.BSD
>  create mode 100644 COPYING.BSD_FB
>  create mode 100644 COPYING.BSD_MIT
>  create mode 100644 COPYING.md
>
> I have reviewed most of the files now for copyright considerations to
> make sure our licensing is in order.
>
> This is my proposal for the top level COPYING file, and it contains a
> summary of my findings on licensing.
>
> Due to various mistakes in the past things are overly complex, I would
> appreciate any patches to reduce the complexity. eg ensuring that all
> files have a license reference and the removal of the sub dir COPYING
> files.
>
> It would be appreciated if those who hold the copyrights can adjust
> their licenses to match the so-called 'Default Dual License', eg by
> patching the remaining COPYING files to use the correct disclaimer.
>
> Here is my first jab at simplifying:
>
> https://github.com/jgunthorpe/rdma-plumbing/commit/079d840b102906c79ff07b7fe9d5db6bba26517c
>
> diff --git a/COPYING b/COPYING
> deleted file mode 100644
> index ac58180e900c..000000000000
> --- a/COPYING
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -Unless otherwise stated this software is available to you under a choice of
> -one of two licenses.  You may choose to be licensed under the terms of the the
> -OpenIB.org BSD license (see COPYING.BSD) or the GNU General Public License
> -(GPL) Version 2 (see COPYING.GPL2), both included in this package.
> -
> -Refer to individual files for information on the copyright holders.
> diff --git a/COPYING.BSD b/COPYING.BSD
> deleted file mode 100644
> index 59b3a397a13b..000000000000
> --- a/COPYING.BSD
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -		       OpenIB.org BSD license
> -
> -Redistribution and use in source and binary forms, with or without
> -modification, are permitted provided that the following conditions
> -are met:
> -
> -  * Redistributions of source code must retain the above copyright
> -    notice, this list of conditions and the following disclaimer.
> -
> -  * Redistributions in binary form must reproduce the above
> -    copyright notice, this list of conditions and the following
> -    disclaimer in the documentation and/or other materials provided
> -    with the distribution.
> -
> -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
> -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
> -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
> -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> -POSSIBILITY OF SUCH DAMAGE.
> diff --git a/COPYING.BSD_FB b/COPYING.BSD_FB
> new file mode 100644
> index 000000000000..44237612faa3
> --- /dev/null
> +++ b/COPYING.BSD_FB
> @@ -0,0 +1,22 @@
> +		   OpenIB.org BSD license (FreeBSD Variant)
> +
> +Redistribution and use in source and binary forms, with or without
> +modification, are permitted provided that the following conditions are met:
> +
> +  - Redistributions of source code must retain the above copyright notice,
> +    this list of conditions and the following disclaimer.
> +
> +  - Redistributions in binary form must reproduce the above copyright notice,
> +    this list of conditions and the following disclaimer in the documentation
> +    and/or other materials provided with the distribution.
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
> +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> diff --git a/COPYING.BSD_MIT b/COPYING.BSD_MIT
> new file mode 100644
> index 000000000000..a1432b6134e6
> --- /dev/null
> +++ b/COPYING.BSD_MIT
> @@ -0,0 +1,20 @@
> +		     OpenIB.org BSD license (MIT variant)
> +
> +Redistribution and use in source and binary forms, with or without
> +modification, are permitted provided that the following conditions are met:
> +
> +  - Redistributions of source code must retain the above copyright notice,
> +    this list of conditions and the following disclaimer.
> +
> +  - Redistributions in binary form must reproduce the above copyright notice,
> +    this list of conditions and the following disclaimer in the documentation
> +    and/or other materials provided with the distribution.
> +
> +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> +SOFTWARE.
> +
> diff --git a/COPYING.md b/COPYING.md
> new file mode 100644
> index 000000000000..edcb01af9954
> --- /dev/null
> +++ b/COPYING.md
> @@ -0,0 +1,67 @@
> +# Default Dual License
> +
> +Unless otherwise stated this software is available to you under a choice of
> +one of two licenses.  You may choose to be licensed under the terms of the the
> +OpenIB.org BSD (MIT variant) license (see COPYING.BSD_MIT) or the GNU General
> +Public License (GPL) Version 2 (see COPYING.GPL2), both included in this
> +package.
> +
> +Files marked 'See COPYING file' are licensed under the above Dual License.
> +
> +# Other Options
> +
> +Individual source files may use a license different from the above Defaul Dual
> +License. If a license is declared in the file then it supersedes the Default
> +License.
> +
> +If a directory contains a COPYING file then the License from that file becomes
> +the Default License for files in that directory and below.
> +
> +# Copyright Holders
> +
> +Refer to individual files for information on the copyright holders.
> +
> +# License Catalog (Informative, Non Binding)
> +
> +## Providers
> +
> +The following providers use a different license than the Default Dual
> +License. Refer to files in each directory for details.
> +
> +cxbg4
> +: A combination of the
> +    - Default Dual License
> +    - cxgb4/src/queue.h: BSD 3 clause license.
> +
> +hfi1verbs
> +: Dual License: GPLv2 or Intel 3 clause BSD license
> +
> +ipathverbs
> +: Dual License: GPLv2 or PathScale BSD Patent license
> +
> +ocrdma
> +: Dual License: GPLv2 or OpenIB.org BSD (FreeBSD variant), See COPYING.BSD_FB
> +
> +rxe
> +: A combination of the
> +    - Default Dual License
> +    - GPLv2 or PathScale BSD Patent license
> +
> +## Libraries
> +
> +All library compilable source code (.c and .h files) are available under the
> +Default Dual License.
> +
> +Unmarked ancillary files may be available under a Dual License: GPLv2 or
> +OpenIB.org BSD (FreeBSD variant).
> +
> +## Tools (iwpmd, srp_deamon, ibacm)
> +
> +All compilable source code (.c and .h files) are available under the Default
> +Dual License.
> +
> +Unmarked ancillary files may be available under a Dual License: GPLv2 or
> +OpenIB.org BSD (FreeBSD variant).
> +
> +srp_daemon/srp_daemon/srp_daemon.sh: Any one of the GPLv2, a 2 clause BSD
> +license or the CPLv1.
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* [PATCH infiniband-diags] ibportstate: Fixed peer port probing when using DR routing
From: Knut Omang @ 2016-09-23  6:42 UTC (permalink / raw)
  To: Ira Weiny
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Line Holen, Knut Omang,
	Dag Moxnes

From: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

When querying a remote port using ibportportstate, queries to the peer port
would result in timeouts. The reason for this is that the DR path (or partial
DR path was not correctly constructed.

Signed-off-by: Dag Moxnes <dag.moxnes-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Line Holen <line.holen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 src/ibportstate.c | 36 +++++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/src/ibportstate.c b/src/ibportstate.c
index cb47aa9..cd0f680 100644
--- a/src/ibportstate.c
+++ b/src/ibportstate.c
@@ -1,6 +1,8 @@
 /*
  * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
  * Copyright (c) 2010,2011 Mellanox Technologies LTD.  All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ *
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -655,15 +657,31 @@ int main(int argc, char **argv)
 
 			/* Setup portid for peer port */
 			memcpy(&peerportid, &portid, sizeof(peerportid));
-			peerportid.drpath.cnt = 1;
-			peerportid.drpath.p[1] = (uint8_t) portnum;
-
-			/* Set DrSLID to local lid */
-			if (resolve_self(ibd_ca, ibd_ca_port, &selfportid,
-						&selfport, 0) < 0)
-				IBEXIT("could not resolve self");
-			peerportid.drpath.drslid = (uint16_t) selfportid.lid;
-			peerportid.drpath.drdlid = 0xffff;
+			if (portid.lid == 0) {
+				peerportid.drpath.cnt = portid.drpath.cnt + 1;
+				if (peerportid.drpath.cnt == IB_SUBNET_PATH_HOPS_MAX) {
+					exit(0);
+				}
+				peerportid.drpath.p[peerportid.drpath.cnt] = (uint8_t) portnum;
+			} else {
+				/* Set DrSLID to local lid */
+				if (resolve_portid_str(ibd_ca, ibd_ca_port, &portid, argv[0],
+						       ibd_dest_type, ibd_sm_id, srcport) < 0)
+					IBEXIT("could not resolve self");
+
+				peerportid.drpath.cnt = 1;
+				peerportid.drpath.p[1] = (uint8_t) portnum;
+
+
+				/* Use partial LID routing if remote switch */
+				if ((portid.lid == selfportid.lid)) {
+					peerportid.drpath.drslid = 0xffff;
+					peerportid.drpath.drdlid = 0xffff;
+				} else {
+					peerportid.drpath.drslid = selfportid.lid;
+					peerportid.drpath.drdlid = 0xffff;
+				}
+			}
 
 			/* Get peer port NodeInfo to obtain peer port number */
 			is_peer_switch = get_node_info(&peerportid, data);

base-commit: 2937cf99350a2e423b705e8b8dd10499796a7b41
-- 
git-series 0.8.10
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH rdma-core] Improve global COPYING files
From: Jason Gunthorpe @ 2016-09-23  4:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Doug Ledford, Leon Romanovsky

Upon deeper analysis it seems there are two variations of the 'OpenIB.org BSD
license', I am calling them the MIT and FreeBSD variants. They differ only in
the text of the disclaimer. The MIT version is used widely as the source
license so that version should be the 'default' in the source tree, not the
FreeBSD version I had selected initially.

Retain the FreeBSD version as we will refer to it in future commits.

Elaborate the COPYING file to discuss the license situation in
more depth.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 COPYING         |  6 ------
 COPYING.BSD     | 26 ----------------------
 COPYING.BSD_FB  | 22 +++++++++++++++++++
 COPYING.BSD_MIT | 20 +++++++++++++++++
 COPYING.md      | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 109 insertions(+), 32 deletions(-)
 delete mode 100644 COPYING
 delete mode 100644 COPYING.BSD
 create mode 100644 COPYING.BSD_FB
 create mode 100644 COPYING.BSD_MIT
 create mode 100644 COPYING.md

I have reviewed most of the files now for copyright considerations to
make sure our licensing is in order.

This is my proposal for the top level COPYING file, and it contains a
summary of my findings on licensing.

Due to various mistakes in the past things are overly complex, I would
appreciate any patches to reduce the complexity. eg ensuring that all
files have a license reference and the removal of the sub dir COPYING
files.

It would be appreciated if those who hold the copyrights can adjust
their licenses to match the so-called 'Default Dual License', eg by
patching the remaining COPYING files to use the correct disclaimer.

Here is my first jab at simplifying:

https://github.com/jgunthorpe/rdma-plumbing/commit/079d840b102906c79ff07b7fe9d5db6bba26517c

diff --git a/COPYING b/COPYING
deleted file mode 100644
index ac58180e900c..000000000000
--- a/COPYING
+++ /dev/null
@@ -1,6 +0,0 @@
-Unless otherwise stated this software is available to you under a choice of
-one of two licenses.  You may choose to be licensed under the terms of the the
-OpenIB.org BSD license (see COPYING.BSD) or the GNU General Public License
-(GPL) Version 2 (see COPYING.GPL2), both included in this package.
-
-Refer to individual files for information on the copyright holders.
diff --git a/COPYING.BSD b/COPYING.BSD
deleted file mode 100644
index 59b3a397a13b..000000000000
--- a/COPYING.BSD
+++ /dev/null
@@ -1,26 +0,0 @@
-		       OpenIB.org BSD license
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above
-    copyright notice, this list of conditions and the following
-    disclaimer in the documentation and/or other materials provided
-    with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/COPYING.BSD_FB b/COPYING.BSD_FB
new file mode 100644
index 000000000000..44237612faa3
--- /dev/null
+++ b/COPYING.BSD_FB
@@ -0,0 +1,22 @@
+		   OpenIB.org BSD license (FreeBSD Variant)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+  - Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+
+  - Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/COPYING.BSD_MIT b/COPYING.BSD_MIT
new file mode 100644
index 000000000000..a1432b6134e6
--- /dev/null
+++ b/COPYING.BSD_MIT
@@ -0,0 +1,20 @@
+		     OpenIB.org BSD license (MIT variant)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+  - Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+
+  - Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/COPYING.md b/COPYING.md
new file mode 100644
index 000000000000..edcb01af9954
--- /dev/null
+++ b/COPYING.md
@@ -0,0 +1,67 @@
+# Default Dual License
+
+Unless otherwise stated this software is available to you under a choice of
+one of two licenses.  You may choose to be licensed under the terms of the the
+OpenIB.org BSD (MIT variant) license (see COPYING.BSD_MIT) or the GNU General
+Public License (GPL) Version 2 (see COPYING.GPL2), both included in this
+package.
+
+Files marked 'See COPYING file' are licensed under the above Dual License.
+
+# Other Options
+
+Individual source files may use a license different from the above Defaul Dual
+License. If a license is declared in the file then it supersedes the Default
+License.
+
+If a directory contains a COPYING file then the License from that file becomes
+the Default License for files in that directory and below.
+
+# Copyright Holders
+
+Refer to individual files for information on the copyright holders.
+
+# License Catalog (Informative, Non Binding)
+
+## Providers
+
+The following providers use a different license than the Default Dual
+License. Refer to files in each directory for details.
+
+cxbg4
+: A combination of the
+    - Default Dual License
+    - cxgb4/src/queue.h: BSD 3 clause license.
+
+hfi1verbs
+: Dual License: GPLv2 or Intel 3 clause BSD license
+
+ipathverbs
+: Dual License: GPLv2 or PathScale BSD Patent license
+
+ocrdma
+: Dual License: GPLv2 or OpenIB.org BSD (FreeBSD variant), See COPYING.BSD_FB
+
+rxe
+: A combination of the
+    - Default Dual License
+    - GPLv2 or PathScale BSD Patent license
+
+## Libraries
+
+All library compilable source code (.c and .h files) are available under the
+Default Dual License.
+
+Unmarked ancillary files may be available under a Dual License: GPLv2 or
+OpenIB.org BSD (FreeBSD variant).
+
+## Tools (iwpmd, srp_deamon, ibacm)
+
+All compilable source code (.c and .h files) are available under the Default
+Dual License.
+
+Unmarked ancillary files may be available under a Dual License: GPLv2 or
+OpenIB.org BSD (FreeBSD variant).
+
+srp_daemon/srp_daemon/srp_daemon.sh: Any one of the GPLv2, a 2 clause BSD
+license or the CPLv1.
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: [PATCH 22/23] srp_daemon: Move documentation to Documentation/
From: Bart Van Assche @ 2016-09-23  0:07 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Christoph Hellwig
In-Reply-To: <1474495729-17604-23-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On 09/21/2016 03:08 PM, Jason Gunthorpe wrote:
> [ ... ]

Reviewed-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH v3 0/6] server-side NFS/RDMA patches proposed for v4.9
From: J. Bruce Fields @ 2016-09-22 20:38 UTC (permalink / raw)
  To: Chuck Lever
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20160913144246.5733.66229.stgit-Hs+gFlyCn65vLzlybtyyYzGyq/o6K9yX@public.gmane.org>

On Tue, Sep 13, 2016 at 10:52:33AM -0400, Chuck Lever wrote:
> Hi Bruce-
> 
> These are ready for you to consider for your "for v4.9" branch. They
> include:

Sorry for the delay--applying for for 4.9.--b.

> 
> - Fix a couple of reference counting issues
> - Introduce simple RDMA-CM private message exchange
> - Support Remote Invalidation
> 
> Available in the "nfsd-rdma-for-4.9" topic branch of this git repo:
> 
> git://git.linux-nfs.org/projects/cel/cel-2.6.git
> 
> 
> Or for browsing:
> 
> http://git.linux-nfs.org/?p=cel/cel-2.6.git;a=log;h=refs/heads/nfsd-rdma-for-4.9
> 
> 
> Changes since v2:
> - Rebased on v4.8-rc6
> - "SUNRPC: Silence WARN_ON when NFSv4.1 over RDMA is in use" has been merged
> - Revert 64c59a3726f2 (add a "Cc: stable" if you think that's appropriate)
> 
> 
> Changes since v1:
> - Rebased on v4.8-rc3
> - Added Reviewed-by tags
> - Fixed additional bugs found in v4.8
> 
> 
> ---
> 
> Chuck Lever (6):
>       svcauth_gss: Revert 64c59a3726f2 ("Remove unnecessary allocation")
>       svcrdma: Tail iovec leaves an orphaned DMA mapping
>       svcrdma: Skip put_page() when send_reply() fails
>       rpcrdma: RDMA/CM private message data structure
>       svcrdma: Server-side support for rpcrdma_connect_private
>       svcrdma: support Remote Invalidation
> 
> 
>  include/linux/sunrpc/rpc_rdma.h            |   35 ++++++++++++
>  include/linux/sunrpc/svc_rdma.h            |   10 +++
>  net/sunrpc/auth_gss/svcauth_gss.c          |    5 +-
>  net/sunrpc/xprtrdma/svc_rdma_backchannel.c |    2 -
>  net/sunrpc/xprtrdma/svc_rdma_recvfrom.c    |    2 -
>  net/sunrpc/xprtrdma/svc_rdma_sendto.c      |   82 ++++++++++++++++++++--------
>  net/sunrpc/xprtrdma/svc_rdma_transport.c   |   60 +++++++++++++++++---
>  7 files changed, 159 insertions(+), 37 deletions(-)
> 
> --
> Chuck Lever
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: rdma-core, cmake/ninja question
From: Jason Gunthorpe @ 2016-09-22 19:38 UTC (permalink / raw)
  To: Steve Wise; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <01a301d21508$559b52d0$00d1f870$@opengridcomputing.com>

On Thu, Sep 22, 2016 at 02:34:28PM -0500, Steve Wise wrote:

> So if I have a libcxgb4 change to submit, I should submit it against rdma-core,
> ja?

Yes, Doug or Leon will apply it.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: rdma-core, cmake/ninja question
From: Steve Wise @ 2016-09-22 19:34 UTC (permalink / raw)
  To: 'Jason Gunthorpe'; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20160922192932.GA25659-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

> On Thu, Sep 22, 2016 at 01:43:36PM -0500, Steve Wise wrote:
> 
> > > Apply this patch:
> > >
> > > https://github.com/jgunthorpe/rdma-
> > > plumbing/commit/64ed4fd30a2157bdaf0a8f7f1b04d2dad02c1b8f
> > >
> > > It hardwires the search path into libverbs and libverbs will look into
> > > the place it was installed before searching the system library
> > > path. That will eliminate the problem you mentioned above.
> > >
> > > Further, after that patch is applied you can do a rough imitation of
> > > 'run-in-place' like this:
> > >
> > > $ cmake .. -DVERBS_PROVIDER_DIR:PATH=`pwd`/lib -
> > > DSYSCONF_INSTALL_DIR:PATH=/etc
> > >
> >
> > And how do I build this after the cmake?
> 
> Sorry, you always need the -GNinja, I was just being brief
> 
> I also mistyped the ETC name.
> 
> I tested this:
> 
> $ mkdir build ; cd build
> $ cmake .. -GNinja -DVERBS_PROVIDER_DIR:PATH=`pwd`/lib -
> DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc
> $ ninja
> $ strace bin/ibv_devinfo  2>&1 | grep -i rdmav2
> open("/tmp/rdma-core/build/lib/libmlx4-rdmav2.so", O_RDONLY|O_CLOEXEC) = 3
> 
> Note LD_LIBRARY_PATH is needed to run things from outside build/bin/
> 
> I have some thoughts to make this simpler, call it a proof of concept for
> run-from-build ..
> 

No worries.  I'm just thick headed. :)  Its working for me.  I've made a change
to libcxgb4 and can test by running in the build tree. I compile with and
without my change and see that the correct libcxgb4 is being used.  Ship it!  :)

So if I have a libcxgb4 change to submit, I should submit it against rdma-core,
ja?

Thanks Jason!

Steve.



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH] libcxgb4: fix firmware version string
From: Steve Wise @ 2016-09-22 19:29 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

c4iw_query_device() was incorrectly unpacking
the 64b version number from the driver.  This resulted
in ibv_devinfo showing garbage fw verion strings.

Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

---

Testing out the new process. :)

---
 libcxgb4/src/verbs.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libcxgb4/src/verbs.c b/libcxgb4/src/verbs.c
index 3d46f0a..aed547d 100644
--- a/libcxgb4/src/verbs.c
+++ b/libcxgb4/src/verbs.c
@@ -52,7 +52,7 @@ int c4iw_query_device(struct ibv_context *context, struct ibv_device_attr *attr)
 {
 	struct ibv_query_device cmd;
 	uint64_t raw_fw_ver;
-	unsigned major, minor, sub_minor;
+	u8 major, minor, sub_minor, build;
 	int ret;
 
 	ret = ibv_cmd_query_device(context, attr, &raw_fw_ver, &cmd,
@@ -60,12 +60,13 @@ int c4iw_query_device(struct ibv_context *context, struct ibv_device_attr *attr)
 	if (ret)
 		return ret;
 
-	major = (raw_fw_ver >> 32) & 0xffff;
-	minor = (raw_fw_ver >> 16) & 0xffff;
-	sub_minor = raw_fw_ver & 0xffff;
+	major = (raw_fw_ver >> 24) & 0xff;
+	minor = (raw_fw_ver >> 16) & 0xff;
+	sub_minor = (raw_fw_ver >> 8) & 0xff;
+	build = raw_fw_ver & 0xff;
 
 	snprintf(attr->fw_ver, sizeof attr->fw_ver,
-		 "%d.%d.%d", major, minor, sub_minor);
+		 "%d.%d.%d.%d", major, minor, sub_minor, build);
 
 	return 0;
 }
-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* Re: rdma-core, cmake/ninja question
From: Jason Gunthorpe @ 2016-09-22 19:29 UTC (permalink / raw)
  To: Steve Wise; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <019201d21501$3a191a80$ae4b4f80$@opengridcomputing.com>

On Thu, Sep 22, 2016 at 01:43:36PM -0500, Steve Wise wrote:

> > Apply this patch:
> > 
> > https://github.com/jgunthorpe/rdma-
> > plumbing/commit/64ed4fd30a2157bdaf0a8f7f1b04d2dad02c1b8f
> > 
> > It hardwires the search path into libverbs and libverbs will look into
> > the place it was installed before searching the system library
> > path. That will eliminate the problem you mentioned above.
> > 
> > Further, after that patch is applied you can do a rough imitation of
> > 'run-in-place' like this:
> > 
> > $ cmake .. -DVERBS_PROVIDER_DIR:PATH=`pwd`/lib -
> > DSYSCONF_INSTALL_DIR:PATH=/etc
> >
> 
> And how do I build this after the cmake?

Sorry, you always need the -GNinja, I was just being brief

I also mistyped the ETC name.

I tested this:

$ mkdir build ; cd build
$ cmake .. -GNinja -DVERBS_PROVIDER_DIR:PATH=`pwd`/lib -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc
$ ninja
$ strace bin/ibv_devinfo  2>&1 | grep -i rdmav2
open("/tmp/rdma-core/build/lib/libmlx4-rdmav2.so", O_RDONLY|O_CLOEXEC) = 3

Note LD_LIBRARY_PATH is needed to run things from outside build/bin/

I have some thoughts to make this simpler, call it a proof of concept for
run-from-build ..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: rdma-core, cmake/ninja question
From: Steve Wise @ 2016-09-22 18:43 UTC (permalink / raw)
  To: 'Jason Gunthorpe'; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20160922163143.GC6994-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

> > So I have a dev system setup with everything installed from the distro in
/usr.
> > I have my rdma-core git tree.  I change libcxgb4 to fix a bug.  I want to
test
> > it.  I install it to /usr/local and add /etc/ld.so.conf.d/usrlocal.conf.
But
> > that still doesn't work because ldconfig still finds libcxgb4 in /usr/lib64
> > first...
> 
> Apply this patch:
> 
> https://github.com/jgunthorpe/rdma-
> plumbing/commit/64ed4fd30a2157bdaf0a8f7f1b04d2dad02c1b8f
> 
> It hardwires the search path into libverbs and libverbs will look into
> the place it was installed before searching the system library
> path. That will eliminate the problem you mentioned above.
> 
> Further, after that patch is applied you can do a rough imitation of
> 'run-in-place' like this:
> 
> $ cmake .. -DVERBS_PROVIDER_DIR:PATH=`pwd`/lib -
> DSYSCONF_INSTALL_DIR:PATH=/etc
>

And how do I build this after the cmake?

 
> (untested) That hardwires the build directory into libibverbs, so it
> will try to load all drivers from there first.
> 
> Then use
> 
> $ export LD_LIBRARY_PATH=`pwd`/lib
> 
> And all verbs using programs started from that shell will use the full
> new library set and the new providers without having to do make
> install at all.
> 
> I plan to automate this basic approach for 'run in place', please let
> me know if it works for you and makes sense.
> 
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 17/23] umad: Replace .nl with .sp in man pages
From: Jason Gunthorpe @ 2016-09-22 18:10 UTC (permalink / raw)
  To: Hal Rosenstock; +Cc: Leon Romanovsky, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <eccf516a-b193-5f35-4b78-02c6c7b2161c-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On Thu, Sep 22, 2016 at 09:50:55AM -0400, Hal Rosenstock wrote:
> On 9/22/2016 9:25 AM, Leon Romanovsky wrote:

> I'm tracking changes in current repo until things have fully switched
> over. I thought that was what was said to do. Previous changes that
> Jason pushed were also integrated there. So yes, there's some
> duplication of effort until the old repos can safely be abandoned.

I took the prior changes you merged via rebase my tree on yours, that
helped clarify what repos were still active or not. Thanks for
responding.

We have stated no more rebasing, so future patches will be applied
directly to the rdma-core tree hosted in the shared github.

It is enough now to just ack the patches, as with the kernel.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: Unreliable Connection (IBV_QPT_UC) and rdma_accept()
From: Hefty, Sean @ 2016-09-22 17:45 UTC (permalink / raw)
  To: Dong Young Yoon,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <13A5FB85-6677-4641-85F1-0670F62F17E4-63aXycvo3TyHXe+LvDLADg@public.gmane.org>

> I have been trying to implement simple client/server system that uses
> UC instead of RC in order to test the performance of RDMA Writes under
> UC against RDMA Reads under RC. When I switch from RC to UC,
> rdma_accept() at the server fails with “Invalid Argument (EINVAL)”. I
> have tried various values for queue pair attributes and also tried
> RDMA_PS_IB, RDMA_PS_UDP for rdma_create_id(), but nothing has worked
> for me. The problem seems to be very similar to what had been discussed
> in this thread last year: http://www.spinics.net/lists/linux-
> rdma/msg23071.html, yet I could not find the solution to the problem in
> the thread.
> Has there been any development regarding UC since then? I am more than
> happy to provide more information that would help in resolving this
> issue.

I believe the solution is to use port space RDMA_PS_IB, with qp_type = UC.

^ permalink raw reply

* Re: [RFC] IB/mad: Eliminate redundant SM class version defines for OPA
From: ira.weiny @ 2016-09-22 17:41 UTC (permalink / raw)
  To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <4810d736-b0c3-bf73-70c1-975b4af850a3-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On Wed, Sep 21, 2016 at 10:41:57AM -0400, Hal Rosenstock wrote:
> 
> and rename class version define to SM rather than SMP or SMI
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Seems like a good clean up.  I did some minor testing as well.

Reviewed-by: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

> ---
> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
> index 2d49228..17ba07d 100644
> --- a/drivers/infiniband/core/mad.c
> +++ b/drivers/infiniband/core/mad.c
> @@ -769,7 +769,7 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
>  	 * If we are at the start of the LID routed part, don't update the
>  	 * hop_ptr or hop_cnt.  See section 14.2.2, Vol 1 IB spec.
>  	 */
> -	if (opa && smp->class_version == OPA_SMP_CLASS_VERSION) {
> +	if (opa && smp->class_version == OPA_SM_CLASS_VERSION) {
>  		u32 opa_drslid;
>  
>  		if ((opa_get_smp_direction(opa_smp)
> @@ -2167,7 +2167,7 @@ handle_smi(struct ib_mad_port_private *port_priv,
>  	struct ib_mad_hdr *mad_hdr = (struct ib_mad_hdr *)recv->mad;
>  
>  	if (opa && mad_hdr->base_version == OPA_MGMT_BASE_VERSION &&
> -	    mad_hdr->class_version == OPA_SMI_CLASS_VERSION)
> +	    mad_hdr->class_version == OPA_SM_CLASS_VERSION)
>  		return handle_opa_smi(port_priv, qp_info, wc, port_num, recv,
>  				      response);
>  
> diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
> index 7ffc14f..484ed60 100644
> --- a/drivers/infiniband/hw/hfi1/mad.c
> +++ b/drivers/infiniband/hw/hfi1/mad.c
> @@ -128,7 +128,7 @@ static void send_trap(struct hfi1_ibport *ibp, void *data, unsigned len)
>  	smp = send_buf->mad;
>  	smp->base_version = OPA_MGMT_BASE_VERSION;
>  	smp->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED;
> -	smp->class_version = OPA_SMI_CLASS_VERSION;
> +	smp->class_version = OPA_SM_CLASS_VERSION;
>  	smp->method = IB_MGMT_METHOD_TRAP;
>  	ibp->rvp.tid++;
>  	smp->tid = cpu_to_be64(ibp->rvp.tid);
> @@ -343,7 +343,7 @@ static int __subn_get_opa_nodeinfo(struct opa_smp *smp, u32 am, u8 *data,
>  
>  	ni->port_guid = cpu_to_be64(dd->pport[pidx].guid);
>  	ni->base_version = OPA_MGMT_BASE_VERSION;
> -	ni->class_version = OPA_SMI_CLASS_VERSION;
> +	ni->class_version = OPA_SM_CLASS_VERSION;
>  	ni->node_type = 1;     /* channel adapter */
>  	ni->num_ports = ibdev->phys_port_cnt;
>  	/* This is already in network order */
> @@ -379,7 +379,7 @@ static int subn_get_nodeinfo(struct ib_smp *smp, struct ib_device *ibdev,
>  		nip->port_guid = cpu_to_be64(dd->pport[pidx].guid);
>  
>  	nip->base_version = OPA_MGMT_BASE_VERSION;
> -	nip->class_version = OPA_SMI_CLASS_VERSION;
> +	nip->class_version = OPA_SM_CLASS_VERSION;
>  	nip->node_type = 1;     /* channel adapter */
>  	nip->num_ports = ibdev->phys_port_cnt;
>  	/* This is already in network order */
> @@ -2309,7 +2309,7 @@ static int pma_get_opa_classportinfo(struct opa_pma_mad *pmp,
>  		pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD;
>  
>  	p->base_version = OPA_MGMT_BASE_VERSION;
> -	p->class_version = OPA_SMI_CLASS_VERSION;
> +	p->class_version = OPA_SM_CLASS_VERSION;
>  	/*
>  	 * Expected response time is 4.096 usec. * 2^18 == 1.073741824 sec.
>  	 */
> @@ -4029,7 +4029,7 @@ static int process_subn_opa(struct ib_device *ibdev, int mad_flags,
>  
>  	am = be32_to_cpu(smp->attr_mod);
>  	attr_id = smp->attr_id;
> -	if (smp->class_version != OPA_SMI_CLASS_VERSION) {
> +	if (smp->class_version != OPA_SM_CLASS_VERSION) {
>  		smp->status |= IB_SMP_UNSUP_VERSION;
>  		ret = reply((struct ib_mad_hdr *)smp);
>  		return ret;
> @@ -4239,7 +4239,7 @@ static int process_perf_opa(struct ib_device *ibdev, u8 port,
>  
>  	*out_mad = *in_mad;
>  
> -	if (pmp->mad_hdr.class_version != OPA_SMI_CLASS_VERSION) {
> +	if (pmp->mad_hdr.class_version != OPA_SM_CLASS_VERSION) {
>  		pmp->mad_hdr.status |= IB_SMP_UNSUP_VERSION;
>  		return reply((struct ib_mad_hdr *)pmp);
>  	}
> diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
> index c8a773f..981214b 100644
> --- a/include/rdma/ib_mad.h
> +++ b/include/rdma/ib_mad.h
> @@ -46,7 +46,7 @@
>  #define IB_MGMT_BASE_VERSION			1
>  #define OPA_MGMT_BASE_VERSION			0x80
>  
> -#define OPA_SMP_CLASS_VERSION			0x80
> +#define OPA_SM_CLASS_VERSION			0x80
>  
>  /* Management classes */
>  #define IB_MGMT_CLASS_SUBN_LID_ROUTED		0x01
> diff --git a/include/rdma/opa_smi.h b/include/rdma/opa_smi.h
> index 4a529ef..f789611 100644
> --- a/include/rdma/opa_smi.h
> +++ b/include/rdma/opa_smi.h
> @@ -44,8 +44,6 @@
>  #define OPA_MAX_SLS				32
>  #define OPA_MAX_SCS				32
>  
> -#define OPA_SMI_CLASS_VERSION			0x80
> -
>  #define OPA_LID_PERMISSIVE			cpu_to_be32(0xFFFFFFFF)
>  
>  struct opa_smp {
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: rdma-core, cmake/ninja question
From: Jason Gunthorpe @ 2016-09-22 16:31 UTC (permalink / raw)
  To: Steve Wise; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <014501d214ed$6e4472f0$4acd58d0$@opengridcomputing.com>

On Thu, Sep 22, 2016 at 11:21:53AM -0500, Steve Wise wrote:
> > 
> > I recommend *against* running 'make install' to /usr. This is a big
> > package now, it is hard to unwind it once it installs over your
> > system. I really should finish the run in place patch :|
> > 
> > If you do this:
> > 
> > $ echo /usr/local/lib64/ > /etc/ld.so.conf.d/usrlocal.conf && ldconfig
> > 
> > Then you can install to /usr/local/ and things will work as you
> > expect. Note, this depends on a verbs patch that is still only in my
> > preview tree.
> 
> So I have a dev system setup with everything installed from the distro in /usr.
> I have my rdma-core git tree.  I change libcxgb4 to fix a bug.  I want to test
> it.  I install it to /usr/local and add /etc/ld.so.conf.d/usrlocal.conf.  But
> that still doesn't work because ldconfig still finds libcxgb4 in /usr/lib64
> first...

Apply this patch:

https://github.com/jgunthorpe/rdma-plumbing/commit/64ed4fd30a2157bdaf0a8f7f1b04d2dad02c1b8f

It hardwires the search path into libverbs and libverbs will look into
the place it was installed before searching the system library
path. That will eliminate the problem you mentioned above.

Further, after that patch is applied you can do a rough imitation of
'run-in-place' like this:

$ cmake .. -DVERBS_PROVIDER_DIR:PATH=`pwd`/lib -DSYSCONF_INSTALL_DIR:PATH=/etc

(untested) That hardwires the build directory into libibverbs, so it
will try to load all drivers from there first.

Then use

$ export LD_LIBRARY_PATH=`pwd`/lib

And all verbs using programs started from that shell will use the full
new library set and the new providers without having to do make
install at all.

I plan to automate this basic approach for 'run in place', please let
me know if it works for you and makes sense.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: rdma-core, cmake/ninja question
From: Steve Wise @ 2016-09-22 16:23 UTC (permalink / raw)
  To: 'Jason Gunthorpe'; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <014601d214ed$6e4a8d70$4adfa850$@opengridcomputing.com>

> > I recommend *against* running 'make install' to /usr. This is a big
> > package now, it is hard to unwind it once it installs over your
> > system. I really should finish the run in place patch :|
> >
> > If you do this:
> >
> > $ echo /usr/local/lib64/ > /etc/ld.so.conf.d/usrlocal.conf && ldconfig
> >
> > Then you can install to /usr/local/ and things will work as you
> > expect. Note, this depends on a verbs patch that is still only in my
> > preview tree.
> 
> So I have a dev system setup with everything installed from the distro in
> /usr.  I have my rdma-core git tree.  I change libcxgb4 to fix a bug.  I
> want to test it.  I install it to /usr/local and add
> /etc/ld.so.conf.d/usrlocal.conf.  But that still doesn't work because
> ldconfig still finds libcxgb4 in /usr/lib64 first...
> 
> How can I force ldconfig to look in /usr/local/lib64 first?

Actually, I just adjusted the search order with LD_LIBRARY_PATH and got what I
needed.

Thanks!

Steve.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: rdma-core, cmake/ninja question
From: Steve Wise @ 2016-09-22 16:21 UTC (permalink / raw)
  To: 'Jason Gunthorpe'; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20160922154814.GB15212-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

> 
> I recommend *against* running 'make install' to /usr. This is a big
> package now, it is hard to unwind it once it installs over your
> system. I really should finish the run in place patch :|
> 
> If you do this:
> 
> $ echo /usr/local/lib64/ > /etc/ld.so.conf.d/usrlocal.conf && ldconfig
> 
> Then you can install to /usr/local/ and things will work as you
> expect. Note, this depends on a verbs patch that is still only in my
> preview tree.

So I have a dev system setup with everything installed from the distro in /usr.
I have my rdma-core git tree.  I change libcxgb4 to fix a bug.  I want to test
it.  I install it to /usr/local and add /etc/ld.so.conf.d/usrlocal.conf.  But
that still doesn't work because ldconfig still finds libcxgb4 in /usr/lib64
first...

How can I force ldconfig to look in /usr/local/lib64 first?

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH rdma-next V2 0/9] Export vendors specific ABIs
From: Leon Romanovsky @ 2016-09-22 16:09 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jason Gunthorpe,
	Laurence Oberman
In-Reply-To: <20160922144716.GA10032-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

On Thu, Sep 22, 2016 at 07:47:16AM -0700, Christoph Hellwig wrote:
> Hi Leon,
>
> this series look good to me:
>
> Acked-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Thanks, I'm going to pick up your old UAPI redesign series and will
start from there.

>
> Although I would have removed patch 8

I'm not sure about it, but anyway it is separate patch which can be
easily dropped by Doug when he will apply it.

> and add the Kconfig changes to
> each individual driver change instead.

I want logically separate move part and export part of this patch
series.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* RE: [PATCH 09/23] verbs: Fix incorrect type of len
From: Hefty, Sean @ 2016-09-22 16:02 UTC (permalink / raw)
  To: Jason Gunthorpe,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <1474495729-17604-10-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

> gcc remarks:
> 
> ../librdmacm/examples/udpong.c:301:11: warning: comparison of unsigned
> expression < 0 is always false [-Wtype-limits]
>    if (len < 0)
> 
> len is set by:
> 		len = svr_recv(&msg, sizeof msg, &addr, &addrlen);
> 
> And svr_recv returns:
> 
> static ssize_t svr_recv(struct message *msg, size_t size,
> 
> So clearly len is the wrong type, and the error test does
> not work.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Acked-by: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: rdma-core, cmake/ninja question
From: Jason Gunthorpe @ 2016-09-22 15:48 UTC (permalink / raw)
  To: Steve Wise; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <00cc01d214e6$e4cb2d80$ae618880$@opengridcomputing.com>

On Thu, Sep 22, 2016 at 10:35:06AM -0500, Steve Wise wrote:
> Hey Jason, newb question:  
> 
> How do I force the rdma-core to build with /usr as the install prefix, /etc as
> the config dir, and /usr/lib64 as the lib dir?  It seems to default to
> /usr/local..

Yes, that is the GNU standard - it is what configure did.

The equivilant to configure --prefix is:
     -DCMAKE_INSTALL_PREFIX=/usr

You often also need.
     -DCMAKE_INSTALL_SYSCONFDIR=/etc

There are many paths that are configurable, each distro sets them as
appropriate via the packaging scripts. For instance this is what RPM
tells cmake to do on centos6:

/usr/bin/cmake -DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_INSTALL_PREFIX:PATH=/usr
-DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64
-DINCLUDE_INSTALL_DIR:PATH=/usr/include
-DLIB_INSTALL_DIR:PATH=/usr/lib64
-DSYSCONF_INSTALL_DIR:PATH=/etc
-DSHARE_INSTALL_PREFIX:PATH=/usr/share
-DLIB_SUFFIX=64
-DCMAKE_SKIP_RPATH:BOOL=ON
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_BINDIR:PATH=/usr/bin
-DCMAKE_INSTALL_SBINDIR:PATH=/usr/sbin
-DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64
-DCMAKE_INSTALL_LIBEXECDIR:PATH=/usr/libexec
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=/var/lib
-DCMAKE_INSTALL_INCLUDEDIR:PATH=/usr/include
-DCMAKE_INSTALL_INFODIR:PATH=/usr/share/info
-DCMAKE_INSTALL_MANDIR:PATH=/usr/share/man
-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc
-DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=/tmp/
-DCMAKE_INSTALL_INITDDIR:PATH=/etc/rc.d/init.d

Each distro is a little different. This is all the same stuff as
configure, just different names..

I recommend *against* running 'make install' to /usr. This is a big
package now, it is hard to unwind it once it installs over your
system. I really should finish the run in place patch :|

If you do this:

$ echo /usr/local/lib64/ > /etc/ld.so.conf.d/usrlocal.conf && ldconfig

Then you can install to /usr/local/ and things will work as you
expect. Note, this depends on a verbs patch that is still only in my
preview tree.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* rdma-core, cmake/ninja question
From: Steve Wise @ 2016-09-22 15:35 UTC (permalink / raw)
  To: 'Jason Gunthorpe'; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hey Jason, newb question:  

How do I force the rdma-core to build with /usr as the install prefix, /etc as
the config dir, and /usr/lib64 as the lib dir?  It seems to default to
/usr/local..

Thanks!

Steve.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox