1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * This file is part of Lustre, http://www.lustre.org
6 * Portals is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
10 * Portals is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Portals; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 # define EXPORT_SYMTAB
27 #include <linux/config.h>
28 #include <linux/module.h>
29 #include <linux/kernel.h>
31 #include <linux/string.h>
32 #include <linux/errno.h>
33 #include <linux/proc_fs.h>
34 #include <linux/init.h>
36 #define DEBUG_SUBSYSTEM S_PTLROUTER
38 #include <libcfs/kp30.h>
39 #include <portals/kpr.h>
40 #include <portals/p30.h>
41 #include <portals/lib-p30.h>
45 struct list_head kpne_list;
46 kpr_nal_interface_t kpne_interface;
47 atomic_t kpne_refcount;
53 struct list_head kpge_list;
55 time_t kpge_timestamp;
60 } kpr_gateway_entry_t;
64 struct list_head kpre_list;
65 kpr_gateway_entry_t *kpre_gateway;
66 ptl_nid_t kpre_lo_nid;
67 ptl_nid_t kpre_hi_nid;
72 work_struct_t kpru_tq;
79 extern int kpr_register_nal (kpr_nal_interface_t *nalif, void **argp);
80 extern int kpr_lookup_target (void *arg, ptl_nid_t target_nid, int nob,
81 ptl_nid_t *gateway_nidp);
82 extern kpr_nal_entry_t *kpr_find_nal_entry_locked (int nal_id);
83 extern void kpr_forward_packet (void *arg, kpr_fwd_desc_t *fwd);
84 extern void kpr_complete_packet (void *arg, kpr_fwd_desc_t *fwd, int error);
85 extern void kpr_nal_notify (void *arg, ptl_nid_t peer,
86 int alive, time_t when);
87 extern void kpr_shutdown_nal (void *arg);
88 extern void kpr_deregister_nal (void *arg);
90 extern void kpr_proc_init (void);
91 extern void kpr_proc_fini (void);
93 extern unsigned int kpr_routes_generation;
94 extern unsigned long long kpr_fwd_bytes;
95 extern unsigned long kpr_fwd_packets;
96 extern unsigned long kpr_fwd_errors;
97 extern atomic_t kpr_queue_depth;
99 extern struct list_head kpr_routes;
100 extern rwlock_t kpr_rwlock;
102 #endif /* _KPLROUTER_H */