Whamcloud - gitweb
LU-6142 socklnd: change UAPI typedefs to proper structure
[fs/lustre-release.git] / lnet / klnds / socklnd / socklnd.c
index 3c50e5c..f3a5dfd 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -1026,7 +1022,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route,
         ksock_peer_t      *peer = NULL;
         ksock_peer_t      *peer2;
         ksock_sched_t     *sched;
-        ksock_hello_msg_t *hello;
+       struct ksock_hello_msg *hello;
        int                cpt;
         ksock_tx_t        *tx;
         ksock_tx_t        *txtmp;
@@ -1063,7 +1059,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route,
        conn->ksnc_tx_carrier = NULL;
        atomic_set (&conn->ksnc_tx_nob, 0);
 
-       LIBCFS_ALLOC(hello, offsetof(ksock_hello_msg_t,
+       LIBCFS_ALLOC(hello, offsetof(struct ksock_hello_msg,
                                     kshm_ips[LNET_MAX_INTERFACES]));
         if (hello == NULL) {
                 rc = -ENOMEM;
@@ -1312,7 +1308,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route,
                 rc = ksocknal_send_hello(ni, conn, peerid.nid, hello);
         }
 
-        LIBCFS_FREE(hello, offsetof(ksock_hello_msg_t,
+       LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
                                     kshm_ips[LNET_MAX_INTERFACES]));
 
         /* setup the socket AFTER I've received hello (it disables
@@ -1388,10 +1384,10 @@ failed_2:
         ksocknal_txlist_done(ni, &zombies, 1);
         ksocknal_peer_decref(peer);
 
- failed_1:
-        if (hello != NULL)
-                LIBCFS_FREE(hello, offsetof(ksock_hello_msg_t,
-                                            kshm_ips[LNET_MAX_INTERFACES]));
+failed_1:
+       if (hello != NULL)
+               LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
+                                           kshm_ips[LNET_MAX_INTERFACES]));
 
        LIBCFS_FREE(conn, sizeof(*conn));
 
@@ -1439,11 +1435,6 @@ ksocknal_close_conn_locked (ksock_conn_t *conn, int error)
 
                conn->ksnc_route = NULL;
 
-#if 0          /* irrelevent with only eager routes */
-               /* make route least favourite */
-               list_del(&route->ksnr_list);
-               list_add_tail(&route->ksnr_list, &peer->ksnp_routes);
-#endif
                ksocknal_route_decref(route);   /* drop conn's ref on route */
        }
 
@@ -2474,7 +2465,7 @@ ksocknal_base_startup(void)
 
                snprintf(name, sizeof(name), "socknal_cd%02d", i);
                rc = ksocknal_thread_start(ksocknal_connd,
-                                          (void *)((ulong_ptr_t)i), name);
+                                          (void *)((uintptr_t)i), name);
                if (rc != 0) {
                        spin_lock_bh(&ksocknal_data.ksnd_connd_lock);
                        ksocknal_data.ksnd_connd_starting--;
@@ -2524,7 +2515,7 @@ ksocknal_debug_peerhash (lnet_ni_t *ni)
                 ksock_conn_t  *conn;
 
                CWARN ("Active peer on shutdown: %s, ref %d, scnt %d, "
-                      "closing %d, accepting %d, err %d, zcookie "LPU64", "
+                      "closing %d, accepting %d, err %d, zcookie %llu, "
                       "txq %d, zc_req %d\n", libcfs_id2str(peer->ksnp_id),
                       atomic_read(&peer->ksnp_refcount),
                       peer->ksnp_sharecount, peer->ksnp_closing,
@@ -2866,7 +2857,6 @@ ksocknal_startup (lnet_ni_t *ni)
 static void __exit ksocklnd_exit(void)
 {
        lnet_unregister_lnd(&the_ksocklnd);
-       ksocknal_tunables_fini();
 }
 
 static int __init ksocklnd_init(void)