Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 0 additions & 6 deletions COPYING

This file was deleted.

26 changes: 0 additions & 26 deletions COPYING.BSD

This file was deleted.

22 changes: 22 additions & 0 deletions COPYING.BSD_FB
Original file line number Diff line number Diff line change
@@ -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.
20 changes: 20 additions & 0 deletions COPYING.BSD_MIT
Original file line number Diff line number Diff line change
@@ -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.

75 changes: 75 additions & 0 deletions COPYING.md
Original file line number Diff line number Diff line change
@@ -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.
13 changes: 0 additions & 13 deletions buildlib/config.h.in
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,16 +9,9 @@
// 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"

// 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"
Expand Down
1 change: 1 addition & 0 deletions ccan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ publish_internal_headers(ccan
)

set(C_FILES
list.c
str.c
)
add_library(ccan STATIC ${C_FILES})
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ccan/build_assert.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion ccan/check_type.h
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ccan/container_of.h
Original file line number Diff line number Diff line change
@@ -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 <stddef.h>
Expand Down
43 changes: 43 additions & 0 deletions ccan/list.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* Licensed under BSD-MIT - see LICENSE.BSD-MIT file for details */
#include <stdio.h>
#include <stdlib.h>
#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;
}
2 changes: 1 addition & 1 deletion ccan/list.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ccan/minmax.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion ccan/str.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* CC0 (Public domain) - see LICENSE file for details */
/* CC0 (Public domain) - see LICENSE.CC0 file for details */
#include <ccan/str.h>

size_t strcount(const char *haystack, const char *needle)
Expand Down
2 changes: 1 addition & 1 deletion ccan/str.h
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ccan/str_debug.h
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 1 addition & 7 deletions ibacm/linux/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <arpa/inet.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <infiniband/arch.h>

#include <ccan/minmax.h>

Expand All @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions ibacm/prov/acmp/src/acmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
* SOFTWARE.
*/

#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <config.h>

#include <stdio.h>
#include <stdarg.h>
Expand Down
4 changes: 1 addition & 3 deletions ibacm/src/acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
* SOFTWARE.
*/

#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <config.h>

#include <stdio.h>
#include <stdarg.h>
Expand Down
4 changes: 1 addition & 3 deletions ibacm/src/acme.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
* SOFTWARE.
*/

#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <config.h>

#include <stdio.h>
#include <stdlib.h>
Expand Down
4 changes: 1 addition & 3 deletions ibacm/src/libacm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
* SOFTWARE.
*/

#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <config.h>

#include <osd.h>
#include "libacm.h"
Expand Down
29 changes: 0 additions & 29 deletions libcxgb3/COPYING

This file was deleted.

4 changes: 1 addition & 3 deletions libcxgb3/src/cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif /* HAVE_CONFIG_H */
#include <config.h>

#include <stdio.h>
#include <netinet/in.h>
Expand Down
Loading