* Removed TESTING_WITH_LOOPBACK (early unit testing code will never have any value in the future)
* Added more comments on the diffrences between Portals implemenations in the headers
*/
//#define PJK_DEBUGGING
-/*
- * This was used for some single node testing
- * which has some hacks to allow packets that come
- * back on the lookback LND to have their address
- * fixed up, so that match MD's properly. And you
- * can setup a connection with your self and transfer data.
- * WARNING: This was for UNIT testing purposes only.
- */
-//#define TESTING_WITH_LOOPBACK
-
#ifdef _USING_LUSTRE_PORTALS_
+
+/* NIDs are 64-bits on Lustre Portals */
#define FMT_NID LPX64
+
+/* When using Lustre Portals Lustre completion semantics are imlicit*/
+#define PTL_MD_LUSTRE_COMPLETION_SEMANTICS 0
+
#else /* _USING_CRAY_PORTALS_ */
+
+/* NIDs are integers on Lustre Portals */
#define FMT_NID "%x"
-#define ptl_err_t ptl_ni_fail_t
+
+/* When using Cray Portals this is defined in the Cray Portals Header*/
+/*#define PTL_MD_LUSTRE_COMPLETION_SEMANTICS */
+
+/* Can compare handles directly on Cray Portals */
#define PtlHandleIsEqual(a,b) (a == b)
+
+/* Diffrent error types on Cray Portals*/
+#define ptl_err_t ptl_ni_fail_t
+
#endif
#if CONFIG_SMP
/* setup the options*/
md->options = op;
+ md->options |= PTL_MD_LUSTRE_COMPLETION_SEMANTICS;
+ /* we don't care about the start event */
+ md->options |= PTL_MD_EVENT_START_DISABLE;
/* If this is a PUT then we need to disable ACK */
/* we don't need an ACK, we'll get a callback when it is complete */
if( op == PTL_MD_OP_PUT)
md->options |= PTL_MD_ACK_DISABLE;
- /* we don't care about the start event */
- md->options |= PTL_MD_EVENT_START_DISABLE;
-
/* point back to this TX descriptor so we know what to complete
* when the event is triggered */
md->user_ptr = tx;
tx->tx_msg->ptlm_type == PLTLND_MSG_TYPE_PUT){
tempiov_t tempiov;
-#ifdef TESTING_WITH_LOOPBACK
- /*
- * When doing loopback testing the data comes back
- * on the given loopback nid
- */
- ptl_process_id_t target;
- target.nid = PTL_NID_ANY;
- target.pid = PTLLND_PID;
-#endif
-
PJK_UT_MSG_DATA("matchibts=" LPX64 "\n",
tx->tx_msg->ptlm_u.req.kptlrm_matchbits);
md.length = tx->tx_msg->ptlm_nob;
md.threshold = 1;
md.options = PTL_MD_OP_PUT;
+ md.options |= PTL_MD_LUSTRE_COMPLETION_SEMANTICS;
md.options |= PTL_MD_EVENT_START_DISABLE;
/* we don't need an ACK, we'll get a callback when the get is complete */
md.options |= PTL_MD_ACK_DISABLE;
md.length = PAGE_SIZE * *kptllnd_tunables.kptl_rxb_npages;
md.threshold = PTL_MD_THRESH_INF;
md.options = PTL_MD_OP_PUT;
+ md.options |= PTL_MD_LUSTRE_COMPLETION_SEMANTICS;
md.options |= PTL_MD_EVENT_START_DISABLE;
md.options |= PTL_MD_MAX_SIZE;
md.user_ptr = rxb;
rx->rx_msg = rxb->rxb_buffer + ev->offset;
rx->rx_rxb = rxb;
rx->rx_nob = nob;
-#ifdef TESTING_WITH_LOOPBACK
- /*
- * When testing with loopback on socknal
- * packets are received on loopback NAL so
- * until I figure out how to do that properly
- * just make it look like it came from this NID
- */
- rx->rx_initiator = rxb->rxb_po.po_kptllnd_data->kptl_portals_id;
-#else
rx->rx_initiator = ev->initiator;
-#endif
kptllnd_rx_schedule(rx);