-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
unsigned int ptl_options;
} lnet_portal_t;
+#define LNET_LH_HASH_BITS 12
+#define LNET_LH_HASH_SIZE (1ULL << LNET_LH_HASH_BITS)
+#define LNET_LH_HASH_MASK (LNET_LH_HASH_SIZE - 1)
+
+/* resource container (ME, MD, EQ) */
+struct lnet_res_container {
+ unsigned int rec_type; /* container type */
+ __u64 rec_lh_cookie; /* cookie generator */
+ cfs_list_t rec_active; /* active resource list */
+ cfs_list_t *rec_lh_hash; /* handle hash */
+#ifdef LNET_USE_LIB_FREELIST
+ lnet_freelist_t rec_freelist; /* freelist for resources */
+#endif
+};
+
/* Router Checker states */
#define LNET_RC_STATE_SHUTDOWN 0 /* not started */
#define LNET_RC_STATE_RUNNING 1 /* started up OK */
#ifdef __KERNEL__
cfs_spinlock_t ln_lock;
cfs_waitq_t ln_waitq;
- cfs_semaphore_t ln_api_mutex;
- cfs_semaphore_t ln_lnd_mutex;
+ cfs_mutex_t ln_api_mutex;
+ cfs_mutex_t ln_lnd_mutex;
#else
# ifndef HAVE_LIBPTHREAD
int ln_lock;
pthread_mutex_t ln_lnd_mutex;
# endif
#endif
+ /* ME container */
+ struct lnet_res_container ln_me_container;
+ /* MD container */
+ struct lnet_res_container ln_md_container;
+ /* Event Queue container */
+ struct lnet_res_container ln_eq_container;
/* Stuff initialised at LNetNIInit() */
int ln_routing; /* am I a router? */
lnet_rtrbufpool_t ln_rtrpools[LNET_NRBPOOLS]; /* router buffer pools */
- int ln_lh_hash_size; /* size of lib handle hash table */
- cfs_list_t *ln_lh_hash_table; /* all extant lib handles, this interface */
- __u64 ln_next_object_cookie; /* cookie generator */
__u64 ln_interface_cookie; /* uniquely identifies this ni in this epoch */
char *ln_network_tokens; /* space for network names */
lnet_ping_info_t *ln_ping_info;
#ifdef __KERNEL__
- cfs_semaphore_t ln_rc_signal; /* serialise startup/shutdown */
+ cfs_semaphore_t ln_rc_signal; /* serialise startup/shutdown */
#endif
- int ln_rc_state; /* router checker startup/shutdown state */
- lnet_handle_eq_t ln_rc_eqh; /* router checker's event queue */
- lnet_handle_md_t ln_rc_mdh;
- cfs_list_t ln_zombie_rcd;
-
+ int ln_rc_state; /* router checker startup/shutdown state */
+ lnet_handle_eq_t ln_rc_eqh; /* router checker's event queue */
+ lnet_handle_md_t ln_rc_mdh;
+ cfs_list_t ln_zombie_rcd;
#ifdef LNET_USE_LIB_FREELIST
- lnet_freelist_t ln_free_mes;
lnet_freelist_t ln_free_msgs;
- lnet_freelist_t ln_free_mds;
- lnet_freelist_t ln_free_eqs;
#endif
cfs_list_t ln_active_msgs;
- cfs_list_t ln_active_mds;
- cfs_list_t ln_active_eqs;
lnet_counters_t ln_counters;