Whamcloud - gitweb
LU-7734 lnet: proper cpt locking
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index 6a213b3..8d318cd 100644 (file)
@@ -1444,6 +1444,9 @@ lnet_startup_lndni(struct lnet_ni *ni, struct lnet_lnd_tunables *tun)
                tq->tq_credits = lnet_ni_tq_credits(ni);
        }
 
+       atomic_set(&ni->ni_tx_credits,
+                  lnet_ni_tq_credits(ni) * ni->ni_ncpts);
+
        CDEBUG(D_LNI, "Added LNI %s [%d/%d/%d/%d]\n",
                libcfs_nid2str(ni->ni_nid),
                ni->ni_net->net_tunables.lct_peer_tx_credits,