- check against LNET_PID_ANY in libcfs_id2str.
- clear all lazy portals before lnet_clear_peer_table.
ptllnd - Portals 3.3 / UNICOS/lc 1.5.x, 2.0.x
* bug fixes
ptllnd - Portals 3.3 / UNICOS/lc 1.5.x, 2.0.x
* bug fixes
+Severity : minor
+Details : lnet_clear_peer_table can wait forever if user forgets to
+ clear a lazy portal.
+
+Severity : minor
+Details : libcfs_id2str should check pid against LNET_PID_ANY.
+
Severity : major
Bugzilla : 10916
Description: added LNET self test
Severity : major
Bugzilla : 10916
Description: added LNET self test
{
char *str = libcfs_next_nidstring();
{
char *str = libcfs_next_nidstring();
+ if (id.pid == LNET_PID_ANY) {
+ snprintf(str, LNET_NIDSTR_SIZE,
+ "LNET_PID_ANY-%s", libcfs_nid2str(id.nid));
+ return str;
+ }
+
snprintf(str, LNET_NIDSTR_SIZE, "%s%u-%s",
((id.pid & LNET_PID_USERFLAG) != 0) ? "U" : "",
(id.pid & ~LNET_PID_USERFLAG), libcfs_nid2str(id.nid));
snprintf(str, LNET_NIDSTR_SIZE, "%s%u-%s",
((id.pid & LNET_PID_USERFLAG) != 0) ? "U" : "",
(id.pid & ~LNET_PID_USERFLAG), libcfs_nid2str(id.nid));
LASSERT (the_lnet.ln_nzombie_nis == 0);
for (idx = 0; idx < the_lnet.ln_nportals; idx++) {
LASSERT (the_lnet.ln_nzombie_nis == 0);
for (idx = 0; idx < the_lnet.ln_nportals; idx++) {
-
- LNetClearLazyPortal(idx);
LASSERT (list_empty(&the_lnet.ln_portals[idx].ptl_msgq));
while (!list_empty (&the_lnet.ln_portals[idx].ptl_ml)) {
LASSERT (list_empty(&the_lnet.ln_portals[idx].ptl_msgq));
while (!list_empty (&the_lnet.ln_portals[idx].ptl_ml)) {
+
+ /* Clear lazy portals and drop delayed messages which hold refs
+ * on their lnet_msg_t::msg_rxpeer */
+ for (i = 0; i < the_lnet.ln_nportals; i++)
+ LNetClearLazyPortal(i);
+
/* Clear the peer table and wait for all peers to go (they hold refs on
* their NIs) */
/* Clear the peer table and wait for all peers to go (they hold refs on
* their NIs) */
lnet_clear_peer_table();
LNET_LOCK();
lnet_clear_peer_table();
LNET_LOCK();
- CDEBUG(D_NET, "clearing portal %d lazy\n", portal);
+ if (the_lnet.ln_shutdown)
+ CWARN ("Active lazy portal %d on exit\n", portal);
+ else
+ CDEBUG (D_NET, "clearing portal %d lazy\n", portal);
/* grab all the blocked messages atomically */
list_add(&zombies, &ptl->ptl_msgq);
/* grab all the blocked messages atomically */
list_add(&zombies, &ptl->ptl_msgq);
case LNET_MATCHMD_NONE:
rc = lnet_eager_recv_locked(msg);
case LNET_MATCHMD_NONE:
rc = lnet_eager_recv_locked(msg);
+ if (rc == 0 && !the_lnet.ln_shutdown) {
list_add_tail(&msg->msg_list,
&the_lnet.ln_portals[index].ptl_msgq);
list_add_tail(&msg->msg_list,
&the_lnet.ln_portals[index].ptl_msgq);
LNET_UNLOCK();
return ENOENT; /* +ve: OK but no match */
LNET_UNLOCK();
return ENOENT; /* +ve: OK but no match */
msg = lnet_msg_alloc();
if (msg == NULL) {
CERROR("%s, src %s: Dropping %s (out of memory)\n",
msg = lnet_msg_alloc();
if (msg == NULL) {
CERROR("%s, src %s: Dropping %s (out of memory)\n",
- libcfs_nid2str(from_nid), libcfs_nid2str(src_nid)
- , lnet_msgtyp2str(type));
+ libcfs_nid2str(from_nid), libcfs_nid2str(src_nid),
+ lnet_msgtyp2str(type));
LIBCFS_FREE(lp, sizeof(*lp));
LNET_LOCK();
LIBCFS_FREE(lp, sizeof(*lp));
LNET_LOCK();
+ if (the_lnet.ln_shutdown) {
+ lnet_peer_decref_locked(lp2);
+ *lpp = NULL;
+ return -ESHUTDOWN;
+ }
+