Whamcloud - gitweb
* better ranal error message on FMA CQ overflow
authoreeb <eeb>
Mon, 11 Jul 2005 16:43:47 +0000 (16:43 +0000)
committereeb <eeb>
Mon, 11 Jul 2005 16:43:47 +0000 (16:43 +0000)
*   fixed socknal modparam that should have been RO under /proc or /sys

*   skip the loopback interface in ptl_set_ip_niaddr() when no interfaces have
    been specified.

*   #if 0 out the 'allow_destination_aliases' portals module param.  It's too
    hard to describe to punters.

*   change the meaning of the 'implicit_loopback' portals module parameter to
    be more precisely just that.

*   don't fail when adding a duplicate route; just ignore it.

lnet/klnds/ralnd/ralnd_cb.c
lnet/klnds/socklnd/socklnd_modparams.c
lnet/lnet/config.c
lnet/lnet/lib-move.c
lnet/lnet/router.c

index 605cecb..f7983f6 100644 (file)
@@ -1380,7 +1380,8 @@ kranal_check_fma_cq (kra_device_t *dev)
                 }
 
                 /* FMA CQ has overflowed: check ALL conns */
-                CWARN("Scheduling ALL conns on device %d\n", dev->rad_id);
+                CWARN("FMA CQ overflow: scheduling ALL conns on device %d\n", 
+                      dev->rad_id);
 
                 for (i = 0; i < kranal_data.kra_conn_hash_size; i++) {
 
index 55ad16f..e6f21fd 100644 (file)
@@ -25,7 +25,7 @@ CFS_MODULE_PARM(timeout, "i", int, 0644,
                 "dead socket timeout (seconds)");
 
 static int nconnds = SOCKNAL_NCONND;
-CFS_MODULE_PARM(nconnds, "i", int, 0644,
+CFS_MODULE_PARM(nconnds, "i", int, 0444,
                 "# connection daemons");
 
 static int min_reconnectms = SOCKNAL_MIN_RECONNECTMS;
index b7a3072..08f8c30 100644 (file)
@@ -733,6 +733,9 @@ ptl_set_ip_niaddr (ptl_ni_t *ni)
         }
 
         for (i = 0; i < n; i++) {
+                if (!strcmp(names[i], "lo")) /* skip the loopback IF */
+                        continue;
+                
                 rc = libcfs_ipif_query(names[i], &up, &ip, &netmask);
                 
                 if (rc != 0) {
index 74315ad..50012b2 100644 (file)
 
 #include <portals/lib-p30.h>
 
+#if 1
+/* Enforce the rule that the target NID must be that of the receiving NI */
+const int allow_destination_aliases = 0;
+#else
+/* Allow NID aliasing experiments */
 static int allow_destination_aliases = 0;
 CFS_MODULE_PARM(allow_destination_aliases, "i", int, 0644,
                 "Boolean: don't require strict destination NIDs");
+#endif
 
 static int implicit_loopback = 1;
 CFS_MODULE_PARM(implicit_loopback, "i", int, 0644,
-                "Boolean: allow destination aliases when sending to yourself");
+                "Boolean: substitute 0@lo when sending to any local NID");
 
 /* forward ref */
 static void ptl_commit_md (ptl_libmd_t *md, ptl_msg_t *msg);
@@ -600,9 +606,7 @@ ptl_send (ptl_ni_t *ni, void *private, ptl_msg_t *msg,
         if (ni->ni_nal->nal_type != LONAL) {
                 if (gw_nid != ni->ni_nid) {         /* it's not for me */
                         routing = gw_nid != target.nid; /* will gateway have to forward? */
-                } else if (allow_destination_aliases || /* force lonal? */
-                           implicit_loopback) {
-
+                } else if (implicit_loopback) {    /* force lonal? */
                         PTL_LOCK(flags);
                         ptl_ni_decref_locked(ni);
                         ni = ptl_loni;
@@ -613,14 +617,7 @@ ptl_send (ptl_ni_t *ni, void *private, ptl_msg_t *msg,
                         if (ni == NULL)         /* shutdown in progress */
                                 return PTL_FAIL;
 
-                        if (implicit_loopback)
-                                target.nid = ni->ni_nid;
-
-                } else {                        /* barf */
-                        ptl_ni_decref(ni);
-                        CERROR("Attempt to send to self via %s, not LONAL\n",
-                               libcfs_nid2str(target.nid));
-                        return PTL_FAIL;
+                        target.nid = ni->ni_nid;
                 }
         }
         
index 62a7fe4..b84ecd8 100644 (file)
@@ -632,7 +632,7 @@ kpr_add_route (__u32 net, ptl_nid_t gateway_nid)
                 }
         }
         
-        if (!dup) {
+        if (!dup) { /* Adding a new network? */
                 list_add_tail(&ne->kpne_list, &kpr_state.kpr_nets);
         } else {
                 dup = 0;
@@ -645,12 +645,12 @@ kpr_add_route (__u32 net, ptl_nid_t gateway_nid)
                                 break;
                 }
                 
-                if (dup) {
+                if (dup) { /* Ignore duplicate route entry */
                         write_unlock_irqrestore(&kpr_state.kpr_rwlock, flags);
 
                         PORTAL_FREE(re, sizeof(*re));
                         PORTAL_FREE(ge, sizeof(*ge));
-                        return -EINVAL;
+                        return 0;
                 }
         }