]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Tue, 26 Mar 2013 19:23:50 +0000 (12:23 -0700)
committerSean Hefty <sean.hefty@intel.com>
Tue, 26 Mar 2013 19:23:50 +0000 (12:23 -0700)
meta
patches/refresh-temp [deleted file]
patches/verbs-ext

diff --git a/meta b/meta
index a4df700fc3e2e74dec66e1bb990c909e69c454a6..2aaa3ad313b9f8a38edaf2c52f4b02a1e50a795c 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,8 @@
 Version: 1
-Previous: 252146d3098e5a40837abc506c5910c32814377d
-Head: 7b775b2cee353982e3bc63c825570e603a656f83
+Previous: 4e2b0cab1407da367c82dcca135418c65496a54e
+Head: a803d177d5947d6aa0ca474dc2401124e6aa1f00
 Applied:
-  verbs-ext: ab28fe8b8753f7038560436141018a53f8aefc66
-  refresh-temp: 7b775b2cee353982e3bc63c825570e603a656f83
+  verbs-ext: a803d177d5947d6aa0ca474dc2401124e6aa1f00
 Unapplied:
   xrcd2: baac0085e807323f038d9c2225b6f519bc3fea1a
   srq_ex: 3d6e3e35b5f89c7c33f02130cc4244bdbeb4f215
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index 02bda7c..0000000
+++ /dev/null
@@ -1,330 +0,0 @@
-Bottom: 7a4a2fce80a8078f9b400686285ecdfc3c509c74
-Top:    4c31d9897858220be47469ae96113a48908f8fcc
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2013-03-26 12:09:59 -0700
-
-Refresh of verbs-ext
-
----
-
-diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h
-index 619ea7e..e7f8981 100644
---- a/include/infiniband/kern-abi.h
-+++ b/include/infiniband/kern-abi.h
-@@ -45,7 +45,7 @@
- /*
-  * The minimum and maximum kernel ABI that we can handle.
-  */
--#define IB_USER_VERBS_MIN_ABI_VERSION 1
-+#define IB_USER_VERBS_MIN_ABI_VERSION 3
- #define IB_USER_VERBS_MAX_ABI_VERSION 6
- enum {
-@@ -806,47 +806,6 @@ enum {
-       IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL_V2 = -1,
- };
--struct ibv_destroy_cq_v1 {
--      __u32 command;
--      __u16 in_words;
--      __u16 out_words;
--      __u32 cq_handle;
--};
--
--struct ibv_destroy_qp_v1 {
--      __u32 command;
--      __u16 in_words;
--      __u16 out_words;
--      __u32 qp_handle;
--};
--
--struct ibv_destroy_srq_v1 {
--      __u32 command;
--      __u16 in_words;
--      __u16 out_words;
--      __u32 srq_handle;
--};
--
--struct ibv_get_context_v2 {
--      __u32 command;
--      __u16 in_words;
--      __u16 out_words;
--      __u64 response;
--      __u64 cq_fd_tab;
--      __u64 driver_data[0];
--};
--
--struct ibv_create_cq_v2 {
--      __u32 command;
--      __u16 in_words;
--      __u16 out_words;
--      __u64 response;
--      __u64 user_handle;
--      __u32 cqe;
--      __u32 event_handler;
--      __u64 driver_data[0];
--};
--
- struct ibv_modify_srq_v3 {
-       __u32 command;
-       __u16 in_words;
-diff --git a/src/cmd.c b/src/cmd.c
-index dab8930..86350fd 100644
---- a/src/cmd.c
-+++ b/src/cmd.c
-@@ -50,7 +50,7 @@ int ibv_cmd_get_context(struct ibv_context *context, struct ibv_get_context *cmd
-                       size_t cmd_size, struct ibv_get_context_resp *resp,
-                       size_t resp_size)
- {
--      if (abi_ver <= 2)
-+      if (abi_ver < IB_USER_VERBS_MIN_ABI_VERSION)
-               return ENOSYS;
-       IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
-@@ -235,45 +235,12 @@ int ibv_cmd_dereg_mr(struct ibv_mr *mr)
-       return 0;
- }
--static int ibv_cmd_create_cq_v2(struct ibv_context *context, int cqe,
--                              struct ibv_cq *cq,
--                              struct ibv_create_cq *new_cmd, size_t new_cmd_size,
--                              struct ibv_create_cq_resp *resp, size_t resp_size)
--{
--      struct ibv_create_cq_v2 *cmd;
--      size_t cmd_size;
--
--      cmd_size = sizeof *cmd + new_cmd_size - sizeof *new_cmd;
--      cmd      = alloca(cmd_size);
--      memcpy(cmd->driver_data, new_cmd->driver_data, new_cmd_size - sizeof *new_cmd);
--
--      IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_CQ, resp, resp_size);
--      cmd->user_handle   = (uintptr_t) cq;
--      cmd->cqe           = cqe;
--      cmd->event_handler = 0;
--
--      if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
--              return errno;
--
--      (void) VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
--
--      cq->handle  = resp->cq_handle;
--      cq->cqe     = resp->cqe;
--      cq->context = context;
--
--      return 0;
--}
--
- int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
-                     struct ibv_comp_channel *channel,
-                     int comp_vector, struct ibv_cq *cq,
-                     struct ibv_create_cq *cmd, size_t cmd_size,
-                     struct ibv_create_cq_resp *resp, size_t resp_size)
- {
--      if (abi_ver <= 2)
--              return ibv_cmd_create_cq_v2(context, cqe, cq,
--                                          cmd, cmd_size, resp, resp_size);
--
-       IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_CQ, resp, resp_size);
-       cmd->user_handle   = (uintptr_t) cq;
-       cmd->cqe           = cqe;
-@@ -358,7 +325,6 @@ int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
-                     struct ibv_resize_cq *cmd, size_t cmd_size,
-                     struct ibv_resize_cq_resp *resp, size_t resp_size)
- {
--
-       IBV_INIT_CMD_RESP(cmd, cmd_size, RESIZE_CQ, resp, resp_size);
-       cmd->cq_handle = cq->handle;
-       cmd->cqe       = cqe;
-@@ -373,27 +339,11 @@ int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
-       return 0;
- }
--static int ibv_cmd_destroy_cq_v1(struct ibv_cq *cq)
--{
--      struct ibv_destroy_cq_v1 cmd;
--
--      IBV_INIT_CMD(&cmd, sizeof cmd, DESTROY_CQ);
--      cmd.cq_handle = cq->handle;
--
--      if (write(cq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
--              return errno;
--
--      return 0;
--}
--
- int ibv_cmd_destroy_cq(struct ibv_cq *cq)
- {
-       struct ibv_destroy_cq      cmd;
-       struct ibv_destroy_cq_resp resp;
--      if (abi_ver == 1)
--              return ibv_cmd_destroy_cq_v1(cq);
--
-       IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_CQ, &resp, sizeof resp);
-       cmd.cq_handle = cq->handle;
-       cmd.reserved  = 0;
-@@ -518,27 +468,11 @@ int ibv_cmd_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr,
-       return 0;
- }
--static int ibv_cmd_destroy_srq_v1(struct ibv_srq *srq)
--{
--      struct ibv_destroy_srq_v1 cmd;
--
--      IBV_INIT_CMD(&cmd, sizeof cmd, DESTROY_SRQ);
--      cmd.srq_handle = srq->handle;
--
--      if (write(srq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
--              return errno;
--
--      return 0;
--}
--
- int ibv_cmd_destroy_srq(struct ibv_srq *srq)
- {
-       struct ibv_destroy_srq      cmd;
-       struct ibv_destroy_srq_resp resp;
--      if (abi_ver == 1)
--              return ibv_cmd_destroy_srq_v1(srq);
--
-       IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_SRQ, &resp, sizeof resp);
-       cmd.srq_handle = srq->handle;
-       cmd.reserved   = 0;
-@@ -760,19 +694,6 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
-       return 0;
- }
--static int ibv_cmd_destroy_qp_v1(struct ibv_qp *qp)
--{
--      struct ibv_destroy_qp_v1 cmd;
--
--      IBV_INIT_CMD(&cmd, sizeof cmd, DESTROY_QP);
--      cmd.qp_handle = qp->handle;
--
--      if (write(qp->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
--              return errno;
--
--      return 0;
--}
--
- int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
-                     struct ibv_send_wr **bad_wr)
- {
-@@ -1035,9 +956,6 @@ int ibv_cmd_destroy_qp(struct ibv_qp *qp)
-       struct ibv_destroy_qp      cmd;
-       struct ibv_destroy_qp_resp resp;
--      if (abi_ver == 1)
--              return ibv_cmd_destroy_qp_v1(qp);
--
-       IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_QP, &resp, sizeof resp);
-       cmd.qp_handle = qp->handle;
-       cmd.reserved  = 0;
-diff --git a/src/kern_abi.h b/src/kern_abi.h
-deleted file mode 100644
-index e055e75..0000000
---- a/src/kern_abi.h
-+++ /dev/null
-@@ -1,101 +0,0 @@
--/*
-- * Copyright (c) 2005 Topspin 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.
-- */
--
--#ifndef KERN_ABI_H
--#define KERN_ABI_H
--
--#include <linux/types.h>
--
--/*
-- * Increment this value if any changes that break userspace ABI
-- * compatibility are made.
-- */
--#define IB_USER_VERBS_ABI_VERSION     1
--
--enum {
--      IB_USER_VERBS_CMD_GET_CONTEXT,
--      IB_USER_VERBS_CMD_GET_EVENT_FDS,
--      IB_USER_VERBS_CMD_ALLOC_PD,
--      IB_USER_VERBS_CMD_DEALLOC_PD,
--      IB_USER_VERBS_CMD_REG_MR,
--      IB_USER_VERBS_CMD_DEREG_MR
--};
--
--/*
-- * Make sure that all structs defined in this file remain laid out so
-- * that they pack the same way on 32-bit and 64-bit architectures (to
-- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
-- * In particular do not use pointer types -- pass pointers in __u64
-- * instead.
-- */
--
--struct ibv_kern_async_event {
--      __u32 event_type;
--      __u32 element;
--};
--
--struct ibv_comp_event {
--      __u32 cq_handle;
--};
--
--/*
-- * All commands from userspace should start with a __u32 command field
-- * followed by __u16 in_words and out_words fields (which give the
-- * length of the command block and response buffer if any in 32-bit
-- * words).  The kernel driver will read these fields first and read
-- * the rest of the command struct based on these value.
-- */
--
--struct ibv_get_context {
--      __u32 command;
--      __u16 in_words;
--      __u16 out_words;
--      __u64 response;
--};
--
--struct ibv_get_context_resp {
--      __u32 num_cq_events;
--};
--
--struct ibv_get_event_fds {
--      __u32 command;
--      __u16 in_words;
--      __u16 out_words;
--      __u64 response;
--};
--
--struct ibv_get_event_fds_resp {
--      __u32 async_fd;
--      __u32 cq_fd[1];
--};
--
--#endif /* KERN_ABI_H */
index 6e19bbdf18971373fb912bb193eaf39d53352495..cd3a5617f35b74e4289302da1f48f05f32dbc529 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: 3441ce7abc8e145f2eb9ef7110fe2a69010bd8f6
-Top:    7a4a2fce80a8078f9b400686285ecdfc3c509c74
+Top:    4c31d9897858220be47469ae96113a48908f8fcc
 Author: Yishai Hadas <yishaih@mellanox.com>
 Date:   2012-08-26 16:43:30 +0300
 
@@ -19,6 +19,12 @@ With extensions, ibverbs allocates the ibv_context structure
 and calls into the provider to initialize it.  The init call
 is part of the verbs_device struct.
 
+The abi_compat field of struct ibv_context is used to determine
+support of verbs extensions.  As a result, support for ABI version <
+2 is removed (corresponds to kernel releases 2.6.11-2.6.14 no
+longer being supported).  The lowest ABI now supported is 3 (really
+4 since 2.6.15 was ABI 4, I don't see that ABI 3 was in a release).
+
 Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
 Signed-off-by: Tzahi Oved <tzahio@mellanox.com>
 Signed-off-by: Sean Hefty <sean.hefty@intel.com>
@@ -42,6 +48,67 @@ index 9a81416..f22f287 100644
  int ibv_cmd_get_context(struct ibv_context *context, struct ibv_get_context *cmd,
                        size_t cmd_size, struct ibv_get_context_resp *resp,
                        size_t resp_size);
+diff --git a/include/infiniband/kern-abi.h b/include/infiniband/kern-abi.h
+index 619ea7e..e7f8981 100644
+--- a/include/infiniband/kern-abi.h
++++ b/include/infiniband/kern-abi.h
+@@ -45,7 +45,7 @@
+ /*
+  * The minimum and maximum kernel ABI that we can handle.
+  */
+-#define IB_USER_VERBS_MIN_ABI_VERSION 1
++#define IB_USER_VERBS_MIN_ABI_VERSION 3
+ #define IB_USER_VERBS_MAX_ABI_VERSION 6
+ enum {
+@@ -806,47 +806,6 @@ enum {
+       IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL_V2 = -1,
+ };
+-struct ibv_destroy_cq_v1 {
+-      __u32 command;
+-      __u16 in_words;
+-      __u16 out_words;
+-      __u32 cq_handle;
+-};
+-
+-struct ibv_destroy_qp_v1 {
+-      __u32 command;
+-      __u16 in_words;
+-      __u16 out_words;
+-      __u32 qp_handle;
+-};
+-
+-struct ibv_destroy_srq_v1 {
+-      __u32 command;
+-      __u16 in_words;
+-      __u16 out_words;
+-      __u32 srq_handle;
+-};
+-
+-struct ibv_get_context_v2 {
+-      __u32 command;
+-      __u16 in_words;
+-      __u16 out_words;
+-      __u64 response;
+-      __u64 cq_fd_tab;
+-      __u64 driver_data[0];
+-};
+-
+-struct ibv_create_cq_v2 {
+-      __u32 command;
+-      __u16 in_words;
+-      __u16 out_words;
+-      __u64 response;
+-      __u64 user_handle;
+-      __u32 cqe;
+-      __u32 event_handler;
+-      __u64 driver_data[0];
+-};
+-
+ struct ibv_modify_srq_v3 {
+       __u32 command;
+       __u16 in_words;
 diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
 index 6acfc81..e4361aa 100644
 --- a/include/infiniband/verbs.h
@@ -130,7 +197,7 @@ index 6acfc81..e4361aa 100644
   * ibv_get_device_list - Get list of IB devices currently available
   * @num_devices: optional.  if non-NULL, set to the number of devices
 diff --git a/src/cmd.c b/src/cmd.c
-index 9789092..dab8930 100644
+index 9789092..86350fd 100644
 --- a/src/cmd.c
 +++ b/src/cmd.c
 @@ -45,52 +45,13 @@
@@ -181,12 +248,153 @@ index 9789092..dab8930 100644
                        size_t cmd_size, struct ibv_get_context_resp *resp,
                        size_t resp_size)
  {
-       if (abi_ver <= 2)
+-      if (abi_ver <= 2)
 -              return ibv_cmd_get_context_v2(context, cmd, cmd_size, resp, resp_size);
++      if (abi_ver < IB_USER_VERBS_MIN_ABI_VERSION)
 +              return ENOSYS;
  
        IBV_INIT_CMD_RESP(cmd, cmd_size, GET_CONTEXT, resp, resp_size);
  
+@@ -274,45 +235,12 @@ int ibv_cmd_dereg_mr(struct ibv_mr *mr)
+       return 0;
+ }
+-static int ibv_cmd_create_cq_v2(struct ibv_context *context, int cqe,
+-                              struct ibv_cq *cq,
+-                              struct ibv_create_cq *new_cmd, size_t new_cmd_size,
+-                              struct ibv_create_cq_resp *resp, size_t resp_size)
+-{
+-      struct ibv_create_cq_v2 *cmd;
+-      size_t cmd_size;
+-
+-      cmd_size = sizeof *cmd + new_cmd_size - sizeof *new_cmd;
+-      cmd      = alloca(cmd_size);
+-      memcpy(cmd->driver_data, new_cmd->driver_data, new_cmd_size - sizeof *new_cmd);
+-
+-      IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_CQ, resp, resp_size);
+-      cmd->user_handle   = (uintptr_t) cq;
+-      cmd->cqe           = cqe;
+-      cmd->event_handler = 0;
+-
+-      if (write(context->cmd_fd, cmd, cmd_size) != cmd_size)
+-              return errno;
+-
+-      (void) VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
+-
+-      cq->handle  = resp->cq_handle;
+-      cq->cqe     = resp->cqe;
+-      cq->context = context;
+-
+-      return 0;
+-}
+-
+ int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
+                     struct ibv_comp_channel *channel,
+                     int comp_vector, struct ibv_cq *cq,
+                     struct ibv_create_cq *cmd, size_t cmd_size,
+                     struct ibv_create_cq_resp *resp, size_t resp_size)
+ {
+-      if (abi_ver <= 2)
+-              return ibv_cmd_create_cq_v2(context, cqe, cq,
+-                                          cmd, cmd_size, resp, resp_size);
+-
+       IBV_INIT_CMD_RESP(cmd, cmd_size, CREATE_CQ, resp, resp_size);
+       cmd->user_handle   = (uintptr_t) cq;
+       cmd->cqe           = cqe;
+@@ -397,7 +325,6 @@ int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
+                     struct ibv_resize_cq *cmd, size_t cmd_size,
+                     struct ibv_resize_cq_resp *resp, size_t resp_size)
+ {
+-
+       IBV_INIT_CMD_RESP(cmd, cmd_size, RESIZE_CQ, resp, resp_size);
+       cmd->cq_handle = cq->handle;
+       cmd->cqe       = cqe;
+@@ -412,27 +339,11 @@ int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
+       return 0;
+ }
+-static int ibv_cmd_destroy_cq_v1(struct ibv_cq *cq)
+-{
+-      struct ibv_destroy_cq_v1 cmd;
+-
+-      IBV_INIT_CMD(&cmd, sizeof cmd, DESTROY_CQ);
+-      cmd.cq_handle = cq->handle;
+-
+-      if (write(cq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
+-              return errno;
+-
+-      return 0;
+-}
+-
+ int ibv_cmd_destroy_cq(struct ibv_cq *cq)
+ {
+       struct ibv_destroy_cq      cmd;
+       struct ibv_destroy_cq_resp resp;
+-      if (abi_ver == 1)
+-              return ibv_cmd_destroy_cq_v1(cq);
+-
+       IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_CQ, &resp, sizeof resp);
+       cmd.cq_handle = cq->handle;
+       cmd.reserved  = 0;
+@@ -557,27 +468,11 @@ int ibv_cmd_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr,
+       return 0;
+ }
+-static int ibv_cmd_destroy_srq_v1(struct ibv_srq *srq)
+-{
+-      struct ibv_destroy_srq_v1 cmd;
+-
+-      IBV_INIT_CMD(&cmd, sizeof cmd, DESTROY_SRQ);
+-      cmd.srq_handle = srq->handle;
+-
+-      if (write(srq->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
+-              return errno;
+-
+-      return 0;
+-}
+-
+ int ibv_cmd_destroy_srq(struct ibv_srq *srq)
+ {
+       struct ibv_destroy_srq      cmd;
+       struct ibv_destroy_srq_resp resp;
+-      if (abi_ver == 1)
+-              return ibv_cmd_destroy_srq_v1(srq);
+-
+       IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_SRQ, &resp, sizeof resp);
+       cmd.srq_handle = srq->handle;
+       cmd.reserved   = 0;
+@@ -799,19 +694,6 @@ int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
+       return 0;
+ }
+-static int ibv_cmd_destroy_qp_v1(struct ibv_qp *qp)
+-{
+-      struct ibv_destroy_qp_v1 cmd;
+-
+-      IBV_INIT_CMD(&cmd, sizeof cmd, DESTROY_QP);
+-      cmd.qp_handle = qp->handle;
+-
+-      if (write(qp->context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
+-              return errno;
+-
+-      return 0;
+-}
+-
+ int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
+                     struct ibv_send_wr **bad_wr)
+ {
+@@ -1074,9 +956,6 @@ int ibv_cmd_destroy_qp(struct ibv_qp *qp)
+       struct ibv_destroy_qp      cmd;
+       struct ibv_destroy_qp_resp resp;
+-      if (abi_ver == 1)
+-              return ibv_cmd_destroy_qp_v1(qp);
+-
+       IBV_INIT_CMD_RESP(&cmd, sizeof cmd, DESTROY_QP, &resp, sizeof resp);
+       cmd.qp_handle = qp->handle;
+       cmd.reserved  = 0;
 diff --git a/src/device.c b/src/device.c
 index 5798895..448a243 100644
 --- a/src/device.c
@@ -360,6 +568,113 @@ index 8d6786e..d6cd84a 100644
  
        if (ibv_read_sysfs_file(sysfs_dev->ibdev_path, "node_type", value, sizeof value) < 0) {
                fprintf(stderr, PFX "Warning: no node_type attr under %s.\n",
+diff --git a/src/kern_abi.h b/src/kern_abi.h
+deleted file mode 100644
+index e055e75..0000000
+--- a/src/kern_abi.h
++++ /dev/null
+@@ -1,101 +0,0 @@
+-/*
+- * Copyright (c) 2005 Topspin 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.
+- */
+-
+-#ifndef KERN_ABI_H
+-#define KERN_ABI_H
+-
+-#include <linux/types.h>
+-
+-/*
+- * Increment this value if any changes that break userspace ABI
+- * compatibility are made.
+- */
+-#define IB_USER_VERBS_ABI_VERSION     1
+-
+-enum {
+-      IB_USER_VERBS_CMD_GET_CONTEXT,
+-      IB_USER_VERBS_CMD_GET_EVENT_FDS,
+-      IB_USER_VERBS_CMD_ALLOC_PD,
+-      IB_USER_VERBS_CMD_DEALLOC_PD,
+-      IB_USER_VERBS_CMD_REG_MR,
+-      IB_USER_VERBS_CMD_DEREG_MR
+-};
+-
+-/*
+- * Make sure that all structs defined in this file remain laid out so
+- * that they pack the same way on 32-bit and 64-bit architectures (to
+- * avoid incompatibility between 32-bit userspace and 64-bit kernels).
+- * In particular do not use pointer types -- pass pointers in __u64
+- * instead.
+- */
+-
+-struct ibv_kern_async_event {
+-      __u32 event_type;
+-      __u32 element;
+-};
+-
+-struct ibv_comp_event {
+-      __u32 cq_handle;
+-};
+-
+-/*
+- * All commands from userspace should start with a __u32 command field
+- * followed by __u16 in_words and out_words fields (which give the
+- * length of the command block and response buffer if any in 32-bit
+- * words).  The kernel driver will read these fields first and read
+- * the rest of the command struct based on these value.
+- */
+-
+-struct ibv_get_context {
+-      __u32 command;
+-      __u16 in_words;
+-      __u16 out_words;
+-      __u64 response;
+-};
+-
+-struct ibv_get_context_resp {
+-      __u32 num_cq_events;
+-};
+-
+-struct ibv_get_event_fds {
+-      __u32 command;
+-      __u16 in_words;
+-      __u16 out_words;
+-      __u64 response;
+-};
+-
+-struct ibv_get_event_fds_resp {
+-      __u32 async_fd;
+-      __u32 cq_fd[1];
+-};
+-
+-#endif /* KERN_ABI_H */
 diff --git a/src/libibverbs.map b/src/libibverbs.map
 index 1827da0..ee9adea 100644
 --- a/src/libibverbs.map