Revert "HACK ctdb/ib"
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jun 2014 14:34:12 +0000 (16:34 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 11:15:20 +0000 (13:15 +0200)
This reverts commit 4e69289a70b1c4662d9e97b3ddf958c538b00610.

ctdb/ib/ibw_ctdb.c
ctdb/ib/ibwrapper.c

index 9b50d5c1218be1869e7b98adfd1b146f904c80b6..458646faae0904265101900472c8fcfb9dc89864 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "ibwrapper.h"
 #include "ibw_ctdb.h"
-#include "lib/util/dlinklist.h"
 
 int ctdb_ibw_get_address(struct ctdb_context *ctdb,
        const char *address, struct in_addr *addr)
index 01e17ab233cb17ccc0f89c5459c95d77bb49134a..5ca3b946f00f371bd8a6a0cd4eadcfe09fa14d9b 100644 (file)
@@ -42,9 +42,9 @@
 #define IBW_LASTERR_BUFSIZE 512
 static char ibw_lasterr[IBW_LASTERR_BUFSIZE];
 
-#define IBW_MAX_SEND_WR 16
-#define IBW_MAX_RECV_WR 16
-#define IBW_RECV_BUFSIZE 64
+#define IBW_MAX_SEND_WR 256
+#define IBW_MAX_RECV_WR 1024
+#define IBW_RECV_BUFSIZE 256
 #define IBW_RECV_THRESHOLD (1 * 1024 * 1024)
 
 static void ibw_event_handler_verbs(struct tevent_context *ev,
@@ -66,7 +66,6 @@ static void *ibw_alloc_mr(struct ibw_ctx_priv *pctx, struct ibw_conn_priv *pconn
                return NULL;
        }
 
-       DEBUG(DEBUG_DEBUG, ("2 ibw_alloc_mr(cmid=%p, n=%u)\n", pconn->cm_id, n));
        *ppmr = ibv_reg_mr(pconn->pd, buf, n, IBV_ACCESS_LOCAL_WRITE);
        if (!*ppmr) {
                sprintf(ibw_lasterr, "couldn't allocate mr\n");
@@ -74,7 +73,6 @@ static void *ibw_alloc_mr(struct ibw_ctx_priv *pctx, struct ibw_conn_priv *pconn
                return NULL;
        }
 
-       DEBUG(DEBUG_DEBUG, ("3 ibw_alloc_mr(cmid=%p, n=%u)\n", pconn->cm_id, n));
        return buf;
 }
 
@@ -107,13 +105,6 @@ static int ibw_init_memory(struct ibw_conn *conn)
                return -1;
        }
 
-       pconn->buf_recv = ibw_alloc_mr(pctx, pconn,
-               opts->max_send_wr * opts->recv_bufsize, &pconn->mr_send);
-       if (!pconn->buf_send) {
-               sprintf(ibw_lasterr, "METZEcouldn't allocate work send buf\n");
-               return -1;
-       }
-
        pconn->buf_recv = ibw_alloc_mr(pctx, pconn,
                opts->max_recv_wr * opts->recv_bufsize, &pconn->mr_recv);
        if (!pconn->buf_recv) {