Whamcloud - gitweb
- back out peer_buffer_credits changes, as requested by rread.
[fs/lustre-release.git] / lnet / lnet / peer.c
index d39507b..c8ad591 100644 (file)
@@ -221,10 +221,12 @@ lnet_nid2peer_locked(lnet_peer_t **lpp, lnet_nid_t nid)
                 return the_lnet.ln_shutdown ? -ESHUTDOWN : -EHOSTUNREACH;
         }
 
-        lp->lp_txcredits    =
-        lp->lp_mintxcredits = lp->lp_ni->ni_peertxcredits;
-        lp->lp_rtrcredits    =
-        lp->lp_minrtrcredits = lnet_peer_buffer_credits(lp->lp_ni);
+       lp->lp_txcredits = 
+                lp->lp_mintxcredits = lp->lp_ni->ni_peertxcredits;
+
+        /* As a first approximation; allow this peer the same number of router
+         * buffers as it is allowed outstanding sends */
+        lp->lp_rtrcredits = lp->lp_minrtrcredits = lp->lp_txcredits;
 
         LASSERT (!the_lnet.ln_shutdown);
         /* can't add peers after shutdown starts */