From cb2bc893585a927b5d32965d2d808dd4af01ae06 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Thu, 29 Sep 2016 11:15:52 -0600 Subject: [PATCH 01/13] ccan: Tidy the LICENSE headers to refer to the exact text For greater clarity and certainty Signed-off-by: Jason Gunthorpe --- ccan/{BSD-MIT => LICENSE.BSD-MIT} | 0 ccan/{CC0 => LICENSE.CCO} | 0 ccan/build_assert.h | 2 +- ccan/check_type.h | 2 +- ccan/container_of.h | 2 +- ccan/list.h | 2 +- ccan/minmax.h | 2 +- ccan/str.c | 2 +- ccan/str.h | 2 +- ccan/str_debug.h | 2 +- 10 files changed, 8 insertions(+), 8 deletions(-) rename ccan/{BSD-MIT => LICENSE.BSD-MIT} (100%) rename ccan/{CC0 => LICENSE.CCO} (100%) diff --git a/ccan/BSD-MIT b/ccan/LICENSE.BSD-MIT similarity index 100% rename from ccan/BSD-MIT rename to ccan/LICENSE.BSD-MIT diff --git a/ccan/CC0 b/ccan/LICENSE.CCO similarity index 100% rename from ccan/CC0 rename to ccan/LICENSE.CCO diff --git a/ccan/build_assert.h b/ccan/build_assert.h index b9ecd8402..0ecd7ff36 100644 --- a/ccan/build_assert.h +++ b/ccan/build_assert.h @@ -1,4 +1,4 @@ -/* CC0 (Public domain) - see LICENSE file for details */ +/* CC0 (Public domain) - see LICENSE.CC0 file for details */ #ifndef CCAN_BUILD_ASSERT_H #define CCAN_BUILD_ASSERT_H diff --git a/ccan/check_type.h b/ccan/check_type.h index 77501a955..7d7ff3769 100644 --- a/ccan/check_type.h +++ b/ccan/check_type.h @@ -1,4 +1,4 @@ -/* CC0 (Public domain) - see LICENSE file for details */ +/* CC0 (Public domain) - see LICENSE.CC0 file for details */ #ifndef CCAN_CHECK_TYPE_H #define CCAN_CHECK_TYPE_H #include "config.h" diff --git a/ccan/container_of.h b/ccan/container_of.h index c91b909f6..9180f37f0 100644 --- a/ccan/container_of.h +++ b/ccan/container_of.h @@ -1,4 +1,4 @@ -/* CC0 (Public domain) - see LICENSE file for details */ +/* CC0 (Public domain) - see LICENSE.CC0 file for details */ #ifndef CCAN_CONTAINER_OF_H #define CCAN_CONTAINER_OF_H #include diff --git a/ccan/list.h b/ccan/list.h index 5bc93ffff..f7954a619 100644 --- a/ccan/list.h +++ b/ccan/list.h @@ -1,4 +1,4 @@ -/* Licensed under BSD-MIT - see LICENSE file for details */ +/* Licensed under BSD-MIT - see LICENSE.BSD-MIT file for details */ #ifndef CCAN_LIST_H #define CCAN_LIST_H //#define CCAN_LIST_DEBUG 1 diff --git a/ccan/minmax.h b/ccan/minmax.h index 5642f6523..ab6c55472 100644 --- a/ccan/minmax.h +++ b/ccan/minmax.h @@ -1,4 +1,4 @@ -/* CC0 (Public domain) - see LICENSE file for details */ +/* CC0 (Public domain) - see LICENSE.CC0 file for details */ #ifndef CCAN_MINMAX_H #define CCAN_MINMAX_H diff --git a/ccan/str.c b/ccan/str.c index e1daadbfd..3da90f4d0 100644 --- a/ccan/str.c +++ b/ccan/str.c @@ -1,4 +1,4 @@ -/* CC0 (Public domain) - see LICENSE file for details */ +/* CC0 (Public domain) - see LICENSE.CC0 file for details */ #include size_t strcount(const char *haystack, const char *needle) diff --git a/ccan/str.h b/ccan/str.h index 4e268b3ae..68c8a518b 100644 --- a/ccan/str.h +++ b/ccan/str.h @@ -1,4 +1,4 @@ -/* CC0 (Public domain) - see LICENSE file for details */ +/* CC0 (Public domain) - see LICENSE.CC0 file for details */ #ifndef CCAN_STR_H #define CCAN_STR_H #include "config.h" diff --git a/ccan/str_debug.h b/ccan/str_debug.h index 92c10c41c..7a3343816 100644 --- a/ccan/str_debug.h +++ b/ccan/str_debug.h @@ -1,4 +1,4 @@ -/* CC0 (Public domain) - see LICENSE file for details */ +/* CC0 (Public domain) - see LICENSE.CC0 file for details */ #ifndef CCAN_STR_DEBUG_H #define CCAN_STR_DEBUG_H From 12fcff3be5bbf30cfeb8422f66efac8db941c322 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Thu, 29 Sep 2016 11:27:32 -0600 Subject: [PATCH 02/13] ccan: Add list.c Needed to use the list debug features. Fixes: c299cfb434521 ("ccan: Add list functionality") Signed-off-by: Jason Gunthorpe --- ccan/CMakeLists.txt | 1 + ccan/list.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ccan/list.c diff --git a/ccan/CMakeLists.txt b/ccan/CMakeLists.txt index 505e0269d..b5de515eb 100644 --- a/ccan/CMakeLists.txt +++ b/ccan/CMakeLists.txt @@ -9,6 +9,7 @@ publish_internal_headers(ccan ) set(C_FILES + list.c str.c ) add_library(ccan STATIC ${C_FILES}) diff --git a/ccan/list.c b/ccan/list.c new file mode 100644 index 000000000..0a163ef77 --- /dev/null +++ b/ccan/list.c @@ -0,0 +1,43 @@ +/* Licensed under BSD-MIT - see LICENSE.BSD-MIT file for details */ +#include +#include +#include "list.h" + +static void *corrupt(const char *abortstr, + const struct list_node *head, + const struct list_node *node, + unsigned int count) +{ + if (abortstr) { + fprintf(stderr, + "%s: prev corrupt in node %p (%u) of %p\n", + abortstr, node, count, head); + abort(); + } + return NULL; +} + +struct list_node *list_check_node(const struct list_node *node, + const char *abortstr) +{ + const struct list_node *p, *n; + int count = 0; + + for (p = node, n = node->next; n != node; p = n, n = n->next) { + count++; + if (n->prev != p) + return corrupt(abortstr, node, n, count); + } + /* Check prev on head node. */ + if (node->prev != p) + return corrupt(abortstr, node, node, 0); + + return (struct list_node *)node; +} + +struct list_head *list_check(const struct list_head *h, const char *abortstr) +{ + if (!list_check_node(&h->n, abortstr)) + return NULL; + return (struct list_head *)h; +} From 9323bd20e2c492d8e37cdee5fccda21ecab39890 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Wed, 21 Sep 2016 21:53:59 -0600 Subject: [PATCH 03/13] 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. Fixes: 8d4ebd8a9c8 ("Unified CMake build system") Signed-off-by: Jason Gunthorpe --- COPYING | 6 ---- COPYING.BSD | 26 ----------------- COPYING.BSD_FB | 22 +++++++++++++++ COPYING.BSD_MIT | 20 +++++++++++++ COPYING.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 117 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 diff --git a/COPYING b/COPYING deleted file mode 100644 index ac58180e9..000000000 --- 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 59b3a397a..000000000 --- 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 000000000..44237612f --- /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 000000000..a1432b613 --- /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 000000000..d3a3919dc --- /dev/null +++ b/COPYING.md @@ -0,0 +1,75 @@ +# 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) + +## Utilities + +Utility source code that may be linked into any binary are available under +several licenses: + + - MIT license (see ccan/LICENSE.BSD-MIT) + - Creative Commons CC0 1.0 Universal License (see ccan/LICENSE.CC0) + +## 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. From 0bc3ff46fc8de71e42fed3554d53fc002484eb90 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Thu, 29 Sep 2016 13:53:38 -0600 Subject: [PATCH 04/13] Remove unneeded COPYING files Each of these files is in a directory where every file contains a copyright header. Our interpretation is that file level headers supersede all other information, thus these COPYING files do not apply. Signed-off-by: Jason Gunthorpe --- libcxgb3/COPYING | 29 ---- libhfi1verbs/COPYING | 55 ------- libi40iw/COPYING | 372 ------------------------------------------ libmlx5/COPYING | 378 ------------------------------------------- libmthca/COPYING | 378 ------------------------------------------- libnes/COPYING | 29 ---- libnes/gpl-2.0.txt | 339 -------------------------------------- libocrdma/COPYING | 317 ------------------------------------ 8 files changed, 1897 deletions(-) delete mode 100644 libcxgb3/COPYING delete mode 100644 libhfi1verbs/COPYING delete mode 100644 libi40iw/COPYING delete mode 100644 libmlx5/COPYING delete mode 100644 libmthca/COPYING delete mode 100644 libnes/COPYING delete mode 100644 libnes/gpl-2.0.txt delete mode 100644 libocrdma/COPYING diff --git a/libcxgb3/COPYING b/libcxgb3/COPYING deleted file mode 100644 index fee65943c..000000000 --- a/libcxgb3/COPYING +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2006-2016. Chelsio Communications. 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 -General Public License (GPL) Version 2, available from the file -COPYING in the main directory of this source tree, or the -OpenIB.org BSD license below: - - 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/libhfi1verbs/COPYING b/libhfi1verbs/COPYING deleted file mode 100644 index 3ecd547e9..000000000 --- a/libhfi1verbs/COPYING +++ /dev/null @@ -1,55 +0,0 @@ - -This file is provided under a dual BSD/GPLv2 license. When using or -redistributing this file, you may do so under either license. - -GPL LICENSE SUMMARY - -Copyright(c) 2015 Intel Corporation. - -This program is free software; you can redistribute it and/or modify -it under the terms of version 2 of the GNU General Public License as -published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -Contact Information: -Intel Corporation -www.intel.com - -BSD LICENSE - -Copyright(c) 2015 Intel Corporation. - -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. - * Neither the name of Intel Corporation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -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. - -Copyright (c) 2013. Intel Corporation. All rights reserved. -Copyright (c) 2007. QLogic Corp. All rights reserved. -Copyright (c) 2005. PathScale, Inc. All rights reserved. - diff --git a/libi40iw/COPYING b/libi40iw/COPYING deleted file mode 100644 index b275c841f..000000000 --- a/libi40iw/COPYING +++ /dev/null @@ -1,372 +0,0 @@ -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 -OpenIB.org BSD license or the GNU General Public License (GPL) -Version 2, both included below. - -====================================================================== - - 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. - -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. - -====================================================================== - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/libmlx5/COPYING b/libmlx5/COPYING deleted file mode 100644 index add3d1990..000000000 --- a/libmlx5/COPYING +++ /dev/null @@ -1,378 +0,0 @@ -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 or the GNU General Public License (GPL) Version -2, both included below. - -Copyright (c) 2007 Cisco, Inc. All rights reserved. - -================================================================== - - 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. - -================================================================== - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/libmthca/COPYING b/libmthca/COPYING deleted file mode 100644 index ee1a79ffa..000000000 --- a/libmthca/COPYING +++ /dev/null @@ -1,378 +0,0 @@ -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 or the GNU General Public License (GPL) Version -2, both included below. - -Copyright (c) 2004 Topspin Communications. All rights reserved. - -================================================================== - - 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. - -================================================================== - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/libnes/COPYING b/libnes/COPYING deleted file mode 100644 index a14e0796c..000000000 --- a/libnes/COPYING +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2006 - 2010 Intel Corporation. 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 -General Public License (GPL) Version 2, available from the file -gpl-2.0.txt in the main directory of this source tree, or the -OpenIB.org BSD license below: - - 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/libnes/gpl-2.0.txt b/libnes/gpl-2.0.txt deleted file mode 100644 index d511905c1..000000000 --- a/libnes/gpl-2.0.txt +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/libocrdma/COPYING b/libocrdma/COPYING deleted file mode 100644 index 170733734..000000000 --- a/libocrdma/COPYING +++ /dev/null @@ -1,317 +0,0 @@ -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 or the GNU General Public License (GPL) Version -2, both included below. - -Copyright (c) 2016 Broadcom Ltd. All rights reserved. - -======================================================================= - 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. -======================================================================== - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS From 5e778843e4a6d66b454abeca8b1c99303d85da1b Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Fri, 26 Aug 2016 20:55:51 -0600 Subject: [PATCH 05/13] Remove HAVE_CONFIG_H The cmake build system guarantees this header exists, we do not need the define or the test. Signed-off-by: Jason Gunthorpe --- CMakeLists.txt | 2 -- ibacm/prov/acmp/src/acmp.c | 4 +--- ibacm/src/acm.c | 4 +--- ibacm/src/acme.c | 4 +--- ibacm/src/libacm.c | 4 +--- libcxgb3/src/cq.c | 4 +--- libcxgb3/src/iwch.c | 4 +--- libcxgb3/src/qp.c | 4 +--- libcxgb3/src/verbs.c | 4 +--- libcxgb4/src/cq.c | 4 +--- libcxgb4/src/dev.c | 4 +--- libcxgb4/src/qp.c | 4 +--- libcxgb4/src/verbs.c | 4 +--- libhfi1verbs/src/hfiverbs.c | 4 +--- libhfi1verbs/src/verbs.c | 4 +--- libi40iw/src/i40iw_umain.c | 2 -- libi40iw/src/i40iw_uverbs.c | 2 -- libibcm/src/cm.c | 4 +--- libibumad/src/sysfs.c | 4 +--- libibumad/src/umad.c | 4 +--- libibumad/tests/umad_reg2_compat.c | 4 +--- libibumad/tests/umad_register2.c | 4 +--- libibverbs/examples/asyncwatch.c | 4 +--- libibverbs/examples/device_list.c | 4 +--- libibverbs/examples/devinfo.c | 4 +--- libibverbs/examples/rc_pingpong.c | 4 +--- libibverbs/examples/srq_pingpong.c | 4 +--- libibverbs/examples/uc_pingpong.c | 4 +--- libibverbs/examples/ud_pingpong.c | 4 +--- libibverbs/examples/xsrq_pingpong.c | 4 +--- libibverbs/src/cmd.c | 4 +--- libibverbs/src/compat-1_0.c | 4 +--- libibverbs/src/device.c | 4 +--- libibverbs/src/init.c | 4 +--- libibverbs/src/marshall.c | 4 +--- libibverbs/src/memory.c | 4 +--- libibverbs/src/sysfs.c | 4 +--- libibverbs/src/verbs.c | 4 +--- libipathverbs/src/ipathverbs.c | 4 +--- libipathverbs/src/verbs.c | 4 +--- libmlx4/src/buf.c | 4 +--- libmlx4/src/cq.c | 4 +--- libmlx4/src/dbrec.c | 4 +--- libmlx4/src/mlx4.c | 4 +--- libmlx4/src/qp.c | 4 +--- libmlx4/src/srq.c | 4 +--- libmlx4/src/verbs.c | 4 +--- libmlx5/src/buf.c | 4 +--- libmlx5/src/cq.c | 5 +---- libmlx5/src/dbrec.c | 4 +--- libmlx5/src/mlx5.c | 4 +--- libmlx5/src/qp.c | 5 +---- libmlx5/src/srq.c | 4 +--- libmlx5/src/verbs.c | 4 +--- libmthca/src/ah.c | 4 +--- libmthca/src/buf.c | 4 +--- libmthca/src/cq.c | 4 +--- libmthca/src/memfree.c | 4 +--- libmthca/src/mthca.c | 4 +--- libmthca/src/qp.c | 4 +--- libmthca/src/srq.c | 4 +--- libmthca/src/verbs.c | 4 +--- libnes/src/nes_umain.c | 2 -- libnes/src/nes_uverbs.c | 2 -- libocrdma/src/ocrdma_main.c | 2 -- libocrdma/src/ocrdma_verbs.c | 2 -- librdmacm/src/acm.c | 4 +--- librdmacm/src/addrinfo.c | 4 +--- librdmacm/src/cma.c | 4 +--- librdmacm/src/cma.h | 4 +--- librdmacm/src/indexer.c | 4 +--- librdmacm/src/indexer.h | 4 +--- librdmacm/src/preload.c | 4 +--- librdmacm/src/rsocket.c | 4 +--- librxe/src/rxe.c | 4 +--- 75 files changed, 68 insertions(+), 220 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e9e13262..a6fc092d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,8 +93,6 @@ endif() # Setup the basic C compiler RDMA_BuildType() include_directories(${BUILD_INCLUDE}) -# FIXME: Eliminate HAVE_CONFIG_H, we always have it. -add_definitions(-DHAVE_CONFIG_H) # Require GNU99 mode RDMA_EnableCStd() diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c index 75231bfef..ed68bd706 100644 --- a/ibacm/prov/acmp/src/acmp.c +++ b/ibacm/prov/acmp/src/acmp.c @@ -28,9 +28,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c index 41429e1db..146fbff61 100644 --- a/ibacm/src/acm.c +++ b/ibacm/src/acm.c @@ -28,9 +28,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/ibacm/src/acme.c b/ibacm/src/acme.c index 4b5fe684c..e96d36ff9 100644 --- a/ibacm/src/acme.c +++ b/ibacm/src/acme.c @@ -28,9 +28,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/ibacm/src/libacm.c b/ibacm/src/libacm.c index 3ad1db1d3..def5b2cf5 100644 --- a/ibacm/src/libacm.c +++ b/ibacm/src/libacm.c @@ -28,9 +28,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include "libacm.h" diff --git a/libcxgb3/src/cq.c b/libcxgb3/src/cq.c index a6393d7b4..1510d1e78 100644 --- a/libcxgb3/src/cq.c +++ b/libcxgb3/src/cq.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libcxgb3/src/iwch.c b/libcxgb3/src/iwch.c index dd0d3711f..aa9b10879 100644 --- a/libcxgb3/src/iwch.c +++ b/libcxgb3/src/iwch.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libcxgb3/src/qp.c b/libcxgb3/src/qp.c index 7dd3c7e34..30dd898f6 100644 --- a/libcxgb3/src/qp.c +++ b/libcxgb3/src/qp.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libcxgb3/src/verbs.c b/libcxgb3/src/verbs.c index a2b737f2a..0cb78d753 100644 --- a/libcxgb3/src/verbs.c +++ b/libcxgb3/src/verbs.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libcxgb4/src/cq.c b/libcxgb4/src/cq.c index a33d48488..1ed7dfdb8 100644 --- a/libcxgb4/src/cq.c +++ b/libcxgb4/src/cq.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libcxgb4/src/dev.c b/libcxgb4/src/dev.c index 8c3ecddc6..316fc0569 100644 --- a/libcxgb4/src/dev.c +++ b/libcxgb4/src/dev.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libcxgb4/src/qp.c b/libcxgb4/src/qp.c index 5444137c4..3c6d02109 100644 --- a/libcxgb4/src/qp.c +++ b/libcxgb4/src/qp.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libcxgb4/src/verbs.c b/libcxgb4/src/verbs.c index aed547dc8..70d250f30 100644 --- a/libcxgb4/src/verbs.c +++ b/libcxgb4/src/verbs.c @@ -29,9 +29,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libhfi1verbs/src/hfiverbs.c b/libhfi1verbs/src/hfiverbs.c index ced438d1a..d2b7dd450 100644 --- a/libhfi1verbs/src/hfiverbs.c +++ b/libhfi1verbs/src/hfiverbs.c @@ -55,9 +55,7 @@ */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libhfi1verbs/src/verbs.c b/libhfi1verbs/src/verbs.c index e245ad9e5..20d435209 100644 --- a/libhfi1verbs/src/verbs.c +++ b/libhfi1verbs/src/verbs.c @@ -55,9 +55,7 @@ */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libi40iw/src/i40iw_umain.c b/libi40iw/src/i40iw_umain.c index ef694a025..1756e65ee 100644 --- a/libi40iw/src/i40iw_umain.c +++ b/libi40iw/src/i40iw_umain.c @@ -32,9 +32,7 @@ * *******************************************************************************/ -#if HAVE_CONFIG_H #include -#endif #include #include diff --git a/libi40iw/src/i40iw_uverbs.c b/libi40iw/src/i40iw_uverbs.c index 8369e10f6..3a6799a9b 100644 --- a/libi40iw/src/i40iw_uverbs.c +++ b/libi40iw/src/i40iw_uverbs.c @@ -32,9 +32,7 @@ * *******************************************************************************/ -#if HAVE_CONFIG_H #include -#endif #include #include diff --git a/libibcm/src/cm.c b/libibcm/src/cm.c index f5318f01f..ebe36bef8 100644 --- a/libibcm/src/cm.c +++ b/libibcm/src/cm.c @@ -33,9 +33,7 @@ * $Id$ */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibumad/src/sysfs.c b/libibumad/src/sysfs.c index 5d9460851..d10f31228 100644 --- a/libibumad/src/sysfs.c +++ b/libibumad/src/sysfs.c @@ -30,9 +30,7 @@ * SOFTWARE. * */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c index a7879d385..176d112e1 100644 --- a/libibumad/src/umad.c +++ b/libibumad/src/umad.c @@ -32,9 +32,7 @@ * */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibumad/tests/umad_reg2_compat.c b/libibumad/tests/umad_reg2_compat.c index 9c239ee4b..264882ccc 100644 --- a/libibumad/tests/umad_reg2_compat.c +++ b/libibumad/tests/umad_reg2_compat.c @@ -31,9 +31,7 @@ * */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibumad/tests/umad_register2.c b/libibumad/tests/umad_register2.c index ed7e816bb..7a9b655ae 100644 --- a/libibumad/tests/umad_register2.c +++ b/libibumad/tests/umad_register2.c @@ -31,9 +31,7 @@ * */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/examples/asyncwatch.c b/libibverbs/examples/asyncwatch.c index c78994d24..7af13bf93 100644 --- a/libibverbs/examples/asyncwatch.c +++ b/libibverbs/examples/asyncwatch.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/examples/device_list.c b/libibverbs/examples/device_list.c index 70c3af51b..13f40ad63 100644 --- a/libibverbs/examples/device_list.c +++ b/libibverbs/examples/device_list.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c index e814bacdf..5fd1affa4 100644 --- a/libibverbs/examples/devinfo.c +++ b/libibverbs/examples/devinfo.c @@ -31,9 +31,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/examples/rc_pingpong.c b/libibverbs/examples/rc_pingpong.c index 5aa3417c6..c92e551c0 100644 --- a/libibverbs/examples/rc_pingpong.c +++ b/libibverbs/examples/rc_pingpong.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/examples/srq_pingpong.c b/libibverbs/examples/srq_pingpong.c index f17972580..863ff10dd 100644 --- a/libibverbs/examples/srq_pingpong.c +++ b/libibverbs/examples/srq_pingpong.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/examples/uc_pingpong.c b/libibverbs/examples/uc_pingpong.c index 7d982d36a..2b105b947 100644 --- a/libibverbs/examples/uc_pingpong.c +++ b/libibverbs/examples/uc_pingpong.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/examples/ud_pingpong.c b/libibverbs/examples/ud_pingpong.c index deefb9b81..d0cd73cc0 100644 --- a/libibverbs/examples/ud_pingpong.c +++ b/libibverbs/examples/ud_pingpong.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/examples/xsrq_pingpong.c b/libibverbs/examples/xsrq_pingpong.c index 903548ed6..c22893e0e 100644 --- a/libibverbs/examples/xsrq_pingpong.c +++ b/libibverbs/examples/xsrq_pingpong.c @@ -31,9 +31,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/src/cmd.c b/libibverbs/src/cmd.c index 11f65095b..06a017b0c 100644 --- a/libibverbs/src/cmd.c +++ b/libibverbs/src/cmd.c @@ -32,9 +32,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/src/compat-1_0.c b/libibverbs/src/compat-1_0.c index 6b1961d19..b286fd73e 100644 --- a/libibverbs/src/compat-1_0.c +++ b/libibverbs/src/compat-1_0.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/src/device.c b/libibverbs/src/device.c index cfdf7cfd3..b4864e3e3 100644 --- a/libibverbs/src/device.c +++ b/libibverbs/src/device.c @@ -31,9 +31,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/src/init.c b/libibverbs/src/init.c index 7ae0fc87d..779756938 100644 --- a/libibverbs/src/init.c +++ b/libibverbs/src/init.c @@ -31,9 +31,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/src/marshall.c b/libibverbs/src/marshall.c index 577b4b1ec..a33048404 100644 --- a/libibverbs/src/marshall.c +++ b/libibverbs/src/marshall.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include diff --git a/libibverbs/src/memory.c b/libibverbs/src/memory.c index 89509c6e3..8e728c4f6 100644 --- a/libibverbs/src/memory.c +++ b/libibverbs/src/memory.c @@ -31,9 +31,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/src/sysfs.c b/libibverbs/src/sysfs.c index 2e68da4bc..d463241ad 100644 --- a/libibverbs/src/sysfs.c +++ b/libibverbs/src/sysfs.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libibverbs/src/verbs.c b/libibverbs/src/verbs.c index debb6f687..b470ba043 100644 --- a/libibverbs/src/verbs.c +++ b/libibverbs/src/verbs.c @@ -32,9 +32,7 @@ */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libipathverbs/src/ipathverbs.c b/libipathverbs/src/ipathverbs.c index 2ae1689a1..9a19d0ab9 100644 --- a/libipathverbs/src/ipathverbs.c +++ b/libipathverbs/src/ipathverbs.c @@ -35,9 +35,7 @@ * product whatsoever. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libipathverbs/src/verbs.c b/libipathverbs/src/verbs.c index 578a38af3..12ca35f32 100644 --- a/libipathverbs/src/verbs.c +++ b/libipathverbs/src/verbs.c @@ -35,9 +35,7 @@ * product whatsoever. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx4/src/buf.c b/libmlx4/src/buf.c index c06b3fded..9b41e7f62 100644 --- a/libmlx4/src/buf.c +++ b/libmlx4/src/buf.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx4/src/cq.c b/libmlx4/src/cq.c index 2edbec8e3..23cc3ed69 100644 --- a/libmlx4/src/cq.c +++ b/libmlx4/src/cq.c @@ -32,9 +32,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx4/src/dbrec.c b/libmlx4/src/dbrec.c index 21ff93664..26d696fb9 100644 --- a/libmlx4/src/dbrec.c +++ b/libmlx4/src/dbrec.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx4/src/mlx4.c b/libmlx4/src/mlx4.c index 1757ca325..326ead413 100644 --- a/libmlx4/src/mlx4.c +++ b/libmlx4/src/mlx4.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx4/src/qp.c b/libmlx4/src/qp.c index 1b730bfea..4b5acd711 100644 --- a/libmlx4/src/qp.c +++ b/libmlx4/src/qp.c @@ -32,9 +32,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx4/src/srq.c b/libmlx4/src/srq.c index 28bc2d41c..c0e028671 100644 --- a/libmlx4/src/srq.c +++ b/libmlx4/src/srq.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx4/src/verbs.c b/libmlx4/src/verbs.c index 5cc82cf38..50a443406 100644 --- a/libmlx4/src/verbs.c +++ b/libmlx4/src/verbs.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx5/src/buf.c b/libmlx5/src/buf.c index 1a681c6a3..7e06095d0 100644 --- a/libmlx5/src/buf.c +++ b/libmlx5/src/buf.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx5/src/cq.c b/libmlx5/src/cq.c index 5ad076c40..2a53c8977 100644 --- a/libmlx5/src/cq.c +++ b/libmlx5/src/cq.c @@ -30,10 +30,7 @@ * SOFTWARE. */ - -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx5/src/dbrec.c b/libmlx5/src/dbrec.c index dbc0e650b..3af81124e 100644 --- a/libmlx5/src/dbrec.c +++ b/libmlx5/src/dbrec.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx5/src/mlx5.c b/libmlx5/src/mlx5.c index 058b52fcd..121a83306 100644 --- a/libmlx5/src/mlx5.c +++ b/libmlx5/src/mlx5.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx5/src/qp.c b/libmlx5/src/qp.c index 9363fddc3..04abe1588 100644 --- a/libmlx5/src/qp.c +++ b/libmlx5/src/qp.c @@ -30,10 +30,7 @@ * SOFTWARE. */ - -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx5/src/srq.c b/libmlx5/src/srq.c index 24979bfb6..a06afa3a5 100644 --- a/libmlx5/src/srq.c +++ b/libmlx5/src/srq.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmlx5/src/verbs.c b/libmlx5/src/verbs.c index 4be602be8..58673f443 100644 --- a/libmlx5/src/verbs.c +++ b/libmlx5/src/verbs.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/ah.c b/libmthca/src/ah.c index d7494d57f..e83d66527 100644 --- a/libmthca/src/ah.c +++ b/libmthca/src/ah.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/buf.c b/libmthca/src/buf.c index 074a5f8dc..78e7b89c4 100644 --- a/libmthca/src/buf.c +++ b/libmthca/src/buf.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/cq.c b/libmthca/src/cq.c index 8b4a6a862..d71d430c6 100644 --- a/libmthca/src/cq.c +++ b/libmthca/src/cq.c @@ -32,9 +32,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/memfree.c b/libmthca/src/memfree.c index 87de4c0f5..77a80e24b 100644 --- a/libmthca/src/memfree.c +++ b/libmthca/src/memfree.c @@ -30,9 +30,7 @@ * SOFTWARE. */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/mthca.c b/libmthca/src/mthca.c index e33bf7ff8..d6bda2d29 100644 --- a/libmthca/src/mthca.c +++ b/libmthca/src/mthca.c @@ -31,9 +31,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/qp.c b/libmthca/src/qp.c index 84dd206d9..715ca65e9 100644 --- a/libmthca/src/qp.c +++ b/libmthca/src/qp.c @@ -31,9 +31,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/srq.c b/libmthca/src/srq.c index 97a0c743f..ff6f53273 100644 --- a/libmthca/src/srq.c +++ b/libmthca/src/srq.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libmthca/src/verbs.c b/libmthca/src/verbs.c index b6782c986..b3bce82af 100644 --- a/libmthca/src/verbs.c +++ b/libmthca/src/verbs.c @@ -31,9 +31,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/libnes/src/nes_umain.c b/libnes/src/nes_umain.c index 16ce3f13c..b4e0bc136 100644 --- a/libnes/src/nes_umain.c +++ b/libnes/src/nes_umain.c @@ -31,9 +31,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H #include -#endif /* HAVE_CONFIG_H */ #include #include diff --git a/libnes/src/nes_uverbs.c b/libnes/src/nes_uverbs.c index 983d87a80..7c2454e7f 100644 --- a/libnes/src/nes_uverbs.c +++ b/libnes/src/nes_uverbs.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H #include -#endif /* HAVE_CONFIG_H */ #include #include diff --git a/libocrdma/src/ocrdma_main.c b/libocrdma/src/ocrdma_main.c index 064ecb318..f3830d9fc 100644 --- a/libocrdma/src/ocrdma_main.c +++ b/libocrdma/src/ocrdma_main.c @@ -32,9 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#if HAVE_CONFIG_H #include -#endif /* HAVE_CONFIG_H */ #include #include diff --git a/libocrdma/src/ocrdma_verbs.c b/libocrdma/src/ocrdma_verbs.c index 628e4bf18..6d58cb219 100644 --- a/libocrdma/src/ocrdma_verbs.c +++ b/libocrdma/src/ocrdma_verbs.c @@ -32,9 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#if HAVE_CONFIG_H #include -#endif /* HAVE_CONFIG_H */ #include #include diff --git a/librdmacm/src/acm.c b/librdmacm/src/acm.c index 823381aac..ad6706b25 100644 --- a/librdmacm/src/acm.c +++ b/librdmacm/src/acm.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/librdmacm/src/addrinfo.c b/librdmacm/src/addrinfo.c index 046b8be11..2f4e674e1 100644 --- a/librdmacm/src/addrinfo.c +++ b/librdmacm/src/addrinfo.c @@ -32,9 +32,7 @@ * $Id: cm.c 3453 2005-09-15 21:43:21Z sean.hefty $ */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/librdmacm/src/cma.c b/librdmacm/src/cma.c index a89e663bc..77f6fea38 100644 --- a/librdmacm/src/cma.c +++ b/librdmacm/src/cma.c @@ -30,9 +30,7 @@ * SOFTWARE. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/librdmacm/src/cma.h b/librdmacm/src/cma.h index ce428deba..d60055382 100644 --- a/librdmacm/src/cma.h +++ b/librdmacm/src/cma.h @@ -34,9 +34,7 @@ #if !defined(CMA_H) #define CMA_H -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/librdmacm/src/indexer.c b/librdmacm/src/indexer.c index be2e69c89..00be7d04c 100644 --- a/librdmacm/src/indexer.c +++ b/librdmacm/src/indexer.c @@ -31,9 +31,7 @@ * */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/librdmacm/src/indexer.h b/librdmacm/src/indexer.h index 0c5f38826..2d1e46eca 100644 --- a/librdmacm/src/indexer.h +++ b/librdmacm/src/indexer.h @@ -34,9 +34,7 @@ #if !defined(INDEXER_H) #define INDEXER_H -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include diff --git a/librdmacm/src/preload.c b/librdmacm/src/preload.c index 2a90f79b2..cf258bf8e 100644 --- a/librdmacm/src/preload.c +++ b/librdmacm/src/preload.c @@ -31,9 +31,7 @@ * */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/librdmacm/src/rsocket.c b/librdmacm/src/rsocket.c index 488d44fb3..7e7a38ee8 100644 --- a/librdmacm/src/rsocket.c +++ b/librdmacm/src/rsocket.c @@ -31,9 +31,7 @@ * */ #define _GNU_SOURCE -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include diff --git a/librxe/src/rxe.c b/librxe/src/rxe.c index 7164f6627..6bd04d696 100644 --- a/librxe/src/rxe.c +++ b/librxe/src/rxe.c @@ -37,9 +37,7 @@ * product whatsoever. */ -#if HAVE_CONFIG_H -# include -#endif /* HAVE_CONFIG_H */ +#include #include #include From ecd75fa01fcb88289f820223051bcb3bcc155d86 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sat, 27 Aug 2016 11:43:01 -0600 Subject: [PATCH 06/13] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND The cmake build system guarantees that valgrind/memcheck.h is present. If the system does not have it, or valgrind is disabled, then it is replaced with a dummy header full of empty stubs. Thus all the copy&paste boiler plate is consolidated into buildlib. Signed-off-by: Jason Gunthorpe --- buildlib/config.h.in | 4 ---- libibcm/src/cm.c | 11 +---------- libibumad/src/umad.c | 14 +------------- libibverbs/src/ibverbs.h | 14 +------------- libmlx4/src/mlx4.h | 18 +----------------- libmlx5/src/mlx5.h | 18 +----------------- libmthca/src/mthca.h | 18 +----------------- librdmacm/src/cma.h | 11 +---------- srp_daemon/srp_daemon/srp_daemon.h | 5 ----- 9 files changed, 7 insertions(+), 106 deletions(-) diff --git a/buildlib/config.h.in b/buildlib/config.h.in index 0a87457e6..a02be9cfb 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -21,10 +21,6 @@ // FIXME: Remove this, The cmake version hard-requires new style CLOEXEC support #define STREAM_CLOEXEC "e" -// FIXME: Remove this, cmake always provides a valgrind/memcheck.h -#define HAVE_VALGRIND_MEMCHECK_H 1 -#define INCLUDE_VALGRIND 1 - #define IBV_CONFIG_DIR "@CONFIG_DIR@" #define RS_CONF_DIR "@CMAKE_INSTALL_FULL_SYSCONFDIR@/rdma/rsocket" #define IWPM_CONFIG_FILE "@CMAKE_INSTALL_FULL_SYSCONFDIR@/iwpmd.conf" diff --git a/libibcm/src/cm.c b/libibcm/src/cm.c index ebe36bef8..f775923aa 100644 --- a/libibcm/src/cm.c +++ b/libibcm/src/cm.c @@ -49,16 +49,7 @@ #include #include -#ifdef INCLUDE_VALGRIND -# include -# ifndef VALGRIND_MAKE_MEM_DEFINED -# warning "Valgrind requested, but VALGRIND_MAKE_MEM_DEFINED undefined" -# endif -#endif - -#ifndef VALGRIND_MAKE_MEM_DEFINED -# define VALGRIND_MAKE_MEM_DEFINED(addr,len) -#endif +#include #define PFX "libibcm: " diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c index 176d112e1..0c969f1eb 100644 --- a/libibumad/src/umad.c +++ b/libibumad/src/umad.c @@ -52,19 +52,7 @@ #define IB_OPENIB_OUI (0x001405) -#ifdef HAVE_VALGRIND_MEMCHECK_H - -# include - -# ifndef VALGRIND_MAKE_MEM_DEFINED -# warning "Valgrind support requested, but VALGRIND_MAKE_MEM_DEFINED not available" -# endif - -#endif /* HAVE_VALGRIND_MEMCHECK_H */ - -#ifndef VALGRIND_MAKE_MEM_DEFINED -# define VALGRIND_MAKE_MEM_DEFINED(addr,len) -#endif +#include typedef struct ib_user_mad_reg_req { uint32_t id; diff --git a/libibverbs/src/ibverbs.h b/libibverbs/src/ibverbs.h index 062a49091..7892af4ad 100644 --- a/libibverbs/src/ibverbs.h +++ b/libibverbs/src/ibverbs.h @@ -38,19 +38,7 @@ #include -#ifdef HAVE_VALGRIND_MEMCHECK_H - -# include - -# ifndef VALGRIND_MAKE_MEM_DEFINED -# warning "Valgrind support requested, but VALGRIND_MAKE_MEM_DEFINED not available" -# endif - -#endif /* HAVE_VALGRIND_MEMCHECK_H */ - -#ifndef VALGRIND_MAKE_MEM_DEFINED -# define VALGRIND_MAKE_MEM_DEFINED(addr, len) 0 -#endif +#include #define HIDDEN __attribute__((visibility ("hidden"))) diff --git a/libmlx4/src/mlx4.h b/libmlx4/src/mlx4.h index feea3386f..4551141d2 100644 --- a/libmlx4/src/mlx4.h +++ b/libmlx4/src/mlx4.h @@ -47,23 +47,7 @@ #define uninitialized_var(x) x = x #endif -#ifdef HAVE_VALGRIND_MEMCHECK_H - -# include - -# if !defined(VALGRIND_MAKE_MEM_DEFINED) || !defined(VALGRIND_MAKE_MEM_UNDEFINED) -# warning "Valgrind support requested, but VALGRIND_MAKE_MEM_(UN)DEFINED not available" -# endif - -#endif /* HAVE_VALGRIND_MEMCHECK_H */ - -#ifndef VALGRIND_MAKE_MEM_DEFINED -# define VALGRIND_MAKE_MEM_DEFINED(addr,len) -#endif - -#ifndef VALGRIND_MAKE_MEM_UNDEFINED -# define VALGRIND_MAKE_MEM_UNDEFINED(addr,len) -#endif +#include #ifndef rmb # define rmb() mb() diff --git a/libmlx5/src/mlx5.h b/libmlx5/src/mlx5.h index 6c4e83002..aa8b6fece 100644 --- a/libmlx5/src/mlx5.h +++ b/libmlx5/src/mlx5.h @@ -52,23 +52,7 @@ #define uninitialized_var(x) x = x #endif -#ifdef HAVE_VALGRIND_MEMCHECK_H - -# include - -# if !defined(VALGRIND_MAKE_MEM_DEFINED) || !defined(VALGRIND_MAKE_MEM_UNDEFINED) -# warning "Valgrind support requested, but VALGRIND_MAKE_MEM_(UN)DEFINED not available" -# endif - -#endif /* HAVE_VALGRIND_MEMCHECK_H */ - -#ifndef VALGRIND_MAKE_MEM_DEFINED -# define VALGRIND_MAKE_MEM_DEFINED(addr, len) -#endif - -#ifndef VALGRIND_MAKE_MEM_UNDEFINED -# define VALGRIND_MAKE_MEM_UNDEFINED(addr, len) -#endif +#include #ifndef rmb # define rmb() mb() diff --git a/libmthca/src/mthca.h b/libmthca/src/mthca.h index bd1e7a2b1..18d522913 100644 --- a/libmthca/src/mthca.h +++ b/libmthca/src/mthca.h @@ -39,23 +39,7 @@ #include #include -#ifdef HAVE_VALGRIND_MEMCHECK_H - -# include - -# if !defined(VALGRIND_MAKE_MEM_DEFINED) || !defined(VALGRIND_MAKE_MEM_UNDEFINED) -# warning "Valgrind support requested, but VALGRIND_MAKE_MEM_(UN)DEFINED not available" -# endif - -#endif /* HAVE_VALGRIND_MEMCHECK_H */ - -#ifndef VALGRIND_MAKE_MEM_DEFINED -# define VALGRIND_MAKE_MEM_DEFINED(addr,len) -#endif - -#ifndef VALGRIND_MAKE_MEM_UNDEFINED -# define VALGRIND_MAKE_MEM_UNDEFINED(addr,len) -#endif +#include #ifndef rmb # define rmb() mb() diff --git a/librdmacm/src/cma.h b/librdmacm/src/cma.h index d60055382..16a55a67a 100644 --- a/librdmacm/src/cma.h +++ b/librdmacm/src/cma.h @@ -47,16 +47,7 @@ #include -#ifdef INCLUDE_VALGRIND -# include -# ifndef VALGRIND_MAKE_MEM_DEFINED -# warning "Valgrind requested, but VALGRIND_MAKE_MEM_DEFINED undefined" -# endif -#endif - -#ifndef VALGRIND_MAKE_MEM_DEFINED -# define VALGRIND_MAKE_MEM_DEFINED(addr,len) -#endif +#include #define PFX "librdmacm: " diff --git a/srp_daemon/srp_daemon/srp_daemon.h b/srp_daemon/srp_daemon/srp_daemon.h index 6d1575519..d6a2d8a84 100644 --- a/srp_daemon/srp_daemon/srp_daemon.h +++ b/srp_daemon/srp_daemon/srp_daemon.h @@ -408,12 +408,7 @@ typedef struct { char filler[MAD_BLOCK_SIZE]; } srp_ib_user_mad_t; -#if defined(HAVE_VALGRIND_DRD_H) && defined(ENABLE_VALGRIND) #include -#endif -#ifndef ANNOTATE_BENIGN_RACE_SIZED -#define ANNOTATE_BENIGN_RACE_SIZED(a, b, c) do { } while(0) -#endif #define pr_human(arg...) \ do { \ From c5c7e32796b19c3707620a3d2f6b32d00d2fbc3c Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sat, 27 Aug 2016 11:47:57 -0600 Subject: [PATCH 07/13] Remove HAVE_IBV_* These were used to support building provider plugins against old versions of libibverbs. Since libibverbs is now included together with the provider that is no longer possible or supported. Signed-off-by: Jason Gunthorpe --- buildlib/config.h.in | 6 ---- libhfi1verbs/src/hfiverbs.c | 18 ----------- libipathverbs/src/ipathverbs.c | 18 ----------- libmlx5/src/buf.c | 19 ----------- libmlx5/src/mlx5.c | 4 --- libmlx5/src/verbs.c | 2 -- libmthca/src/buf.c | 19 ----------- libmthca/src/mthca.c | 58 ---------------------------------- librxe/src/rxe.c | 14 -------- 9 files changed, 158 deletions(-) diff --git a/buildlib/config.h.in b/buildlib/config.h.in index a02be9cfb..3b94ea3e4 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -1,12 +1,6 @@ #ifndef CONFIG_H_IN #define CONFIG_H_IN -// FIXME: Remove this, ibverbs is included so we don't need to detect -#define HAVE_IBV_DOFORK_RANGE 1 -#define HAVE_IBV_DONTFORK_RANGE 1 -#define HAVE_IBV_REGISTER_DRIVER 1 -#define HAVE_IBV_READ_SYSFS_FILE 1 - #define HAVE_STATEMENT_EXPR 1 #define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1 #define HAVE_TYPEOF 1 diff --git a/libhfi1verbs/src/hfiverbs.c b/libhfi1verbs/src/hfiverbs.c index d2b7dd450..e28afc7fc 100644 --- a/libhfi1verbs/src/hfiverbs.c +++ b/libhfi1verbs/src/hfiverbs.c @@ -217,25 +217,7 @@ static struct ibv_device *hfi1_driver_init(const char *uverbs_sys_path, return &dev->ibv_dev; } -#ifdef HAVE_IBV_REGISTER_DRIVER static __attribute__((constructor)) void hfi1_register_driver(void) { ibv_register_driver("hfi1verbs", hfi1_driver_init); } -#else -/* - * Export the old libsysfs sysfs_class_device-based driver entry point - * if libibverbs does not export an ibv_register_driver() function. - */ -struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev) -{ - int abi_ver = 0; - char value[8]; - - if (ibv_read_sysfs_file(sysdev->path, "abi_version", - value, sizeof value) > 0) - abi_ver = strtol(value, NULL, 10); - - return hfi1_driver_init(sysdev->path, abi_ver); -} -#endif /* HAVE_IBV_REGISTER_DRIVER */ diff --git a/libipathverbs/src/ipathverbs.c b/libipathverbs/src/ipathverbs.c index 9a19d0ab9..4b945f6c5 100644 --- a/libipathverbs/src/ipathverbs.c +++ b/libipathverbs/src/ipathverbs.c @@ -216,25 +216,7 @@ static struct ibv_device *ipath_driver_init(const char *uverbs_sys_path, return &dev->ibv_dev; } -#ifdef HAVE_IBV_REGISTER_DRIVER static __attribute__((constructor)) void ipath_register_driver(void) { ibv_register_driver("ipathverbs", ipath_driver_init); } -#else -/* - * Export the old libsysfs sysfs_class_device-based driver entry point - * if libibverbs does not export an ibv_register_driver() function. - */ -struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev) -{ - int abi_ver = 0; - char value[8]; - - if (ibv_read_sysfs_file(sysdev->path, "abi_version", - value, sizeof value) > 0) - abi_ver = strtol(value, NULL, 10); - - return ipath_driver_init(sysdev->path, abi_ver); -} -#endif /* HAVE_IBV_REGISTER_DRIVER */ diff --git a/libmlx5/src/buf.c b/libmlx5/src/buf.c index 7e06095d0..853450ae9 100644 --- a/libmlx5/src/buf.c +++ b/libmlx5/src/buf.c @@ -42,25 +42,6 @@ #include "mlx5.h" #include "bitmap.h" -#if !(defined(HAVE_IBV_DONTFORK_RANGE) && defined(HAVE_IBV_DOFORK_RANGE)) - -/* - * If libibverbs isn't exporting these functions, then there's no - * point in doing it here, because the rest of libibverbs isn't going - * to be fork-safe anyway. - */ -static int ibv_dontfork_range(void *base, size_t size) -{ - return 0; -} - -static int ibv_dofork_range(void *base, size_t size) -{ - return 0; -} - -#endif /* HAVE_IBV_DONTFORK_RANGE && HAVE_IBV_DOFORK_RANGE */ - static int mlx5_bitmap_init(struct mlx5_bitmap *bitmap, uint32_t num, uint32_t mask) { diff --git a/libmlx5/src/mlx5.c b/libmlx5/src/mlx5.c index 121a83306..f24e5043d 100644 --- a/libmlx5/src/mlx5.c +++ b/libmlx5/src/mlx5.c @@ -42,10 +42,6 @@ #include #include -#ifndef HAVE_IBV_REGISTER_DRIVER -#include -#endif - #include "mlx5.h" #include "mlx5-abi.h" diff --git a/libmlx5/src/verbs.c b/libmlx5/src/verbs.c index 58673f443..acbabc814 100644 --- a/libmlx5/src/verbs.c +++ b/libmlx5/src/verbs.c @@ -993,9 +993,7 @@ static const char *qptype2key(enum ibv_qp_type type) case IBV_QPT_RC: return "HUGE_RC"; case IBV_QPT_UC: return "HUGE_UC"; case IBV_QPT_UD: return "HUGE_UD"; -#ifdef _NOT_EXISTS_IN_OFED_2_0 case IBV_QPT_RAW_PACKET: return "HUGE_RAW_ETH"; -#endif default: return "HUGE_NA"; } } diff --git a/libmthca/src/buf.c b/libmthca/src/buf.c index 78e7b89c4..c03ee1f9a 100644 --- a/libmthca/src/buf.c +++ b/libmthca/src/buf.c @@ -38,25 +38,6 @@ #include "mthca.h" -#if !(defined(HAVE_IBV_DONTFORK_RANGE) && defined(HAVE_IBV_DOFORK_RANGE)) - -/* - * If libibverbs isn't exporting these functions, then there's no - * point in doing it here, because the rest of libibverbs isn't going - * to be fork-safe anyway. - */ -static int ibv_dontfork_range(void *base, size_t size) -{ - return 0; -} - -static int ibv_dofork_range(void *base, size_t size) -{ - return 0; -} - -#endif /* HAVE_IBV_DONTFORK_RANGE && HAVE_IBV_DOFORK_RANGE */ - int mthca_alloc_buf(struct mthca_buf *buf, size_t size, int page_size) { int ret; diff --git a/libmthca/src/mthca.c b/libmthca/src/mthca.c index d6bda2d29..d5660ceef 100644 --- a/libmthca/src/mthca.c +++ b/libmthca/src/mthca.c @@ -41,16 +41,6 @@ #include #include -#ifndef HAVE_IBV_REGISTER_DRIVER -#include -#endif - -#ifndef HAVE_IBV_READ_SYSFS_FILE -#include -#include -#include -#endif - #include "mthca.h" #include "mthca-abi.h" @@ -224,36 +214,6 @@ static struct ibv_device_ops mthca_dev_ops = { .free_context = mthca_free_context }; -/* - * Keep a private implementation of HAVE_IBV_READ_SYSFS_FILE to handle - * old versions of libibverbs that didn't implement it. This can be - * removed when libibverbs 1.0.3 or newer is available "everywhere." - */ -#ifndef HAVE_IBV_READ_SYSFS_FILE -static int ibv_read_sysfs_file(const char *dir, const char *file, - char *buf, size_t size) -{ - char path[256]; - int fd; - int len; - - snprintf(path, sizeof path, "%s/%s", dir, file); - - fd = open(path, O_RDONLY); - if (fd < 0) - return -1; - - len = read(fd, buf, size); - - close(fd); - - if (len > 0 && buf[len - 1] == '\n') - buf[--len] = '\0'; - - return len; -} -#endif /* HAVE_IBV_READ_SYSFS_FILE */ - static struct ibv_device *mthca_driver_init(const char *uverbs_sys_path, int abi_version) { @@ -300,25 +260,7 @@ static struct ibv_device *mthca_driver_init(const char *uverbs_sys_path, return &dev->ibv_dev; } -#ifdef HAVE_IBV_REGISTER_DRIVER static __attribute__((constructor)) void mthca_register_driver(void) { ibv_register_driver("mthca", mthca_driver_init); } -#else -/* - * Export the old libsysfs sysfs_class_device-based driver entry point - * if libibverbs does not export an ibv_register_driver() function. - */ -struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev) -{ - int abi_ver = 0; - char value[8]; - - if (ibv_read_sysfs_file(sysdev->path, "abi_version", - value, sizeof value) > 0) - abi_ver = strtol(value, NULL, 10); - - return mthca_driver_init(sysdev->path, abi_ver); -} -#endif /* HAVE_IBV_REGISTER_DRIVER */ diff --git a/librxe/src/rxe.c b/librxe/src/rxe.c index 6bd04d696..ef7434e1d 100644 --- a/librxe/src/rxe.c +++ b/librxe/src/rxe.c @@ -935,22 +935,8 @@ static struct ibv_device *rxe_driver_init(const char *uverbs_sys_path, return &dev->ibv_dev; } -#ifdef HAVE_IBV_REGISTER_DRIVER static __attribute__ ((constructor)) void rxe_register_driver(void) { ibv_register_driver("rxe", rxe_driver_init); } -#else -struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev) -{ - int abi_ver = 0; - char value[8]; - - if (ibv_read_sysfs_file(sysdev->path, "abi_version", - value, sizeof value) > 0) - abi_ver = strtol(value, NULL, 10); - - return rxe_driver_init(sysdev->path, abi_ver); -} -#endif /* HAVE_IBV_REGISTER_DRIVER */ From f29b3285f82815da3abdfea5be5c4f2d1ca92743 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sat, 27 Aug 2016 13:36:05 -0600 Subject: [PATCH 08/13] Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS These were used to support building provider plugins against old versions of libibverbs. Since libibverbs is now included together with the provider that is no longer possible or supported. The define is kept as it is in a public header. Signed-off-by: Jason Gunthorpe --- libhfi1verbs/src/verbs.c | 15 +++------------ libi40iw/src/i40iw_uverbs.c | 26 -------------------------- libipathverbs/src/verbs.c | 16 +++------------- libmlx5/src/verbs.c | 18 ++++-------------- libmthca/src/verbs.c | 26 ++++++-------------------- libnes/src/nes_uverbs.c | 35 ----------------------------------- librxe/src/rxe.c | 16 +++------------- 7 files changed, 19 insertions(+), 133 deletions(-) diff --git a/libhfi1verbs/src/verbs.c b/libhfi1verbs/src/verbs.c index 20d435209..06ddbb712 100644 --- a/libhfi1verbs/src/verbs.c +++ b/libhfi1verbs/src/verbs.c @@ -135,24 +135,15 @@ struct ibv_mr *hfi1_reg_mr(struct ibv_pd *pd, void *addr, { struct ibv_mr *mr; struct ibv_reg_mr cmd; + struct ibv_reg_mr_resp resp; int ret; mr = malloc(sizeof *mr); if (!mr) return NULL; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS - { - struct ibv_reg_mr_resp resp; - - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, - access, mr, &cmd, sizeof cmd, - &resp, sizeof resp); - } -#else - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, - access, mr, &cmd, sizeof cmd); -#endif + ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, mr, + &cmd, sizeof cmd, &resp, sizeof resp); if (ret) { free(mr); diff --git a/libi40iw/src/i40iw_uverbs.c b/libi40iw/src/i40iw_uverbs.c index 3a6799a9b..a117b534f 100644 --- a/libi40iw/src/i40iw_uverbs.c +++ b/libi40iw/src/i40iw_uverbs.c @@ -154,9 +154,7 @@ struct ibv_mr *i40iw_ureg_mr(struct ibv_pd *pd, void *addr, size_t length, int a { struct ibv_mr *mr; struct i40iw_ureg_mr cmd; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS struct ibv_reg_mr_resp resp; -#endif mr = malloc(sizeof(*mr)); if (!mr) @@ -164,14 +162,9 @@ struct ibv_mr *i40iw_ureg_mr(struct ibv_pd *pd, void *addr, size_t length, int a cmd.reg_type = I40IW_UMEMREG_TYPE_MEM; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, mr, &cmd.ibv_cmd, sizeof(cmd), &resp, sizeof(resp))) { -#else - if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, - access, mr, &cmd.ibv_cmd, sizeof(cmd))) { -#endif fprintf(stderr, PFX "%s: Failed to register memory\n", __func__); free(mr); return NULL; @@ -226,9 +219,7 @@ struct ibv_cq *i40iw_ucreate_cq(struct ibv_context *context, int cqe, struct i40iw_ureg_mr reg_mr_cmd; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS struct ibv_reg_mr_resp reg_mr_resp; -#endif if (cqe > I40IW_MAX_CQ_SIZE) return NULL; @@ -268,18 +259,10 @@ struct ibv_cq *i40iw_ucreate_cq(struct ibv_context *context, int cqe, reg_mr_cmd.cq_pages = cq_pages; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS ret = ibv_cmd_reg_mr(&iwvctx->iwupd->ibv_pd, (void *)info.cq_base, totalsize, (uintptr_t)info.cq_base, IBV_ACCESS_LOCAL_WRITE, &iwucq->mr, ®_mr_cmd.ibv_cmd, sizeof(reg_mr_cmd), ®_mr_resp, sizeof(reg_mr_resp)); -#else - ret = ibv_cmd_reg_mr(&iwvctx->iwupd->ibv_pd, (void *)info.sq, totalsize, - (uintptr_t)info.cq_base, IBV_ACCESS_LOCAL_WRITE, - &iwucq->mr, ®_mr_cmd.ibv_cmd, - sizeof(reg_mr_cmd)); -#endif - if (ret) { fprintf(stderr, PFX "%s: failed to pin memory for CQ\n", __func__); goto err; @@ -509,10 +492,7 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd, int ret; struct i40iw_ureg_mr reg_mr_cmd; u32 sq_pages, rq_pages; - -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS struct ibv_reg_mr_resp reg_mr_resp; -#endif memset(®_mr_cmd, 0, sizeof(reg_mr_cmd)); if ((sqdepth % I40IWQP_SW_WQSIZE_1024)) @@ -540,15 +520,9 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd, reg_mr_cmd.sq_pages = sq_pages; reg_mr_cmd.rq_pages = rq_pages; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS ret = ibv_cmd_reg_mr(pd, (void *)info->sq, totalqpsize, (uintptr_t)info->sq, IBV_ACCESS_LOCAL_WRITE, &iwuqp->mr, ®_mr_cmd.ibv_cmd, sizeof(reg_mr_cmd), ®_mr_resp, sizeof(reg_mr_resp)); -#else - ret = ibv_cmd_reg_mr(pd, (void *)info->sq, totalqpsize, (uintptr_t)info->sq, - IBV_ACCESS_LOCAL_WRITE, &iwuqp->mr, ®_mr_cmd.ibv_cmd, - sizeof(reg_mr_cmd)); -#endif if (ret) { fprintf(stderr, PFX "%s: failed to pin memory for SQ\n", __func__); free(info->sq); diff --git a/libipathverbs/src/verbs.c b/libipathverbs/src/verbs.c index 12ca35f32..35b2162a8 100644 --- a/libipathverbs/src/verbs.c +++ b/libipathverbs/src/verbs.c @@ -115,25 +115,15 @@ struct ibv_mr *ipath_reg_mr(struct ibv_pd *pd, void *addr, { struct ibv_mr *mr; struct ibv_reg_mr cmd; + struct ibv_reg_mr_resp resp; int ret; mr = malloc(sizeof *mr); if (!mr) return NULL; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS - { - struct ibv_reg_mr_resp resp; - - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, - access, mr, &cmd, sizeof cmd, - &resp, sizeof resp); - } -#else - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, - access, mr, &cmd, sizeof cmd); -#endif - + ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, mr, + &cmd, sizeof cmd, &resp, sizeof resp); if (ret) { free(mr); return NULL; diff --git a/libmlx5/src/verbs.c b/libmlx5/src/verbs.c index acbabc814..ef85a6363 100644 --- a/libmlx5/src/verbs.c +++ b/libmlx5/src/verbs.c @@ -171,25 +171,15 @@ struct ibv_mr *mlx5_reg_mr(struct ibv_pd *pd, void *addr, size_t length, struct ibv_reg_mr cmd; int ret; enum ibv_access_flags access = (enum ibv_access_flags)acc; + struct ibv_reg_mr_resp resp; mr = calloc(1, sizeof(*mr)); if (!mr) return NULL; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS - { - struct ibv_reg_mr_resp resp; - - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, - access, &(mr->ibv_mr), - &cmd, sizeof(cmd), - &resp, sizeof resp); - } -#else - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, access, - &(mr->ibv_mr), - &cmd, sizeof cmd); -#endif + ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, + &(mr->ibv_mr), &cmd, sizeof(cmd), &resp, + sizeof resp); if (ret) { mlx5_free_buf(&(mr->buf)); free(mr); diff --git a/libmthca/src/verbs.c b/libmthca/src/verbs.c index b3bce82af..60dd44002 100644 --- a/libmthca/src/verbs.c +++ b/libmthca/src/verbs.c @@ -120,6 +120,7 @@ static struct ibv_mr *__mthca_reg_mr(struct ibv_pd *pd, void *addr, { struct ibv_mr *mr; struct mthca_reg_mr cmd; + struct ibv_reg_mr_resp resp; int ret; /* @@ -135,17 +136,8 @@ static struct ibv_mr *__mthca_reg_mr(struct ibv_pd *pd, void *addr, if (!mr) return NULL; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS - { - struct ibv_reg_mr_resp resp; - - ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, mr, - &cmd.ibv_cmd, sizeof cmd, &resp, sizeof resp); - } -#else - ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, mr, - &cmd.ibv_cmd, sizeof cmd); -#endif + ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, mr, &cmd.ibv_cmd, + sizeof cmd, &resp, sizeof resp); if (ret) { free(mr); return NULL; @@ -284,6 +276,7 @@ int mthca_resize_cq(struct ibv_cq *ibcq, int cqe) struct mthca_resize_cq cmd; struct ibv_mr *mr; struct mthca_buf buf; + struct ibv_resize_cq_resp resp; int old_cqe; int ret; @@ -317,15 +310,8 @@ int mthca_resize_cq(struct ibv_cq *ibcq, int cqe) old_cqe = ibcq->cqe; cmd.lkey = mr->lkey; -#ifdef IBV_CMD_RESIZE_CQ_HAS_RESP_PARAMS - { - struct ibv_resize_cq_resp resp; - ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd, - &resp, sizeof resp); - } -#else - ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd); -#endif + ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd, &resp, + sizeof resp); if (ret) { mthca_dereg_mr(mr); mthca_free_buf(&buf); diff --git a/libnes/src/nes_uverbs.c b/libnes/src/nes_uverbs.c index 7c2454e7f..141f769bf 100644 --- a/libnes/src/nes_uverbs.c +++ b/libnes/src/nes_uverbs.c @@ -172,23 +172,16 @@ struct ibv_mr *nes_ureg_mr(struct ibv_pd *pd, void *addr, { struct ibv_mr *mr; struct nes_ureg_mr cmd; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS struct ibv_reg_mr_resp resp; -#endif mr = malloc(sizeof *mr); if (!mr) return NULL; cmd.reg_type = NES_UMEMREG_TYPE_MEM; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, access, mr, &cmd.ibv_cmd, sizeof cmd, &resp, sizeof resp)) { -#else - if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, - access, mr, &cmd.ibv_cmd, sizeof cmd)) { -#endif free(mr); return NULL; @@ -225,9 +218,7 @@ int nes_ima_ureplace_cq(struct ibv_cq *cq, struct nes_ucreate_cq_resp resp; int comp_vector = nesucq->comp_vector; struct nes_ureg_mr reg_mr_cmd; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS struct ibv_reg_mr_resp reg_mr_resp; -#endif struct nes_uvcontext *nesvctx = to_nes_uctx(cq->context); ret = ibv_cmd_destroy_cq(cq); @@ -248,20 +239,12 @@ int nes_ima_ureplace_cq(struct ibv_cq *cq, reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes, (nesucq->size*sizeof(struct nes_hw_cqe)), (uintptr_t)nesucq->cqes, IBV_ACCESS_LOCAL_WRITE, &nesucq->mr, ®_mr_cmd.ibv_cmd, sizeof reg_mr_cmd, ®_mr_resp, sizeof reg_mr_resp); -#else - ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes, - (nesucq->size*sizeof(struct nes_hw_cqe)), - (uintptr_t)nesucq->cqes, - IBV_ACCESS_LOCAL_WRITE, &nesucq->mr, - ®_mr_cmd.ibv_cmd, sizeof reg_mr_cmd); -#endif if (ret) { free((struct nes_hw_cqe *)nesucq->cqes); goto err; @@ -305,9 +288,7 @@ struct ibv_cq *nes_ucreate_cq(struct ibv_context *context, int cqe, { struct nes_ucq *nesucq; struct nes_ureg_mr reg_mr_cmd; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS struct ibv_reg_mr_resp reg_mr_resp; -#endif struct nes_ucreate_cq cmd; struct nes_ucreate_cq_resp resp; int ret; @@ -336,18 +317,11 @@ struct ibv_cq *nes_ucreate_cq(struct ibv_context *context, int cqe, /* Register the memory for the CQ */ reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes, (nesucq->size*sizeof(struct nes_hw_cqe)), (uintptr_t)nesucq->cqes, IBV_ACCESS_LOCAL_WRITE, &nesucq->mr, ®_mr_cmd.ibv_cmd, sizeof reg_mr_cmd, ®_mr_resp, sizeof reg_mr_resp); -#else - ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes, - (nesucq->size*sizeof(struct nes_hw_cqe)), - (uintptr_t)nesucq->cqes, IBV_ACCESS_LOCAL_WRITE, &nesucq->mr, - ®_mr_cmd.ibv_cmd, sizeof reg_mr_cmd); -#endif if (ret) { /* fprintf(stderr, "ibv_cmd_reg_mr failed (ret = %d).\n", ret); */ free((struct nes_hw_cqe *)nesucq->cqes); @@ -1039,9 +1013,7 @@ static int nes_vmapped_qp(struct nes_uqp *nesuqp, struct ibv_pd *pd, struct ibv_ { struct nes_ucreate_qp cmd; struct nes_ureg_mr reg_mr_cmd; -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS struct ibv_reg_mr_resp reg_mr_resp; -#endif int totalqpsize; int ret; @@ -1060,17 +1032,10 @@ static int nes_vmapped_qp(struct nes_uqp *nesuqp, struct ibv_pd *pd, struct ibv_ //fprintf(stderr, PFX "qp_rq_vbase = %p qp_sq_vbase=%p reg_mr = %p\n", // nesuqp->rq_vbase, nesuqp->sq_vbase, &nesuqp->mr); -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS ret = ibv_cmd_reg_mr(pd, (void *)nesuqp->sq_vbase,totalqpsize, (uintptr_t) nesuqp->sq_vbase, IBV_ACCESS_LOCAL_WRITE, &nesuqp->mr, ®_mr_cmd.ibv_cmd, sizeof reg_mr_cmd, ®_mr_resp, sizeof reg_mr_resp); -#else - ret = ibv_cmd_reg_mr(pd, (void *)nesuqp->sq_vbase,totalqpsize, - (uintptr_t) nesuqp->sq_vbase, IBV_ACCESS_LOCAL_WRITE, - &nesuqp->mr, ®_mr_cmd.ibv_cmd, sizeof reg_mr_cmd); -#endif - if (ret) { // fprintf(stderr, PFX "%s ibv_cmd_reg_mr failed (ret = %d).\n", __FUNCTION__, ret); free((void *) nesuqp->sq_vbase); diff --git a/librxe/src/rxe.c b/librxe/src/rxe.c index ef7434e1d..8f8cc9105 100644 --- a/librxe/src/rxe.c +++ b/librxe/src/rxe.c @@ -127,6 +127,7 @@ static struct ibv_mr *rxe_reg_mr(struct ibv_pd *pd, void *addr, size_t length, { struct ibv_mr *mr; struct ibv_reg_mr cmd; + struct ibv_reg_mr_resp resp; int ret; mr = malloc(sizeof *mr); @@ -134,19 +135,8 @@ static struct ibv_mr *rxe_reg_mr(struct ibv_pd *pd, void *addr, size_t length, return NULL; } -#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS - { - struct ibv_reg_mr_resp resp; - - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, - access, mr, &cmd, sizeof cmd, - &resp, sizeof resp); - } -#else - ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, - access, mr, &cmd, sizeof cmd); -#endif - + ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, mr, + &cmd, sizeof cmd, &resp, sizeof resp); if (ret) { free(mr); return NULL; From 296de90f6e7c2c61ec587b1046a6671560156a07 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sat, 27 Aug 2016 13:10:10 -0600 Subject: [PATCH 09/13] Remove HAVE_SYMVER_SUPPORT cmake now hard requires GNU style symbol version support in the assembler and linker. Signed-off-by: Jason Gunthorpe --- buildlib/config.h.in | 3 --- libibverbs/src/ibverbs.h | 11 ++--------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/buildlib/config.h.in b/buildlib/config.h.in index 3b94ea3e4..99103b779 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -9,9 +9,6 @@ // FIXME: Remove this, we provide the netlink kernel headers ibacm needs #define HAVE_NETLINK 1 -// FIXME: Remove this, The cmake version hard-requires symbol version support -#define HAVE_SYMVER_SUPPORT 1 - // FIXME: Remove this, The cmake version hard-requires new style CLOEXEC support #define STREAM_CLOEXEC "e" diff --git a/libibverbs/src/ibverbs.h b/libibverbs/src/ibverbs.h index 7892af4ad..a01dff2b4 100644 --- a/libibverbs/src/ibverbs.h +++ b/libibverbs/src/ibverbs.h @@ -47,16 +47,9 @@ #define DEFAULT_ABI "IBVERBS_1.1" -#ifdef HAVE_SYMVER_SUPPORT -# define symver(name, api, ver) \ - asm(".symver " #name "," #api "@" #ver) -# define default_symver(name, api) \ +#define symver(name, api, ver) asm(".symver " #name "," #api "@" #ver) +#define default_symver(name, api) \ asm(".symver " #name "," #api "@@" DEFAULT_ABI) -#else -# define symver(name, api, ver) -# define default_symver(name, api) \ - extern __typeof(name) api __attribute__((alias(#name))) -#endif /* HAVE_SYMVER_SUPPORT */ #define PFX "libibverbs: " From 6771a2051ea5efd30e142866f722d2dae6f565a7 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Tue, 6 Sep 2016 20:27:58 -0600 Subject: [PATCH 10/13] Remove old compat definitions of wmb/rmb/etc The canonical place for these is infiniband/arch.h, nothing else should declare them. Signed-off-by: Jason Gunthorpe --- libmlx4/src/mlx4.h | 24 ------------------------ libmlx5/src/mlx5.h | 22 ---------------------- libmthca/src/mthca.h | 8 -------- 3 files changed, 54 deletions(-) diff --git a/libmlx4/src/mlx4.h b/libmlx4/src/mlx4.h index 4551141d2..1855cfbcb 100644 --- a/libmlx4/src/mlx4.h +++ b/libmlx4/src/mlx4.h @@ -49,30 +49,6 @@ #include -#ifndef rmb -# define rmb() mb() -#endif - -#ifndef wmb -# define wmb() mb() -#endif - -#ifndef wc_wmb - -#if defined(__i386__) -#define wc_wmb() asm volatile("lock; addl $0,0(%%esp) " ::: "memory") -#elif defined(__x86_64__) -#define wc_wmb() asm volatile("sfence" ::: "memory") -#elif defined(__ia64__) -#define wc_wmb() asm volatile("fwb" ::: "memory") -#elif defined(__s390x__) -#define wc_wmb { asm volatile("" : : : "memory") } -#else -#define wc_wmb() wmb() -#endif - -#endif - #define HIDDEN __attribute__((visibility ("hidden"))) #define PFX "mlx4: " diff --git a/libmlx5/src/mlx5.h b/libmlx5/src/mlx5.h index aa8b6fece..c209a7964 100644 --- a/libmlx5/src/mlx5.h +++ b/libmlx5/src/mlx5.h @@ -54,28 +54,6 @@ #include -#ifndef rmb -# define rmb() mb() -#endif - -#ifndef wmb -# define wmb() mb() -#endif - -#ifndef wc_wmb - -#if defined(__i386__) -#define wc_wmb() asm volatile("lock; addl $0, 0(%%esp) " ::: "memory") -#elif defined(__x86_64__) -#define wc_wmb() asm volatile("sfence" ::: "memory") -#elif defined(__ia64__) -#define wc_wmb() asm volatile("fwb" ::: "memory") -#else -#define wc_wmb() wmb() -#endif - -#endif - #define HIDDEN __attribute__((visibility("hidden"))) #ifdef HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE diff --git a/libmthca/src/mthca.h b/libmthca/src/mthca.h index 18d522913..da53010ce 100644 --- a/libmthca/src/mthca.h +++ b/libmthca/src/mthca.h @@ -41,14 +41,6 @@ #include -#ifndef rmb -# define rmb() mb() -#endif - -#ifndef wmb -# define wmb() mb() -#endif - #define HIDDEN __attribute__((visibility ("hidden"))) #define PFX "mthca: " From d4f91fc4f760a79ae36a9535a47522bdcc33f1e1 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sat, 27 Aug 2016 13:29:10 -0600 Subject: [PATCH 11/13] Remove old MADV_DONTFORK/DOFORK compat All supported distros have this now. Signed-off-by: Jason Gunthorpe --- libibverbs/src/memory.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libibverbs/src/memory.c b/libibverbs/src/memory.c index 8e728c4f6..5c8255d47 100644 --- a/libibverbs/src/memory.c +++ b/libibverbs/src/memory.c @@ -46,17 +46,6 @@ #include "ibverbs.h" -/* - * Most distro's headers don't have these yet. - */ -#ifndef MADV_DONTFORK -#define MADV_DONTFORK 10 -#endif - -#ifndef MADV_DOFORK -#define MADV_DOFORK 11 -#endif - struct ibv_mem_node { enum { IBV_RED, From 1df0888f6a736e1612ce8b054d6c17651ebd003f Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Fri, 2 Sep 2016 12:57:57 -0600 Subject: [PATCH 12/13] Remove most checks of __BYTE_ORDER For a long time now endian.h has defined sane fixed with conversion macros, so lets just use them instead of rolling our own. Also, htonll is defined in this source tree under infiniband/arch.h, so all users of that macro can just use the header. Someday we should also get rid of all the endless wrappers.. Signed-off-by: Jason Gunthorpe --- ibacm/linux/osd.h | 8 +------ libcxgb3/src/cxio_wr.h | 10 +++------ libcxgb4/src/t4.h | 11 ++++------ libi40iw/src/i40iw_umain.h | 18 ++-------------- libibumad/src/sysfs.c | 8 +------ libibverbs/include/infiniband/arch.h | 15 ++++++------- libnes/src/nes_umain.h | 17 ++------------- libocrdma/src/ocrdma_verbs.c | 32 ++++------------------------ librdmacm/examples/common.h | 11 +++------- librdmacm/src/cma.h | 9 +------- srp_daemon/srp_daemon/srp_daemon.h | 17 +-------------- 11 files changed, 28 insertions(+), 128 deletions(-) diff --git a/ibacm/linux/osd.h b/ibacm/linux/osd.h index 2c4db81b9..c1e7d996c 100644 --- a/ibacm/linux/osd.h +++ b/ibacm/linux/osd.h @@ -46,6 +46,7 @@ #include #include #include +#include #include @@ -55,13 +56,6 @@ #define LIB_DESTRUCTOR __attribute__((destructor)) #define CDECL_FUNC -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define htonll(x) bswap_64(x) -#else -#define htonll(x) (x) -#endif -#define ntohll(x) htonll(x) - #if DEFINE_ATOMICS typedef struct { pthread_mutex_t mut; int val; } atomic_t; static inline int atomic_inc(atomic_t *atomic) diff --git a/libcxgb3/src/cxio_wr.h b/libcxgb3/src/cxio_wr.h index ece06bd05..e24c7fed7 100644 --- a/libcxgb3/src/cxio_wr.h +++ b/libcxgb3/src/cxio_wr.h @@ -50,13 +50,9 @@ #define Q_COUNT(rptr,wptr) ((wptr)-(rptr)) #define Q_PTR2IDX(ptr,size_log2) (ptr & ((1UL<> 24) | ((x & 0x00FF0000) >> 8) | - ((x & 0x0000FF00) << 8) | ((x & 0x000000FF) << 24); -} - -static inline uint32_t le32_to_cpu(uint32_t x) -{ - return ((x & 0xFF000000) >> 24) | ((x & 0x00FF0000) >> 8) | - ((x & 0x0000FF00) << 8) | ((x & 0x000000FF) << 24); -} -#endif #endif /* i40iw_umain_H */ diff --git a/libibumad/src/sysfs.c b/libibumad/src/sysfs.c index d10f31228..011e411f0 100644 --- a/libibumad/src/sysfs.c +++ b/libibumad/src/sysfs.c @@ -41,15 +41,9 @@ #include #include #include -#include #include #include - -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define htonll(x) bswap_64(x) -#else -#define htonll(x) (x) -#endif +#include static int ret_code(void) { diff --git a/libibverbs/include/infiniband/arch.h b/libibverbs/include/infiniband/arch.h index e35ecf05b..bf0feec08 100644 --- a/libibverbs/include/infiniband/arch.h +++ b/libibverbs/include/infiniband/arch.h @@ -37,15 +37,12 @@ #include #include -#if __BYTE_ORDER == __LITTLE_ENDIAN -static inline uint64_t htonll(uint64_t x) { return bswap_64(x); } -static inline uint64_t ntohll(uint64_t x) { return bswap_64(x); } -#elif __BYTE_ORDER == __BIG_ENDIAN -static inline uint64_t htonll(uint64_t x) { return x; } -static inline uint64_t ntohll(uint64_t x) { return x; } -#else -#error __BYTE_ORDER is neither __LITTLE_ENDIAN nor __BIG_ENDIAN -#endif +#undef htonll +#undef ntohll +static inline uint64_t htonll(uint64_t x) { return htobe64(x); } +static inline uint64_t ntohll(uint64_t x) { return be64toh(x); } +#define htonll htonll +#define ntohll ntohll /* * Architecture-specific defines. Currently, an architecture is diff --git a/libnes/src/nes_umain.h b/libnes/src/nes_umain.h index c53acd7e9..91299823e 100644 --- a/libnes/src/nes_umain.h +++ b/libnes/src/nes_umain.h @@ -393,26 +393,13 @@ int nes_uattach_mcast(struct ibv_qp *, const union ibv_gid *, uint16_t); int nes_udetach_mcast(struct ibv_qp *, const union ibv_gid *, uint16_t); void nes_async_event(struct ibv_async_event *event); -#if __BYTE_ORDER == __LITTLE_ENDIAN static inline uint32_t cpu_to_le32(uint32_t x) { - return x; + return htole32(x); } static inline uint32_t le32_to_cpu(uint32_t x) { - return x; + return le32toh(x); } -#else -static inline uint32_t cpu_to_le32(uint32_t x) -{ - return (((x&0xFF000000)>>24) | ((x&0x00FF0000)>>8) | - ((x&0x0000FF00)<<8) | ((x&0x000000FF)<<24)); -} -static inline uint32_t le32_to_cpu(uint32_t x) -{ - return (((x&0xFF000000)>>24) | ((x&0x00FF0000)>>8) | - ((x&0x0000FF00)<<8) | ((x&0x000000FF)<<24)); -} -#endif #endif /* nes_umain_H */ diff --git a/libocrdma/src/ocrdma_verbs.c b/libocrdma/src/ocrdma_verbs.c index 6d58cb219..163bf23f8 100644 --- a/libocrdma/src/ocrdma_verbs.c +++ b/libocrdma/src/ocrdma_verbs.c @@ -46,6 +46,7 @@ #include #include #include +#include #include "ocrdma_main.h" #include "ocrdma_abi.h" @@ -54,48 +55,23 @@ static void ocrdma_ring_cq_db(struct ocrdma_cq *cq, uint32_t armed, int solicited, uint32_t num_cqe); -static inline uint32_t ocrdma_swap_endianness(uint32_t val) -{ - return ((val & 0xFF000000) >> 24) | ((val & 0xFF) << 24) | - ((val & 0xFF00) << 8) | ((val & 0xFF0000) >> 8); -} - static inline uint32_t ocrdma_cpu_to_le(uint32_t val) { -#if __BYTE_ORDER == __BIG_ENDIAN - return ocrdma_swap_endianness(val); -#else - return val; -#endif + return htole32(val); } static inline uint32_t ocrdma_le_to_cpu(uint32_t val) { -#if __BYTE_ORDER == __BIG_ENDIAN - return ocrdma_swap_endianness(val); -#else - return val; -#endif -} - -static inline uint32_t ocrdma_cpu_to_be(uint32_t val) -{ -#if __BYTE_ORDER == __LITTLE_ENDIAN - return ocrdma_swap_endianness(val); -#else - return val; -#endif + return le32toh(val); } static inline void ocrdma_swap_cpu_to_le(void *dst, uint32_t len) { -#if __BYTE_ORDER == __BIG_ENDIAN int i = 0; uint32_t *src_ptr = dst; uint32_t *dst_ptr = dst; for (; i < (len / 4); i++) - *dst_ptr++ = ocrdma_swap_endianness(*src_ptr++); -#endif + *dst_ptr++ = le32toh(*src_ptr++); } /* diff --git a/librdmacm/examples/common.h b/librdmacm/examples/common.h index f7511f039..ac2d160b0 100644 --- a/librdmacm/examples/common.h +++ b/librdmacm/examples/common.h @@ -34,20 +34,15 @@ #include #include -#include +#include #include #include #include #include -#if __BYTE_ORDER == __BIG_ENDIAN -static inline uint64_t cpu_to_be64(uint64_t x) { return x; } -static inline uint32_t cpu_to_be32(uint32_t x) { return x; } -#else -static inline uint64_t cpu_to_be64(uint64_t x) { return bswap_64(x); } -static inline uint32_t cpu_to_be32(uint32_t x) { return bswap_32(x); } -#endif +static inline uint64_t cpu_to_be64(uint64_t x) { return htobe64(x); } +static inline uint32_t cpu_to_be32(uint32_t x) { return htobe32(x); } extern int use_rs; diff --git a/librdmacm/src/cma.h b/librdmacm/src/cma.h index 16a55a67a..c2f603d6f 100644 --- a/librdmacm/src/cma.h +++ b/librdmacm/src/cma.h @@ -44,6 +44,7 @@ #include #include +#include #include @@ -51,14 +52,6 @@ #define PFX "librdmacm: " -#if __BYTE_ORDER == __LITTLE_ENDIAN -static inline uint64_t htonll(uint64_t x) { return bswap_64(x); } -static inline uint64_t ntohll(uint64_t x) { return bswap_64(x); } -#else -static inline uint64_t htonll(uint64_t x) { return x; } -static inline uint64_t ntohll(uint64_t x) { return x; } -#endif - /* * Fast synchronization for low contention locking. */ diff --git a/srp_daemon/srp_daemon/srp_daemon.h b/srp_daemon/srp_daemon/srp_daemon.h index d6a2d8a84..5d42d51e6 100644 --- a/srp_daemon/srp_daemon/srp_daemon.h +++ b/srp_daemon/srp_daemon/srp_daemon.h @@ -42,26 +42,11 @@ #include #include #include +#include #include "config.h" #include "srp_ib_types.h" -#if __BYTE_ORDER == __LITTLE_ENDIAN -#ifndef htonll -#define htonll(x) bswap_64(x) -#endif -#ifndef ntohll -#define ntohll(x) bswap_64(x) -#endif -#elif __BYTE_ORDER == __BIG_ENDIAN -#ifndef htonll -#define htonll(x) (x) -#endif -#ifndef ntohll -#define ntohll(x) (x) -#endif -#endif - #ifdef __cplusplus template struct vki_static_assert { int m_bitfield:(2*b-1); }; #define STATIC_ASSERT(expr) \ From 59747c74d821059f8e20fd4c0f488a3a4f959007 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Thu, 29 Sep 2016 14:34:59 -0600 Subject: [PATCH 13/13] nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH Unclear what this was ever for, but we don't support it. Signed-off-by: Jason Gunthorpe --- libnes/src/nes_uverbs.c | 322 ---------------------------------------- 1 file changed, 322 deletions(-) diff --git a/libnes/src/nes_uverbs.c b/libnes/src/nes_uverbs.c index 141f769bf..aa9c2b9e2 100644 --- a/libnes/src/nes_uverbs.c +++ b/libnes/src/nes_uverbs.c @@ -206,80 +206,6 @@ int nes_udereg_mr(struct ibv_mr *mr) return 0; } -#if HAVE_DECL_IBV_QPT_RAW_ETH -static -int nes_ima_ureplace_cq(struct ibv_cq *cq, - int mcrqf, - struct nes_uqp *nesuqp) -{ - struct nes_ucq *nesucq = to_nes_ucq(cq); - int ret; - struct nes_ucreate_cq cmd; - struct nes_ucreate_cq_resp resp; - int comp_vector = nesucq->comp_vector; - struct nes_ureg_mr reg_mr_cmd; - struct ibv_reg_mr_resp reg_mr_resp; - struct nes_uvcontext *nesvctx = to_nes_uctx(cq->context); - - ret = ibv_cmd_destroy_cq(cq); - nes_debug(NES_DBG_UD, "%s(%d) mcrqf=%d ret=%d\n", - __func__, - __LINE__, - mcrqf, - ret); - if (ret) - return ret; - - ret = ibv_cmd_dereg_mr(&nesucq->mr); - if (ret) { - fprintf(stderr, PFX "%s: Failed to deregister" - " CQ Memory Region.\n", __func__); - return ret; - } - - reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ; - - ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes, - (nesucq->size*sizeof(struct nes_hw_cqe)), - (uintptr_t)nesucq->cqes, - IBV_ACCESS_LOCAL_WRITE, &nesucq->mr, - ®_mr_cmd.ibv_cmd, sizeof reg_mr_cmd, - ®_mr_resp, sizeof reg_mr_resp); - if (ret) { - free((struct nes_hw_cqe *)nesucq->cqes); - goto err; - } - - - /* Create the CQ */ - memset(&cmd, 0, sizeof(cmd)); - cmd.user_cq_buffer = (__u64)((uintptr_t)nesucq->cqes); - cmd.mcrqf = mcrqf | 0x20000000; /* IMA specific sq number */ - - nes_debug(NES_DBG_UD, "%s(%d) mcrqf=%d\n", - __func__, __LINE__, - mcrqf); - ret = ibv_cmd_create_cq(cq->context, - nesucq->size-1, - cq->channel, - comp_vector, - &nesucq->ibv_cq, &cmd.ibv_cmd, sizeof cmd, - &resp.ibv_resp, sizeof resp); - if (ret) - goto err; - - nesucq->cq_id = (uint16_t)resp.cq_id; - nesucq->udqp = nesuqp; - nes_debug(NES_DBG_UD, "%s(%d) cqid=%d mcrqf=%d\n", - __func__, __LINE__, - nesucq->cq_id, mcrqf); - - return 0; - err: - return ret; -} -#endif - /** * nes_ucreate_cq */ @@ -1103,15 +1029,6 @@ struct ibv_qp *nes_ucreate_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr) /* fprintf(stderr, PFX "%s\n", __FUNCTION__); */ -#if HAVE_DECL_IBV_QPT_RAW_ETH - if (attr->qp_type == IBV_QPT_RAW_ETH) { - attr->cap.max_send_sge = NES_UD_MAX_SG_LIST_SZ; - attr->cap.max_recv_sge = NES_UD_MAX_SG_LIST_SZ; - nes_debug(NES_DBG_UD, "%s(%d) patching max_sge for UD\n", - __func__, __LINE__); - } -#endif - /* Sanity check QP size before proceeding */ sqdepth = nes_qp_get_qdepth(attr->cap.max_send_wr, attr->cap.max_send_sge); if (!sqdepth) { @@ -1168,58 +1085,6 @@ struct ibv_qp *nes_ucreate_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr) nesuqp->ibv_qp.qp_num = resp.qp_id; nesuqp->rdma0_msg = 1; -#if HAVE_DECL_IBV_QPT_RAW_ETH - if (attr->qp_type == IBV_QPT_RAW_ETH) { - int i = 0; - - nesuqp->nes_ud_sksq_fd = open("/dev/infiniband/nes_ud_sksq", - O_RDWR); - if (nesuqp->nes_ud_sksq_fd <= 0) - return 0; - nesuqp->sksq_shared_ctxt = mmap(NULL, 4096, - PROT_WRITE | PROT_READ, - MAP_SHARED, - nesuqp->nes_ud_sksq_fd, 0); - if (nesuqp->sksq_shared_ctxt == 0) - return 0; - - /* no LSMM for UD */ - nesuqp->sq_head = 0; - nesuqp->sq_tail = 0; - nes_debug(NES_DBG_UD, "%s(%d) qpid=0x%x\n", - __func__, __LINE__, nesuqp->qp_id); - - /* reallocate CQs after QP is created */ - if (nes_ima_ureplace_cq(attr->recv_cq, - resp.qp_id & 0xffff, - nesuqp) != 0) - return NULL; - - if (nes_ima_ureplace_cq(attr->send_cq, - resp.qp_id >> 16, - nesuqp) != 0) - return NULL; - - /* allocate N+1, last one would be used for NULL */ - nesuqp->pend_rx_wr = malloc(NES_UD_RX_BATCH_SZ * - sizeof *nesuqp->pend_rx_wr); - if (!nesuqp) - exit(0); - - for (i = 0; i < NES_UD_RX_BATCH_SZ; i++) { - nesuqp->pend_rx_wr[i].sg_list = - malloc(NES_UD_MAX_SG_LIST_SZ * - sizeof *nesuqp->pend_rx_wr[i].sg_list); - nesuqp->pend_rx_wr[i].next = - (i < NES_UD_RX_BATCH_SZ-1) ? - &nesuqp->pend_rx_wr[i+1] : 0; - } - /* prepare the wr_id tables */ - memset(&nesuqp->send_wr_id[0], 0, sizeof(uint64_t) * 512); - memset(&nesuqp->recv_wr_id[0], 0, sizeof(uint64_t) * 512); - } -#endif - return &nesuqp->ibv_qp; } @@ -1311,27 +1176,6 @@ int nes_udestroy_qp(struct ibv_qp *qp) pthread_spin_destroy(&nesuqp->lock); -#if HAVE_DECL_IBV_QPT_RAW_ETH - if (qp->qp_type == IBV_QPT_RAW_ETH) { - int i = 0; - - if (nesuqp->pend_rx_wr) { - for (i = 0; i < NES_UD_RX_BATCH_SZ; i++) - if (nesuqp->pend_rx_wr[i].sg_list) { - free(nesuqp->pend_rx_wr[i].sg_list); - nesuqp->pend_rx_wr[i].sg_list = 0; - } - } - free(nesuqp->pend_rx_wr); - nesuqp->pend_rx_wr = 0; - if (nesuqp->sksq_shared_ctxt) - munmap(nesuqp->sksq_shared_ctxt, 4096); - - nesuqp->sksq_shared_ctxt = 0; - close(nesuqp->nes_ud_sksq_fd); - } -#endif - /* Clean any pending completions from the cq(s) */ if (nesuqp->send_cq) nes_clean_cq(nesuqp, nesuqp->send_cq); @@ -1343,85 +1187,6 @@ int nes_udestroy_qp(struct ibv_qp *qp) return 0; } -#if HAVE_DECL_IBV_QPT_RAW_ETH -static inline -int nes_ima_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, - struct ibv_send_wr **bad_wr) -{ - struct nes_uqp *nesuqp = to_nes_uqp(ib_qp); - int new_req_cnt = 0; - uint32_t outstanding_wqes; - uint32_t qsize = nesuqp->sq_size; - int ret = 0; - struct ibv_send_wr *tmp_wr = ib_wr; - struct nes_ud_send_wr *nes_ud_wr = 0; - int bc = 0; - int sq_head; - int wr_id_head; - - while (tmp_wr) { - new_req_cnt++; - tmp_wr = tmp_wr->next; - } - if (nesuqp->sq_head >= nesuqp->sq_tail) - outstanding_wqes = nesuqp->sq_head - nesuqp->sq_tail; - else - outstanding_wqes = nesuqp->sq_head + qsize - nesuqp->sq_tail; - - if (unlikely(outstanding_wqes >= (qsize - new_req_cnt))) - return -EINVAL; - - /* we know that there is sufficient space in the send queue */ - /* so we can store wr_id in the wr_id queue */ - sq_head = nesuqp->sq_head; - - if (sq_head + new_req_cnt >= qsize) - nesuqp->sq_head = sq_head + new_req_cnt - qsize; - else - nesuqp->sq_head = sq_head + new_req_cnt; - - nes_ud_wr = (struct nes_ud_send_wr *)nesuqp->sksq_shared_ctxt; - bc = 0; - - /* set up the qp id in the shared page message */ - nes_ud_wr->qpn = nesuqp->qp_id; - - while (ib_wr) { - nes_ud_wr->sg_list[bc].addr = ib_wr->sg_list[0].addr; - nes_ud_wr->sg_list[bc].length = ib_wr->sg_list[0].length; - nes_ud_wr->sg_list[bc].lkey = ib_wr->sg_list[0].lkey; - nes_ud_wr->flags = ib_wr->send_flags; - nes_ud_wr->flags = nes_ud_wr->flags | (ib_wr->imm_data << 16); - /* store the wr_id in the internal queue */ - /* the queue is in sync with the queue in kernel */ - /* the wr_id will be read in poll_cq */ - wr_id_head = bc + sq_head; - if (wr_id_head > (qsize - 1)) - wr_id_head = wr_id_head - qsize; - - nesuqp->send_wr_id[wr_id_head] = ib_wr->wr_id; - if (++bc >= 64) { - nes_ud_wr->wr_cnt = bc; - ret = write(nesuqp->nes_ud_sksq_fd, 0, 0); - if (ret != 0) - goto out; - nes_ud_wr = - (struct nes_ud_send_wr *)nesuqp->sksq_shared_ctxt; - bc = 0; - } - ib_wr = ib_wr->next; - } - if (bc > 0) { - nes_ud_wr->wr_cnt = bc; - ret = write(nesuqp->nes_ud_sksq_fd, 0, 0); - if (ret != 0) - goto out; - } -out: - return ret; -} -#endif - /** * nes_upost_send */ @@ -1441,11 +1206,6 @@ int nes_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, uint32_t total_payload_length = 0; int sge_index; -#if HAVE_DECL_IBV_QPT_RAW_ETH - if (ib_qp->qp_type == IBV_QPT_RAW_ETH) - return nes_ima_upost_send(ib_qp, ib_wr, bad_wr); -#endif - pthread_spin_lock(&nesuqp->lock); head = nesuqp->sq_head; @@ -1617,83 +1377,6 @@ int nes_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, return err; } -#if HAVE_DECL_IBV_QPT_RAW_ETH -static inline -int nes_ima_upost_recv(struct ibv_qp *ib_qp, struct ibv_recv_wr *ib_wr, - struct ibv_recv_wr **bad_wr) -{ - struct nes_uqp *nesuqp = to_nes_uqp(ib_qp); - int new_req_cnt = 0; - uint32_t outstanding_wqes; - uint32_t qsize = nesuqp->rq_size; - struct ibv_send_wr *tmp_wr = (struct ibv_send_wr *)ib_wr; - int ret = 0; - struct nes_ud_recv_wr *nes_ud_wr; - int rq_head; - int bc; - int wr_id_head; - - nes_ud_wr = (struct nes_ud_recv_wr *) - (((char *)nesuqp->sksq_shared_ctxt) + 2048); - while (tmp_wr) { - new_req_cnt++; - tmp_wr = tmp_wr->next; - } - - if (nesuqp->rq_head >= nesuqp->rq_tail) - outstanding_wqes = nesuqp->rq_head - nesuqp->rq_tail; - else - outstanding_wqes = nesuqp->rq_head + qsize - nesuqp->rq_tail; - - if (unlikely(outstanding_wqes >= (qsize - new_req_cnt))) - return -EINVAL; - - /* now we know thay the rq has sufficient - place so we can start wr_id storing */ - rq_head = nesuqp->rq_head; - - if (rq_head + new_req_cnt >= qsize) - nesuqp->rq_head = rq_head + new_req_cnt - qsize; - else - nesuqp->rq_head = rq_head + new_req_cnt; - - /* set the queue number in the shared page */ - nes_ud_wr->qpn = nesuqp->qp_id; - bc = 0; - while (ib_wr) { - if (ib_wr->num_sge > NES_UD_MAX_SG_LIST_SZ) - return -EINVAL; - - nes_ud_wr->sg_list[nesuqp->pending_rcvs].addr = - ib_wr->sg_list[0].addr; - nes_ud_wr->sg_list[nesuqp->pending_rcvs].length = - ib_wr->sg_list[0].length; - nes_ud_wr->sg_list[nesuqp->pending_rcvs].lkey = - ib_wr->sg_list[0].lkey; - - /* store the wr_id */ - wr_id_head = bc + rq_head; - if (wr_id_head > (qsize - 1)) - wr_id_head = wr_id_head - qsize; - - nesuqp->recv_wr_id[wr_id_head] = ib_wr->wr_id; - bc++; - - ++nesuqp->pending_rcvs; - if (nesuqp->pending_rcvs >= NES_UD_RX_BATCH_SZ) { - nes_ud_wr->wr_cnt = nesuqp->pending_rcvs; - ret = read(nesuqp->nes_ud_sksq_fd, 0, 0); - if (ret != 0) - goto out; - nesuqp->pending_rcvs = 0; - } - ib_wr = ib_wr->next; - } -out: - return ret; -} -#endif - /** * nes_upost_recv */ @@ -1713,11 +1396,6 @@ int nes_upost_recv(struct ibv_qp *ib_qp, struct ibv_recv_wr *ib_wr, uint32_t total_payload_length; int sge_index; -#if HAVE_DECL_IBV_QPT_RAW_ETH - if (ib_qp->qp_type == IBV_QPT_RAW_ETH) - return nes_ima_upost_recv(ib_qp, ib_wr, bad_wr); -#endif - if (unlikely(ib_wr->num_sge > 4)) { *bad_wr = ib_wr; return -EINVAL;