[PATCH 0/5] dapl: ucm provider changes for large CM UD alltoall scaling

2015-05-22 Thread Davis, Arlin R
From: Arlin Davis arlin.r.da...@intel.com

Tested on 1200n, 28ppn cluster, MPI AlltoAll 
Intel MPI, UD mode, static and dynamic, over 500m connections.

Arlin Davis (5):
  ucm: optimizations for large scale UD communication management
  ucm: check for AH caching when destroying via UD extension
  ucm: allocate/free AH hash table for UD endpoint types
  ucm: add device support for new port space hash table
  ucm: CM changes for UD extended port space and indexer

 dapl/openib_common/dapl_ib_common.h |   15 +-
 dapl/openib_common/ib_extensions.c  |   14 +-
 dapl/openib_common/qp.c |   32 +-
 dapl/openib_ucm/cm.c| 1255 +++
 dapl/openib_ucm/dapl_ib_util.h  |   37 +-
 dapl/openib_ucm/device.c|  153 -
 6 files changed, 1030 insertions(+), 476 deletions(-)

-- 
1.7.3

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


[PATCH 5/5] dapl ucm: CM changes for UD extended port space and indexer

2015-05-22 Thread Davis, Arlin R
From: Arlin Davis arlin.r.da...@intel.com

Change port manager to indexer and service ID manager
to bitarray indexer. Reduces footprint for service IDs
and allow direct lookup on CM messages.

New insert, remove, lookup functions for processing ID
based CM objects. Inbound requests, with the exception
of new CM requests, will no longer parse list but
use hash table lookups.

AH caching is now used to prevent unnecessarily
creating multiple AH's for same QP destination.

Add 24-bit port space support to CM processing code and
to wire protocol via DCM message reserve space.
Add version check to limit to 16-bit for backward compatibility.

Bump CM protocol version to 8 for xport and rtns fields.

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_ucm/cm.c | 1255 +-
 1 files changed, 826 insertions(+), 429 deletions(-)

diff --git a/dapl/openib_ucm/cm.c b/dapl/openib_ucm/cm.c
index 330b1c2..3d06c82 100644
--- a/dapl/openib_ucm/cm.c
+++ b/dapl/openib_ucm/cm.c
@@ -116,40 +116,9 @@ static int ucm_send(ib_hca_transport_t *tp, ib_cm_msg_t 
*msg, DAT_PVOID p_data,
 static void ucm_disconnect_final(dp_ib_cm_handle_t cm);
 DAT_RETURN dapli_cm_disconnect(dp_ib_cm_handle_t cm);
 DAT_RETURN dapli_cm_connect(DAPL_EP *ep, dp_ib_cm_handle_t cm);
-
-/* Service ids - port space */
-static uint16_t ucm_get_port(ib_hca_transport_t *tp, uint16_t port)
-{
-   int i = 0;
-   
-   dapl_os_lock(tp-plock);
-   /* get specific ID */
-   if (port) {
-   if (tp-sid[port] == 0) {
-   tp-sid[port] = 1;
-   i = port;
-   }
-   goto done;
-   } 
-   
-   /* get any free ID */
-   for (i = 0x; i  0; i--) {
-   if (tp-sid[i] == 0) {
-   tp-sid[i] = 1;
-   break;
-   }
-   }
-done:
-   dapl_os_unlock(tp-plock);
-   return i;
-}
-
-static void ucm_free_port(ib_hca_transport_t *tp, uint16_t port)
-{
-   dapl_os_lock(tp-plock);
-   tp-sid[port] = 0;
-   dapl_os_unlock(tp-plock);
-}
+static int dapli_queue_listen(dp_ib_cm_handle_t cm, uint16_t sid);
+static int dapli_queue_conn(dp_ib_cm_handle_t cm);
+static dp_ib_cm_handle_t dapli_cm_lookup(ib_hca_transport_t *tp, int cm_id);
 
 static void ucm_check_timers(dp_ib_cm_handle_t cm, int *timer)
 {
@@ -163,16 +132,19 @@ static void ucm_check_timers(dp_ib_cm_handle_t cm, int 
*timer)
if ((time - cm-timer)/1000 =
(cm-hca-ib_trans.rep_time  cm-retries)) {
dapl_log(DAPL_DBG_TYPE_CM_WARN,
- CM_REQ retry %p %d [lid, port, cqp, iqp]:
- %x %x %x %x - %x %x %x %x Time(ms) %d = 
%d\n,
-cm, cm-retries+1,
-ntohs(cm-msg.saddr.ib.lid), 
ntohs(cm-msg.sport),
+ CM_REQ %d retry %d:
+ %d %x %x %x %x - %d %x %x %x %x: %d  
%d(ms)\n,
+cm-cm_id, cm-retries+1,
+ntohl(cm-msg.s_id), 
ntohs(cm-msg.saddr.ib.lid),
+UCM_PORT_NTOH(cm-msg.sportx, cm-msg.sport),
 ntohl(cm-msg.sqpn), 
ntohl(cm-msg.saddr.ib.qpn),
-ntohs(cm-msg.daddr.ib.lid), 
ntohs(cm-msg.dport),
+ntohl(cm-msg.d_id), 
ntohs(cm-msg.daddr.ib.lid),
+UCM_PORT_NTOH(cm-msg.dportx, cm-msg.dport),
 ntohl(cm-msg.dqpn), 
ntohl(cm-msg.daddr.ib.qpn),
 (time - cm-timer)/1000,
 cm-hca-ib_trans.rep_time  cm-retries);
cm-retries++;
+   cm-msg.rtns = cm-retries;
DAPL_CNTR(((DAPL_IA 
*)dapl_llist_peek_head(cm-hca-ia_list_head)),
DCNT_IA_CM_ERR_REQ_RETRY);
dapl_os_unlock(cm-lock);
@@ -185,17 +157,20 @@ static void ucm_check_timers(dp_ib_cm_handle_t cm, int 
*timer)
if ((time - cm-timer)/1000 =
(cm-hca-ib_trans.rtu_time  cm-retries)) {
dapl_log(DAPL_DBG_TYPE_CM_WARN,
- CM_REP retry %d %s [lid, port, cqp, iqp]:
- %x %x %x %x - %x %x %x %x r_pid %x Time(ms) 
%d = %d\n,
-cm-retries+1,
+ CM_REP %d retry %d %s:
+ %d %x %x %x %x - %d %x %x %x %x: %d  
%d(ms)\n,
+cm-cm_id, cm-retries+1,
 dapl_cm_op_str(ntohs(cm-msg.op)),
-ntohs(cm-msg.saddr.ib.lid), 
ntohs(cm-msg.sport),
+ntohl(cm-msg.s_id), 

[PATCH 4/5] dapl ucm: add device support for new port space hash table

2015-05-22 Thread Davis, Arlin R
From: Arlin Davis arlin.r.da...@intel.com

Allocate port space hash table during device open when creating CM services. 
Default settings are set to 4K entry chunks and 256K total port slots.
Add environment variables for adjustments

DAPL_UCM_ENTRY_BITS 11
DAPL_UCM_ARRAY_BITS 18

Add debug output for create CM service errors

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_ucm/device.c |  153 +++---
 1 files changed, 117 insertions(+), 36 deletions(-)

diff --git a/dapl/openib_ucm/device.c b/dapl/openib_ucm/device.c index 
b9abbf0..94ce812 100644
--- a/dapl/openib_ucm/device.c
+++ b/dapl/openib_ucm/device.c
@@ -311,6 +311,9 @@ DAT_RETURN dapls_ib_open_hca(IN IB_HCA_NAME hca_name,
if ((dapl_os_lock_init(hca_ptr-ib_trans.plock)) != DAT_SUCCESS)
goto bail;
 
+   if ((dapl_os_lock_init(hca_ptr-ib_trans.ilock)) != DAT_SUCCESS)
+   goto bail;
+
/* EVD events without direct CQ channels, CNO support */
hca_ptr-ib_trans.ib_cq =
ibv_create_comp_channel(hca_ptr-ib_hca_handle);
@@ -367,11 +370,11 @@ done:
   hca_ptr-ib_trans.addr,
   sizeof(union dcm_addr));
 
-   dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
+   dapl_log(DAPL_DBG_TYPE_UTIL,
 %s open: dev %s port %d, GID %s, LID %x qpn %x sl %d\n,
 PROVIDER_NAME, hca_name, hca_ptr-port_num,
 inet_ntop(AF_INET6, hca_ptr-ib_trans.addr.ib.gid,
-  gid_str, sizeof(gid_str)),
+ gid_str, sizeof(gid_str)),
 ntohs(ucm_ia-ib.lid), ntohl(ucm_ia-ib.qpn),
 ucm_ia-ib.sl, ucm_ia-ib.qp_type);
 
@@ -428,6 +431,7 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
 
dapl_os_lock_destroy(hca_ptr-ib_trans.lock);
dapl_os_lock_destroy(hca_ptr-ib_trans.llock);
+   dapl_os_lock_destroy(hca_ptr-ib_trans.ilock);
destroy_os_signal(hca_ptr);
ucm_service_destroy(hca_ptr);
 done:
@@ -454,7 +458,7 @@ done:
 static void ucm_service_destroy(IN DAPL_HCA *hca)  {
ib_hca_transport_t *tp = hca-ib_trans;
-   int msg_size = sizeof(ib_cm_msg_t);
+   int i, msg_size = sizeof(ib_cm_msg_t);
 
if (tp-mr_sbuf)
ibv_dereg_mr(tp-mr_sbuf);
@@ -475,26 +479,32 @@ static void ucm_service_destroy(IN DAPL_HCA *hca)
ibv_destroy_comp_channel(tp-rch);
 
if (tp-ah) {
-   int i;
-
-   for (i = 0;i  0x; i++) {
+   for (i=0; iDCM_AH_SPACE; i++) {
if (tp-ah[i])
ibv_destroy_ah(tp-ah[i]);
}
-   dapl_os_free(tp-ah, (sizeof(*tp-ah) * 0x));
+   dapl_os_free(tp-ah, (sizeof(*tp-ah) * DCM_AH_SPACE));
}
 
if (tp-pd)
ibv_dealloc_pd(tp-pd);
 
if (tp-sid)
-   dapl_os_free(tp-sid, (sizeof(*tp-sid) * 0x));
+   dapl_os_free(tp-sid, UCM_SID_SPACE/UCM_SID_ENTRY);
 
if (tp-rbuf)
dapl_os_free(tp-rbuf, (msg_size * tp-qpe));
 
if (tp-sbuf)
dapl_os_free(tp-sbuf, (msg_size * tp-qpe));
+
+   if (tp-cm_idxr) {
+   for (i=0; i=tp-cm_idxr_cur; i++) {
+   dapl_os_free(tp-cm_idxr[i],
+UCM_ENTRY_SIZE(tp-cm_entry_bits));
+   tp-cm_idxr[i] = 0;
+   }
+   }
 }
 
 static int ucm_service_create(IN DAPL_HCA *hca) @@ -503,7 +513,7 @@ static int 
ucm_service_create(IN DAPL_HCA *hca)
ib_hca_transport_t *tp = hca-ib_trans;
struct ibv_recv_wr recv_wr, *recv_err;
 struct ibv_sge sge;
-   int i, mlen = sizeof(ib_cm_msg_t);
+   int i, array_sz, entry_sz, mlen = sizeof(ib_cm_msg_t);
int hlen = sizeof(struct ibv_grh); /* hdr included with UD recv */
char *rbuf;
 
@@ -518,31 +528,78 @@ static int ucm_service_create(IN DAPL_HCA *hca)
tp-dreq_cnt = dapl_os_get_env_val(DAPL_UCM_DREQ_RETRY, DCM_DREQ_CNT);
tp-drep_time = dapl_os_get_env_val(DAPL_UCM_DREP_TIME, 
DCM_DREP_TIME);
tp-cm_timer = dapl_os_get_env_val(DAPL_UCM_TIMER, DCM_CM_TIMER);
+   /* default = 11-bit, 2KB entries; 18 bit, 256KB total */
+   tp-cm_entry_bits = dapl_os_get_env_val(DAPL_UCM_ENTRY_BITS, 
UCM_ENTRY_BITS);
+   tp-cm_array_bits = DAPL_MAX(dapl_os_get_env_val(DAPL_UCM_ARRAY_BITS, 
UCM_ARRAY_BITS), tp-cm_entry_bits);
+   array_sz = UCM_ARRAY_SIZE(tp-cm_array_bits, tp-cm_entry_bits);
+   entry_sz = UCM_ENTRY_SIZE(tp-cm_entry_bits);
+
tp-pd = ibv_alloc_pd(hca-ib_hca_handle);
-if (!tp-pd) 
-goto bail;
+if (!tp-pd) {
+   dapl_log(DAPL_DBG_TYPE_ERR,
+UCM: CM service: ERR ibv_pd (%s)\n,
+strerror(errno));
+   goto bail;
+}
 
-dapl_log(DAPL_DBG_TYPE_UTIL,
- 

[PATCH 1/5] dapl ucm: optimizations for large scale UD communication management

2015-05-22 Thread Davis, Arlin R
From: Arlin Davis arlin.r.da...@intel.com

AH caching per QP, AH space set to 48K for LID unicast
Bump port space up to 24 bits
Reduce CM object and reduce private data to 68 bytes
Add xport space and rtns to DCM reserve fields.

New indexer macros for port space hash table management

Add hash table storage to ibtrans device objects

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_common/dapl_ib_common.h |   15 ++---
 dapl/openib_ucm/dapl_ib_util.h  |   37 --
 2 files changed, 45 insertions(+), 7 deletions(-)

diff --git a/dapl/openib_common/dapl_ib_common.h 
b/dapl/openib_common/dapl_ib_common.h
index 180c876..7b3e5d0 100644
--- a/dapl/openib_common/dapl_ib_common.h
+++ b/dapl/openib_common/dapl_ib_common.h
@@ -43,11 +43,14 @@
 #define true  1
 #endif /*__cplusplus */
 
+#define DCM_AH_SPACE (0xC000) /* unicast LID range */
+
 /* Typedefs to map common DAPL provider types to IB verbs */
 struct dcm_ib_qp {
struct _ib_hca_transport *tp;
struct dapl_ep   *ep;
struct ibv_qp*qp;  /* local QP1 snd-rcv or rcv from PO 
*/
+   struct ibv_ah   **ah;  /* UD AH cache, LID index */
 #ifdef _OPENIB_MCM_
struct dcm_ib_cq *req_cq;  /* ref to req CQ for HST-MXS */
struct dcm_ib_cq *rcv_cq;  /* ref to rcv CQ for HST-MXS */
@@ -98,11 +101,13 @@ typedefstruct ibv_context  *ib_hca_handle_t;
 typedef ib_hca_handle_tdapl_ibal_ca_t;
 
 /* QP info to exchange, wire protocol version for these CM's */
-#define DCM_VER 7
+/* Version 8, 24-bit port space and rtns value */
+#define DCM_VER 8
+#define DCM_VER_XPS 8 /* extended port space, rtns */
 #define DCM_VER_MIN 6 /* backward compatibility limit */
 
 /* CM private data areas, same for all operations */
-#defineDCM_MAX_PDATA_SIZE  118
+#defineDCM_MAX_PDATA_SIZE  68
 
 /*
  * UCM DAPL IB/QP address (lid, qp_num, gid) mapping to
@@ -127,7 +132,6 @@ union dcm_addr {
} ib;
 };
 
-/* 256 bytes total; default max_inline_send, min IB MTU size */
 typedef struct _ib_cm_msg
 {
uint16_tver;
@@ -140,7 +144,10 @@ typedef struct _ib_cm_msg
uint32_ts_id;  /* src pid */
uint32_td_id;  /* dst pid */
uint8_t rd_in; /* atomic_rd_in */
-   uint8_t resv[5];
+   uint8_t sportx; /* extend to 24 bits */
+   uint8_t dportx; /* extend to 24 bits */
+   uint8_t rtns;   /* retransmissions */
+   uint8_t resv[2];
union dcm_addr  saddr;
union dcm_addr  daddr;
union dcm_addr  saddr_alt;
diff --git a/dapl/openib_ucm/dapl_ib_util.h b/dapl/openib_ucm/dapl_ib_util.h
index 8665491..ece9c88 100644
--- a/dapl/openib_ucm/dapl_ib_util.h
+++ b/dapl/openib_ucm/dapl_ib_util.h
@@ -33,15 +33,39 @@
 #include openib_osd.h
 #include dapl_ib_common.h
 
+#define UCM_SID_BITS 16  /* 64K */
+#define UCM_SID_SPACE (1  UCM_SID_BITS)
+#define UCM_SID_MASK (UCM_SID_SPACE-1)
+#define UCM_SID_ENTRY 8/* 8 bit entry */
+
+#define UCM_CHK_SID(a,p) (a[p/UCM_SID_ENTRY]  (1  (p%UCM_SID_ENTRY)))
+#define UCM_SET_SID(a,p) (a[p/UCM_SID_ENTRY] = (a[p/UCM_SID_ENTRY] |  (1  
(p%UCM_SID_ENTRY
+#define UCM_CLR_SID(a,p) (a[p/UCM_SID_ENTRY] = (a[p/UCM_SID_ENTRY]  ~(1  
(p%UCM_SID_ENTRY
+
+#define UCM_PORT_BITS 24   /* 16M total, wire protocol max */
+#define UCM_PORT_SPACE (1  UCM_SID_BITS)
+#define UCM_PORT_MASK (UCM_PORT_SPACE-1)
+#define UCM_PORT_NTOH(hi,lo) hi  0xff)  16) | (ntohs(lo)  0x))  
(UCM_PORT_MASK))
+#define UCM_PORT(p) (p  0x)
+#define UCM_PORTX(p) ((p  16)  0xff)
+
+#define UCM_ENTRY_BITS 11/* 2K entries, default */
+#define UCM_ARRAY_BITS 18/* 256K total ports, default */
+#define UCM_ENTRY_SIZE(ebits) (1  ebits)
+#define UCM_ARRAY_SIZE(abits, ebits) (1  (abits - ebits))
+#define UCM_ARRAY_IDX_MAX(abits) ((1  abits) - 1)
+#define UCM_ARRAY_IDX(idx, abits) (idx  abits)
+#define UCM_ENTRY_IDX(idx, abits) (idx  (abits - 1))
+
+
 /* DAPL CM objects MUST include list_entry, ref_count, event for EP linking */
 struct ib_cm_handle
 { 
struct dapl_llist_entry list_entry;
struct dapl_llist_entry local_entry;
-   DAPL_OS_WAIT_OBJECT d_event;
-   DAPL_OS_WAIT_OBJECT f_event;
DAPL_OS_LOCKlock;
DAPL_OS_TIMEVAL timer;
+   uint32_tcm_id;
 intref_count;
int state;
int retries;
@@ -49,7 +73,6 @@ struct ib_cm_handle
struct dapl_sp  *sp;
struct dapl_ep  *ep;
struct dapl_cr  *cr;
-   struct ibv_ah   *ah;
uint16_tp_size; /* accept p_data, for retries */
uint8_t p_data[DCM_MAX_PDATA_SIZE];

[PATCH 2/5] dapl ucm: check for AH caching when destroying via UD extension

2015-05-22 Thread Davis, Arlin R
From: Arlin Davis arlin.r.da...@intel.com

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_common/ib_extensions.c |   14 --
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dapl/openib_common/ib_extensions.c 
b/dapl/openib_common/ib_extensions.c
index fc03d9c..25db541 100644
--- a/dapl/openib_common/ib_extensions.c
+++ b/dapl/openib_common/ib_extensions.c
@@ -202,7 +202,6 @@ dapl_extensions(IN DAT_HANDLE dat_handle,
status = DAT_ERROR(DAT_INVALID_HANDLE,
   DAT_INVALID_HANDLE_EP);
else {
-   cm-ah = NULL; /* consumer will free AH */
status = dapls_ud_cm_free(ep, cm);
}
break;
@@ -210,6 +209,7 @@ dapl_extensions(IN DAT_HANDLE dat_handle,
case DAT_IB_UD_AH_FREE_OP:
{
DAT_IB_ADDR_HANDLE *dat_ah;
+   uint16_t lid;
int ret;
 
dapl_dbg_log(DAPL_DBG_TYPE_RTN,
@@ -222,8 +222,18 @@ dapl_extensions(IN DAT_HANDLE dat_handle,
status = DAT_ERROR(DAT_INVALID_HANDLE,
   DAT_INVALID_HANDLE_EP);
} else {
+   lid = ntohs(((union dcm_addr 
*)dat_ah-ia_addr)-ib.lid);
+
+   if (lid  DCM_AH_SPACE) {
+   status = DAT_ERROR(DAT_INVALID_PARAMETER,
+  DAT_INVALID_ARG2);
+   break;
+   }
+
errno = 0;
-   ret = ibv_destroy_ah(dat_ah-ah);
+   if (!((DAPL_EP *)ep)-qp_handle-ah[lid])
+   ret = ibv_destroy_ah(dat_ah-ah);
+
status = dapl_convert_errno(errno, destroy_ah);
}
break;
-- 
1.7.3

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


Re: [PATCH for-next 09/10] IB/mlx4: Add timestamp_mask and hca_core_clock to query_device

2015-05-22 Thread Or Gerlitz
On Wed, May 20, 2015 at 8:53 PM, Or Gerlitz gerlitz...@gmail.com wrote:
 On Wed, May 20, 2015 at 6:11 PM, Yann Droneaud ydrone...@opteya.com wrote:

 But this is whole purpose of the udata framework in uverbs, right? for
 each uverb command the vendor user-space library has a well defined
 channel to communicate directly with the low level vendor driver
 throughout the uverbs channels.

 Uverbs convey information between kernel and userspace drivers to
 implement verbs for userspace application. I don't think it's designed
 to allow vendor to add random extensions in the best way with regard to
 backward/forward compability.

 Disagree that this is random extension. The people that designed this
 stack 10y ago (Roland and Co.) looked very nicely forward and realized
 that not all the HW are the same nor can be put 101% under the same
 API with no way out, and hence they came up with udata.

 Please state how you see the role of the uverbs udata mechanism.

Guys, still waiting to hear why you think it's wrong here to use the
mechanism which was built from day-1 for the purpose of allowing the
user-space driver library to communicate with the kernel driver and
pass values in both directions.

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


Re: [PATCH for-next V1 00/11] Add completion timestamping support

2015-05-22 Thread Or Gerlitz
On Thu, May 21, 2015 at 5:56 PM, Or Gerlitz ogerl...@mellanox.com wrote:
[...]
 In mlx4, allowing the user to read the core clock efficiently involves mapping
 this area of the hardware to user-space (being done by using a mmap command)
 and reading the clock from the correct offset of the page.

 This offset is returned in the vendor's specific data from mlx4's kernel 
 driver
 to the mlx4's user-space driver. query_device is modified in order to support
 passing this vendor specific data. A user-space application could use a new
 verb in order to read the hardware's clock.

 Translating the hardware's clock into ms could be done by dividing this
 value by hca_core_clock (which is returned by the extended version of
 query_device uverb).

 A user-space application could get the current HW's clock by executing

 ibv_query_values_ex(struct ibv_context *context, uint32_t q_values,
 struct ibv_values_ex *values)

 The function gets a mask of the values to query and return their values.
 Vendors could either implement this as a uverb command or use their
 user-space driver to return those values directly from the HW (the mlx4 way).

 Changes from V0:
 (1) Pass ib_cq_init_attr instead of cqe and comp_vector.
 (2) Fix unneeded indentation.
 (3) Change flags to u32.
 (4) Add const to create_cq's ib_cq_init_attr argument in vendor 
 implementation.


Hi Doug,

I believe the V1 post addressed all the reviewer comments on V0 except
for one open issue.

What's still open is the debate on mlx4 using the uverbs builtin udata
mechanism to transfer the clock offset in the mmaped page to user
space. I have replied there and still waiting get a response.

Or.

 Matan Barak (11):
   IB/core: Change provider's API of create_cq to be extendible
   IB/core: Change ib_create_cq to use struct ib_cq_init_attr
   IB/core: Add CQ creation time-stamping flag
   IB/core: Extend ib_uverbs_create_cq
   IB/core: Add timestamp_mask and hca_core_clock to query_device
   IB/core: Pass hardware specific data in query_device
   IB/mlx4: Add mmap call to map the hardware clock
   IB/mlx4: Support extended create_cq and query_device uverbs
   IB/mlx4: Add support for timestamp in cq creation
   IB/mlx4: Add timestamp_mask and hca_core_clock to query_device
   IB/mlx4: Return hca core clock's offset in query_device vendor's data
--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] libibverbs init.c: conditionally emit warning if no userspace driver found

2015-05-22 Thread Jeff Squyres (jsquyres)
On May 20, 2015, at 1:11 PM, Doug Ledford dledf...@redhat.com wrote:
 
 The location of the upstream sources and tarballs would not change.
 Neither the git repo nor the tarball repo were like the kernel.  The
 upstream kernel.org git repo Roland had, had his name in the repo.  So
 it had to change.  But the libibverbs repo is in a generic location.
 There is no need to change it, only to change the permissions on the git
 repo to allow the new maintainer to push directly into it.  

Did that happen yet?

 Ditto with
 the upload/download space on openfabrics.org/downloads/verbs.

It looks like someone did part of this on flatbed -- you own the download 
directory but none of the files, and they are all 644.  So I took the liberty 
of chown'ing them all to you:


$ hostname; pwd; ls -la
flatbed.openfabrics.org
/var/www/html/downloads/verbs
total 6096
drwxr-xr-x.  2 dledford ofed   4096 May  7  2014 .
drwxrwxr-x. 55 apache   ofed   4096 Feb 13 07:31 ..
-rw-r--r--.  1 dledford ofed 347508 Mar 14  2006 libibverbs-1.0.2.tar.gz
-rw-r--r--.  1 dledford ofed 349439 May  2  2006 libibverbs-1.0.3.tar.gz
-rw-r--r--.  1 dledford ofed 360410 Oct 31  2006 libibverbs-1.0.4.tar.gz
-rw-r--r--.  1 dledford ofed 359902 Jun 18  2007 libibverbs-1.0.5.tar.gz
-rw-r--r--.  1 dledford ofed 321835 Aug 29  2005 libibverbs-1.0-rc1.tar.gz
-rw-r--r--.  1 dledford ofed 338537 Oct  2  2005 libibverbs-1.0-rc3.tar.gz
-rw-r--r--.  1 dledford ofed 341792 Oct 28  2005 libibverbs-1.0-rc4.tar.gz
-rw-r--r--.  1 dledford ofed 347699 Feb 17  2006 libibverbs-1.0-rc7.tar.gz
-rw-r--r--.  1 dledford ofed 384743 Jun 18  2007 libibverbs-1.1.1.tar.gz
-rw-r--r--.  1 dledford ofed 394618 Apr 18  2008 libibverbs-1.1.2.tar.gz
-rw-r--r--.  1 dledford ofed 359331 Oct 29  2009 libibverbs-1.1.3.tar.gz
-rw-r--r--.  1 dledford ofed 362475 Jun  3  2010 libibverbs-1.1.4.tar.gz
-rw-r--r--.  1 dledford ofed 364219 Jun 28  2011 libibverbs-1.1.5.tar.gz
-rw-r--r--.  1 dledford ofed 387794 Dec 21  2011 libibverbs-1.1.6.tar.gz
-rw-r--r--.  1 dledford ofed 391812 May 28  2013 libibverbs-1.1.7.tar.gz
-rw-r--r--   1 dledford ofed 406548 May  5  2014 libibverbs-1.1.8.tar.gz
-rw-r--r--.  1 dledford ofed 384656 Apr 24  2007 libibverbs-1.1.tar.gz
-rw-r--r--   1 dledford ofed   3957 May  7  2014 README.html
-rw-r--r--.  1 dledford ofed 60 Mar 12  2008 WEB_README
-

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

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


Re: [PATCH v3] libibverbs init.c: conditionally emit warning if no userspace driver found

2015-05-22 Thread Doug Ledford
On Fri, 2015-05-22 at 13:58 +, Jeff Squyres (jsquyres) wrote:
 On May 20, 2015, at 1:11 PM, Doug Ledford dledf...@redhat.com wrote:
  
  The location of the upstream sources and tarballs would not change.
  Neither the git repo nor the tarball repo were like the kernel.  The
  upstream kernel.org git repo Roland had, had his name in the repo.  So
  it had to change.  But the libibverbs repo is in a generic location.
  There is no need to change it, only to change the permissions on the git
  repo to allow the new maintainer to push directly into it.  
 
 Did that happen yet?

I don't think so.  I didn't file a specific ticket for it at k.o yet
(the k.o tickets take a while to process, so I didn't want to file it
until after the comment period here on list).

  Ditto with
  the upload/download space on openfabrics.org/downloads/verbs.
 
 It looks like someone did part of this on flatbed -- you own the download 
 directory but none of the files, and they are all 644.  So I took the liberty 
 of chown'ing them all to you:

Yeah, I did that one separately.  I had that done earlier, but getting
things done on flatbed is much faster and so could be reversed much
easier if need be ;-)  The reason I didn't own the files is that I
didn't really need to.  They are more or less set in stone and can't be
changed, so being owned by roland's account was fine.  It's fine this
way too.

 
 $ hostname; pwd; ls -la
 flatbed.openfabrics.org
 /var/www/html/downloads/verbs
 total 6096
 drwxr-xr-x.  2 dledford ofed   4096 May  7  2014 .
 drwxrwxr-x. 55 apache   ofed   4096 Feb 13 07:31 ..
 -rw-r--r--.  1 dledford ofed 347508 Mar 14  2006 libibverbs-1.0.2.tar.gz
 -rw-r--r--.  1 dledford ofed 349439 May  2  2006 libibverbs-1.0.3.tar.gz
 -rw-r--r--.  1 dledford ofed 360410 Oct 31  2006 libibverbs-1.0.4.tar.gz
 -rw-r--r--.  1 dledford ofed 359902 Jun 18  2007 libibverbs-1.0.5.tar.gz
 -rw-r--r--.  1 dledford ofed 321835 Aug 29  2005 libibverbs-1.0-rc1.tar.gz
 -rw-r--r--.  1 dledford ofed 338537 Oct  2  2005 libibverbs-1.0-rc3.tar.gz
 -rw-r--r--.  1 dledford ofed 341792 Oct 28  2005 libibverbs-1.0-rc4.tar.gz
 -rw-r--r--.  1 dledford ofed 347699 Feb 17  2006 libibverbs-1.0-rc7.tar.gz
 -rw-r--r--.  1 dledford ofed 384743 Jun 18  2007 libibverbs-1.1.1.tar.gz
 -rw-r--r--.  1 dledford ofed 394618 Apr 18  2008 libibverbs-1.1.2.tar.gz
 -rw-r--r--.  1 dledford ofed 359331 Oct 29  2009 libibverbs-1.1.3.tar.gz
 -rw-r--r--.  1 dledford ofed 362475 Jun  3  2010 libibverbs-1.1.4.tar.gz
 -rw-r--r--.  1 dledford ofed 364219 Jun 28  2011 libibverbs-1.1.5.tar.gz
 -rw-r--r--.  1 dledford ofed 387794 Dec 21  2011 libibverbs-1.1.6.tar.gz
 -rw-r--r--.  1 dledford ofed 391812 May 28  2013 libibverbs-1.1.7.tar.gz
 -rw-r--r--   1 dledford ofed 406548 May  5  2014 libibverbs-1.1.8.tar.gz
 -rw-r--r--.  1 dledford ofed 384656 Apr 24  2007 libibverbs-1.1.tar.gz
 -rw-r--r--   1 dledford ofed   3957 May  7  2014 README.html
 -rw-r--r--.  1 dledford ofed 60 Mar 12  2008 WEB_README
 -
 


-- 
Doug Ledford dledf...@redhat.com
  GPG KeyID: 0E572FDD



signature.asc
Description: This is a digitally signed message part


[PATCH 1/7] dapl mcm: HST-MXS mode, using RDMA_WRITE_WITH_IMM, fails with dtest -w

2015-05-22 Thread arlin . r . davis
From: Arlin Davis arlin.r.da...@intel.com

Host side incorrectly sets opcode to IBV_WR_RDMA_WRITE_WITH_IMM on every segment
instead of just the last segment.

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_mcm/proxy.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dapl/openib_mcm/proxy.c b/dapl/openib_mcm/proxy.c
index f4ec1f2..5163bca 100644
--- a/dapl/openib_mcm/proxy.c
+++ b/dapl/openib_mcm/proxy.c
@@ -111,6 +111,12 @@ int mcm_send_pi(struct dcm_ib_qp *m_qp,
m_wr_rx.w_idx = htonl(m_qp-wc_tl); /* snd back wc tail 
*/
m_wr_rx.wr.num_sge = htonl(wr-num_sge);
m_wr_rx.wr.opcode = htonl(wr-opcode);
+
+   /* RW_IMM: reset opcode on all segments except last */
+   if (!(wr_flags  M_SEND_LS) 
+(wr-opcode == IBV_WR_RDMA_WRITE_WITH_IMM))
+   m_wr_rx.wr.opcode = htonl(IBV_WR_RDMA_WRITE);
+
m_wr_rx.wr.send_flags = htonl(wr-send_flags);
m_wr_rx.wr.imm_data = htonl(wr-imm_data);
m_wr_rx.sg[0].addr = htonll(l_addr + l_off);
-- 
1.7.3

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


[PATCH 2/7] dapl mpxyd: use wr opcode instead of wc opcode to support logging on error cases

2015-05-22 Thread arlin . r . davis
From: Arlin Davis arlin.r.da...@intel.com

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/svc/mpxy_in.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dapl/svc/mpxy_in.c b/dapl/svc/mpxy_in.c
index 0ec6a1c..fb57304 100644
--- a/dapl/svc/mpxy_in.c
+++ b/dapl/svc/mpxy_in.c
@@ -720,7 +720,7 @@ void m_pi_req_event(struct mcm_qp *m_qp, struct mcm_wr_rx 
*wr_rx, struct ibv_wc
 {
mlog(4,  WR_rx[%d] %p %s complete po-addr=%p ln=%d, key=%x ctx=%Lx\n,
wr_rx-w_idx, wr_rx,
-   wc-opcode == IBV_WC_RDMA_READ ? RR:RW_IMM WC,
+   wr_rx-wr.opcode == IBV_WR_RDMA_READ ? RR:RW_IMM WC,
wr_rx-sg[0].addr, wr_rx-sg[0].length,
wr_rx-sg[0].lkey, wr_rx-context);
 
-- 
1.7.3

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


[PATCH 6/7] dapl scm: remove use of msg.resv field for process id logging

2015-05-22 Thread arlin . r . davis
From: Arlin Davis arlin.r.da...@intel.com

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_scm/cm.c |   18 --
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index 680d16b..ecc5418 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -42,7 +42,7 @@
  *
  *$Id: $
  *
- * Copyright (c) 2005 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2005-2015 Intel Corporation.  All rights reserved.
  *
  **/
 
@@ -737,13 +737,11 @@ static void dapli_socket_connect_rtu(dp_ib_cm_handle_t 
cm_ptr)
int err = dapl_socket_errno();
dapl_log(DAPL_DBG_TYPE_CM_WARN,
  CONN_REP_PENDING: sk %d ERR 0x%x, rcnt=%d, v=%d -
- %s PORT L-%x R-%x PID L-%x%x R-%x%x %d\n,
+ %s PORT L-%x R-%x %d\n,
 cm_ptr-socket, err, len, ntohs(cm_ptr-msg.ver),
 inet_ntoa(((struct sockaddr_in 
*)cm_ptr-addr)-sin_addr),
 ntohs(((struct sockaddr_in 
*)cm_ptr-msg.daddr.so)-sin_port),
 ntohs(((struct sockaddr_in *)cm_ptr-addr)-sin_port),
-cm_ptr-msg.resv[1],cm_ptr-msg.resv[0],
-cm_ptr-msg.resv[3],cm_ptr-msg.resv[2],
 cm_ptr-retry);
 
/* Retry; corner case where server tcp stack resets under load 
*/
@@ -1302,11 +1300,6 @@ dapli_socket_accept_usr(DAPL_EP * ep_ptr,
sl = sizeof(local.daddr.so);
getsockname(cm_ptr-socket, (struct sockaddr *)local.daddr.so, sl);
 
-#ifdef DAPL_DBG
-   /* DBG: Active PID [0], PASSIVE PID [2] */
-   *(uint16_t*)cm_ptr-msg.resv[2] = htons((uint16_t)dapl_os_getpid()); 
-   dapl_os_memcpy(local.resv, cm_ptr-msg.resv, 4); 
-#endif
cm_ptr-hca = ia_ptr-hca_ptr;
dapl_os_lock(cm_ptr-lock);
cm_ptr-state = DCM_ACCEPTED;
@@ -1973,7 +1966,7 @@ void dapls_print_cm_list(IN DAPL_IA *ia_ptr)
(DAPL_LLIST_ENTRY*)cr-local_entry);
 
printf(   CONN[%d]: sp %p ep %p sock %d %s %s %s %s %s %s 
-PORT L-%x R-%x PID L-%x%x R-%x%x\n,
+PORT L-%x R-%x \n,
i, cr-sp, cr-ep, cr-socket,
cr-msg.saddr.ib.qp_type == IBV_QPT_RC ? RC : UD,
dapl_cm_state_str(cr-state), 
dapl_cm_op_str(ntohs(cr-msg.op)),
@@ -1991,10 +1984,7 @@ void dapls_print_cm_list(IN DAPL_IA *ia_ptr)
 
ntohs(cr-msg.op) == DCM_REQ ? /* remote port */
ntohs(((struct sockaddr_in 
*)cr-addr)-sin_port) :
-   ntohs(((struct sockaddr_in 
*)cr-msg.daddr.so)-sin_port),
-
-   cr-sp ? cr-msg.resv[3] : cr-msg.resv[1], cr-sp ? 
cr-msg.resv[2] : cr-msg.resv[0],
-   cr-sp ? cr-msg.resv[1] : cr-msg.resv[3], cr-sp ? 
cr-msg.resv[0] : cr-msg.resv[2]);
+   ntohs(((struct sockaddr_in 
*)cr-msg.daddr.so)-sin_port) );
i++;
}
printf(\n);
-- 
1.7.3

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


[PATCH 3/7] dapl mcm: add HST side provider support for device without inline data capability

2015-05-22 Thread arlin . r . davis
From: Arlin Davis arlin.r.da...@intel.com

Add registered WR buffers for HST-MXS (proxy in) mode
when inline data is not supported by device. Use registered
memory for source WR buffer instead of stack when sending
RDMA write request to peer proxy-in service.

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_common/dapl_ib_common.h |4 +-
 dapl/openib_mcm/proxy.c |  112 +++
 2 files changed, 90 insertions(+), 26 deletions(-)

diff --git a/dapl/openib_common/dapl_ib_common.h 
b/dapl/openib_common/dapl_ib_common.h
index 7b3e5d0..1ac0c12 100644
--- a/dapl/openib_common/dapl_ib_common.h
+++ b/dapl/openib_common/dapl_ib_common.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2014 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2009-2015 Intel Corporation.  All rights reserved.
  *
  * This Software is licensed under one of the following licenses:
  *
@@ -67,6 +67,8 @@ struct dcm_ib_qp {
DAPL_OS_LOCK lock; /* Proxy WR and WC queues */
uint8_t  ep_map;   /* Peer EP mapping, MXS, MSS, HST */
uint32_t seg_sz;   /* Peer MXS Proxy-in segment size */
+   char *wr_buf_rx; /* mcm_wr_rx_t entries, devices 
without inline data  */
+   struct ibv_mr*wr_buf_rx_mr;
 #endif
 };
 
diff --git a/dapl/openib_mcm/proxy.c b/dapl/openib_mcm/proxy.c
index 5163bca..cb06161 100644
--- a/dapl/openib_mcm/proxy.c
+++ b/dapl/openib_mcm/proxy.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2014 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2009-2015 Intel Corporation.  All rights reserved.
  *
  * This Software is licensed under one of the following licenses:
  *
@@ -52,6 +52,7 @@ int mcm_send_pi(struct dcm_ib_qp *m_qp,
struct wrc_idata wrc;
uint32_t wr_flags, l_off, r_off = 0;
uint64_t l_addr;
+   struct mcm_wr_rx *wr_rx_ptr;
 
dapl_log(DAPL_DBG_TYPE_EP,
  mcm_send_pi: ep %p qpn %x ln %d sge %d sg %d
@@ -100,33 +101,44 @@ int mcm_send_pi(struct dcm_ib_qp *m_qp,
if (!(wr_idx % MCM_MP_SIG_RATE) || (wr_flags  
M_SEND_CN_SIG))
wr_flags |= M_SEND_MP_SIG;
 
+   if (!m_qp-wr_buf_rx) {
+   wr_rx_ptr = m_wr_rx;
+   sge.lkey = 0; /* inline doesn't need registered 
*/
+   } else {
+   wr_rx_ptr = (struct mcm_wr_rx *)
+   (m_qp-wr_buf_rx + (sizeof(struct 
mcm_wr_rx) * wr_idx));
+   sge.lkey = m_qp-wr_buf_rx_mr-lkey;
+   }
+   sge.addr = (uint64_t)(uintptr_t) wr_rx_ptr;
+   sge.length = (uint32_t) sizeof(struct mcm_wr_rx); /* 
160 byte WR */
+
dapl_log(DAPL_DBG_TYPE_EP,
  mcm_send_pi[%d]: seg_ln %d wr_idx %d, tl %d 
hd %d\n,
 i, seg_len, wr_idx, m_qp-wr_tl, m_qp-wr_hd);
 
/* build local m_wr_rx for remote PI */
-   memset((void*)m_wr_rx, 0, sizeof(struct mcm_wr_rx));
-   m_wr_rx.org_id = (uint64_t) htonll((uint64_t)wr-wr_id);
-   m_wr_rx.flags = htonl(wr_flags);
-   m_wr_rx.w_idx = htonl(m_qp-wc_tl); /* snd back wc tail 
*/
-   m_wr_rx.wr.num_sge = htonl(wr-num_sge);
-   m_wr_rx.wr.opcode = htonl(wr-opcode);
+   memset((void*)wr_rx_ptr, 0, sizeof(struct mcm_wr_rx));
+   wr_rx_ptr-org_id = (uint64_t) 
htonll((uint64_t)wr-wr_id);
+   wr_rx_ptr-flags = htonl(wr_flags);
+   wr_rx_ptr-w_idx = htonl(m_qp-wc_tl); /* snd back wc 
tail */
+   wr_rx_ptr-wr.num_sge = htonl(wr-num_sge);
+   wr_rx_ptr-wr.opcode = htonl(wr-opcode);
 
/* RW_IMM: reset opcode on all segments except last */
if (!(wr_flags  M_SEND_LS) 
 (wr-opcode == IBV_WR_RDMA_WRITE_WITH_IMM))
-   m_wr_rx.wr.opcode = htonl(IBV_WR_RDMA_WRITE);
+   wr_rx_ptr-wr.opcode = htonl(IBV_WR_RDMA_WRITE);
 
-   m_wr_rx.wr.send_flags = htonl(wr-send_flags);
-   m_wr_rx.wr.imm_data = htonl(wr-imm_data);
-   m_wr_rx.sg[0].addr = htonll(l_addr + l_off);
-   m_wr_rx.sg[0].lkey = htonl(wr-sg_list[i].lkey);
-   m_wr_rx.sg[0].length = htonl(seg_len);
+   wr_rx_ptr-wr.send_flags = htonl(wr-send_flags);
+   wr_rx_ptr-wr.imm_data = htonl(wr-imm_data);
+   wr_rx_ptr-sg[0].addr = htonll(l_addr + l_off);
+   wr_rx_ptr-sg[0].lkey = 

[PATCH 4/7] dapl mpxyd: memset ib_wr structure before post_send on WC and WR requests

2015-05-22 Thread arlin . r . davis
From: Arlin Davis arlin.r.da...@intel.com

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/svc/mpxy_in.c  |   10 ++
 dapl/svc/mpxy_out.c |   10 ++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/dapl/svc/mpxy_in.c b/dapl/svc/mpxy_in.c
index fb57304..cdfab35 100644
--- a/dapl/svc/mpxy_in.c
+++ b/dapl/svc/mpxy_in.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Intel Corporation. All rights reserved.
+ * Copyright (c) 2012-2015 Intel Corporation. All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -498,8 +498,7 @@ static int m_pi_send_wc(struct mcm_qp *m_qp, struct 
mcm_wr_rx *wr_rx, int status
 
if (m_qp-smd-md-indata) {
wc_rx_ptr = wc_rx;
-   wr.send_flags = IBV_SEND_INLINE;
-
+   sge.lkey = 0; /* inline doesn't need registered */
} else {
wc_rx_ptr = (struct mcm_wc_rx *)
(m_qp-wc_buf_rx + (sizeof(struct mcm_wc_rx) * 
wc_idx));
@@ -515,7 +514,7 @@ static int m_pi_send_wc(struct mcm_qp *m_qp, struct 
mcm_wr_rx *wr_rx, int status
return (m_pi_send_wc_local(m_qp, wr_rx, wc_idx));
 
/* send back a WC with error */
-   wr.next = 0;
+   memset(wr, 0, sizeof(struct ibv_send_wr));
wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM;
wr.imm_data = htonl(*(uint32_t *)wrc);
wr.num_sge = 1;
@@ -526,6 +525,9 @@ static int m_pi_send_wc(struct mcm_qp *m_qp, struct 
mcm_wr_rx *wr_rx, int status
 (m_qp-wrc_rem.wc_addr + (m_qp-wrc_rem.wc_sz 
* wc_idx)));
wr.sg_list = sge;
 
+   if (m_qp-smd-md-indata)
+   wr.send_flags |= IBV_SEND_INLINE;
+
mlog(4,  WC: RW_imm post: wr_id[%d] %Lx sglist %p sge %d op %d flgs %x
 idata %x WR_rem = raddr %p rkey %x ln %d op %x\n,
wr_rx-w_idx, wr.wr_id, wr.sg_list, wr.num_sge, wr.opcode,
diff --git a/dapl/svc/mpxy_out.c b/dapl/svc/mpxy_out.c
index 01647a7..8df32f7 100644
--- a/dapl/svc/mpxy_out.c
+++ b/dapl/svc/mpxy_out.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 Intel Corporation. All rights reserved.
+ * Copyright (c) 2012-2015 Intel Corporation. All rights reserved.
  *
  * This software is available to you under the OpenIB.org BSD license
  * below:
@@ -267,7 +267,6 @@ static int m_po_send_pi(struct mcm_qp *m_qp, struct mcm_wr 
*m_wr, int wr_idx)
 
if (m_qp-smd-md-indata) {
wr_rx_ptr = wr_rx;
-   wr.send_flags = IBV_SEND_INLINE;
sge.lkey = 0; /* inline doesn't need registered */
} else {
wr_rx_ptr = (struct mcm_wr_rx *)
@@ -285,12 +284,15 @@ static int m_po_send_pi(struct mcm_qp *m_qp, struct 
mcm_wr *m_wr, int wr_idx)
wrc.type = M_WR_TYPE;
wrc.flags = 0;
 
+   memset(wr, 0, sizeof(struct ibv_send_wr));
wr.wr_id = WRID_SET(m_wr, WRID_TX_RW_IMM);
-   wr.next = 0;
wr.sg_list = sge;
wr.num_sge = 1;
wr.opcode = IBV_WR_RDMA_WRITE_WITH_IMM;
 
+   if (m_qp-smd-md-indata)
+   wr.send_flags = IBV_SEND_INLINE;
+
if (m_wr-flags  M_SEND_MP_SIG) {
m_qp-post_sig_cnt++;  /* sig event pending */
 #if MCM_PROFILE /* MCM_QP_PO_PI_RW */
@@ -302,7 +304,7 @@ static int m_po_send_pi(struct mcm_qp *m_qp, struct mcm_wr 
*m_wr, int wr_idx)
 #endif
}
 
-   wr.send_flags |= m_wr-wr.send_flags | IBV_SEND_SIGNALED;
+   wr.send_flags |= IBV_SEND_SIGNALED;
wr.imm_data = htonl(*(uint32_t *)wrc);
wr.wr.rdma.rkey = m_qp-wrc_rem.wr_rkey;
wr.wr.rdma.remote_addr =
-- 
1.7.3

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


[PATCH 7/7] dapl dtest: add logging of provider private data size with -v

2015-05-22 Thread arlin . r . davis
From: Arlin Davis arlin.r.da...@intel.com

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 test/dtest/dtest.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/test/dtest/dtest.c b/test/dtest/dtest.c
index c9e58ec..bd30207 100755
--- a/test/dtest/dtest.c
+++ b/test/dtest/dtest.c
@@ -710,7 +710,7 @@ int main(int argc, char **argv)
 
/* Provider specific attributes */
for (i=0; ipr_attr.num_provider_specific_attr; i++) {
-   LOGPRINTF(%d Provider_attr[%d] %s = %s \n,
+   LOGPRINTF(%d provider_specific_attr[%d] %s = %s \n,
  getpid(), i,
  pr_attr.provider_specific_attr[i].name,
  pr_attr.provider_specific_attr[i].value);
@@ -718,6 +718,8 @@ int main(int argc, char **argv)
!strcmp(pr_attr.provider_specific_attr[i].value,TRUE)  
!write_only)
rdma_read = 1;
}
+   LOGPRINTF(%d provider_attr-max_private_data_size = %d\n,
+  getpid(), pr_attr.max_private_data_size);
 
/* Create Protection Zone */
start = get_time();
-- 
1.7.3

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


[PATCH 5/7] dapl cma: report correct CM req private data size on query

2015-05-22 Thread arlin . r . davis
From: Arlin Davis arlin.r.da...@intel.com

Signed-off-by: Arlin Davis arlin.r.da...@intel.com
---
 dapl/openib_cma/cm.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dapl/openib_cma/cm.c b/dapl/openib_cma/cm.c
index 79578e1..405db9a 100644
--- a/dapl/openib_cma/cm.c
+++ b/dapl/openib_cma/cm.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2005 Voltaire Inc.  All rights reserved.
- * Copyright (c) 2005-2007 Intel Corporation. All rights reserved.
+ * Copyright (c) 2005-2015 Intel Corporation. All rights reserved.
  * Copyright (c) 2004-2005, Mellanox Technologies, Inc. All rights reserved. 
  * Copyright (c) 2003 Topspin Corporation.  All rights reserved. 
  * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
@@ -1095,7 +1095,7 @@ dapls_ib_cm_remote_addr(IN DAT_HANDLE dat_handle, OUT 
DAT_SOCK_ADDR6 * raddr)
  */
 int dapls_ib_private_data_size(IN DAPL_HCA * hca_ptr)
 {
-   return RDMA_MAX_PRIVATE_DATA;
+   return IB_MAX_REQ_PDATA_SIZE;
 }
 
 void dapli_cma_event_cb(void)
-- 
1.7.3

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