Whamcloud - gitweb
Starting with 1.6.0 our kernel package will now actually be
[fs/lustre-release.git] / lnet / router / router.h
index c5cc1d3..44f307a 100644 (file)
@@ -1,10 +1,7 @@
 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
  * vim:expandtab:shiftwidth=8:tabstop=8:
  *
- * Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Portals
- *   http://sourceforge.net/projects/sandiaportals/
+ *   This file is part of Lustre, http://www.lustre.org
  *
  *   Portals is free software; you can redistribute it and/or
  *   modify it under the terms of version 2 of the GNU General Public
@@ -23,7 +20,9 @@
 
 #ifndef _KPTLROUTER_H
 #define _KPTLROUTER_H
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 
 #include <linux/config.h>
 #include <linux/module.h>
@@ -36,7 +35,8 @@
 
 #define DEBUG_SUBSYSTEM S_PTLROUTER
 
-#include <linux/kp30.h>
+#include <libcfs/kp30.h>
+#include <portals/kpr.h>
 #include <portals/p30.h>
 #include <portals/lib-p30.h>
 
@@ -69,7 +69,7 @@ typedef struct
 
 typedef struct
 {
-        struct tq_struct        kpru_tq;
+        work_struct_t           kpru_tq;
         int                     kpru_nal_id;
         ptl_nid_t               kpru_nid;
         int                     kpru_alive;
@@ -90,18 +90,13 @@ extern void kpr_deregister_nal (void *arg);
 extern void kpr_proc_init (void);
 extern void kpr_proc_fini (void);
 
-extern int kpr_add_route (int gateway_nal, ptl_nid_t gateway_nid, 
-                          ptl_nid_t lo_nid, ptl_nid_t hi_nid);
-extern int kpr_del_route (int gw_nal, ptl_nid_t gw_nid,
-                          ptl_nid_t lo, ptl_nid_t hi);
-extern int kpr_get_route (int idx, int *gateway_nal, ptl_nid_t *gateway_nid, 
-                          ptl_nid_t *lo_nid, ptl_nid_t *hi_nid, int *alive);
-extern int kpr_sys_notify (int gw_nalid, ptl_nid_t gw_nid,
-                           int alive, time_t when);
-
+extern unsigned int       kpr_routes_generation;
 extern unsigned long long kpr_fwd_bytes;
 extern unsigned long      kpr_fwd_packets;
 extern unsigned long      kpr_fwd_errors;
 extern atomic_t           kpr_queue_depth;
 
+extern struct list_head   kpr_routes;
+extern rwlock_t           kpr_rwlock;
+
 #endif /* _KPLROUTER_H */