Whamcloud - gitweb
* Resolved "unload problem" due to PTL_MD_LUSTRE_COMPLETION_SEMANTICS not being speci...
authorpjkirner <pjkirner>
Fri, 23 Sep 2005 15:00:56 +0000 (15:00 +0000)
committerpjkirner <pjkirner>
Fri, 23 Sep 2005 15:00:56 +0000 (15:00 +0000)
* 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

lnet/klnds/ptllnd/ptllnd.h
lnet/klnds/ptllnd/ptllnd_cb.c
lnet/klnds/ptllnd/ptllnd_peer.c
lnet/klnds/ptllnd/ptllnd_rx_buf.c

index 1b0b120..afac855 100755 (executable)
  */
 //#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
index 27109f1..9946667 100644 (file)
@@ -63,15 +63,15 @@ kptllnd_setup_md(
 
         /* 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;
index 79d8b1b..d20fe63 100644 (file)
@@ -664,16 +664,6 @@ kptllnd_peer_check_sends (
                    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);
 
@@ -749,6 +739,7 @@ kptllnd_peer_check_sends (
                 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;
index 5bb9b44..e59681d 100644 (file)
@@ -369,6 +369,7 @@ kptllnd_rx_buffer_post(
         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;
@@ -562,17 +563,7 @@ kptllnd_rx_buffer_callback(ptl_event_t *ev)
         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);