int *kra_max_immediate; /* immediate payload breakpoint */
#if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
- cfs_sysctl_table_header_t *kra_sysctl; /* sysctl interface */
+ struct ctl_table_header *kra_sysctl; /* sysctl interface */
#endif
} kra_tunables_t;
typedef struct
{
- RAP_PVOID rad_handle; /* device handle */
- RAP_PVOID rad_fma_cqh; /* FMA completion queue handle */
- RAP_PVOID rad_rdma_cqh; /* rdma completion queue handle */
- int rad_id; /* device id */
- int rad_idx; /* index in kra_devices */
- int rad_ready; /* set by device callback */
- cfs_list_t rad_ready_conns;/* connections ready to tx/rx */
- cfs_list_t rad_new_conns; /* new connections to complete */
- cfs_waitq_t rad_waitq; /* scheduler waits here */
- spinlock_t rad_lock; /* serialise */
- void *rad_scheduler; /* scheduling thread */
- unsigned int rad_nphysmap; /* # phys mappings */
- unsigned int rad_nppphysmap;/* # phys pages mapped */
- unsigned int rad_nvirtmap; /* # virt mappings */
- unsigned long rad_nobvirtmap;/* # virt bytes mapped */
+ RAP_PVOID rad_handle; /* device handle */
+ RAP_PVOID rad_fma_cqh; /* FMA completion queue handle */
+ RAP_PVOID rad_rdma_cqh; /* rdma completion queue handle */
+ int rad_id; /* device id */
+ int rad_idx; /* index in kra_devices */
+ int rad_ready; /* set by device callback */
+ cfs_list_t rad_ready_conns;/* connections ready to tx/rx */
+ cfs_list_t rad_new_conns; /* new connections to complete */
+ wait_queue_head_t rad_waitq; /* scheduler waits here */
+ spinlock_t rad_lock; /* serialise */
+ void *rad_scheduler; /* scheduling thread */
+ unsigned int rad_nphysmap; /* # phys mappings */
+ unsigned int rad_nppphysmap;/* # phys pages mapped */
+ unsigned int rad_nvirtmap; /* # virt mappings */
+ unsigned long rad_nobvirtmap;/* # virt bytes mapped */
} kra_device_t;
typedef struct
{
- int kra_init; /* initialisation state */
- int kra_shutdown; /* shut down? */
- cfs_atomic_t kra_nthreads; /* # live threads */
- lnet_ni_t *kra_ni; /* _the_ nal instance */
+ int kra_init; /* initialisation state */
+ int kra_shutdown; /* shut down? */
+ cfs_atomic_t kra_nthreads; /* # live threads */
+ lnet_ni_t *kra_ni; /* _the_ nal instance */
- kra_device_t kra_devices[RANAL_MAXDEVS]; /* device/ptag/cq */
- int kra_ndevs; /* # devices */
+ kra_device_t kra_devices[RANAL_MAXDEVS]; /* device/ptag/cq */
+ int kra_ndevs; /* # devices */
rwlock_t kra_global_lock; /* stabilize peer/conn ops */
- cfs_list_t *kra_peers; /* hash table of all my known peers */
- int kra_peer_hash_size; /* size of kra_peers */
- cfs_atomic_t kra_npeers; /* # peers extant */
- int kra_nonewpeers; /* prevent new peers */
+ cfs_list_t *kra_peers; /* hash table of all my known peers */
+ int kra_peer_hash_size; /* size of kra_peers */
+ cfs_atomic_t kra_npeers; /* # peers extant */
+ int kra_nonewpeers; /* prevent new peers */
- cfs_list_t *kra_conns; /* conns hashed by cqid */
- int kra_conn_hash_size; /* size of kra_conns */
- __u64 kra_peerstamp; /* when I started up */
- __u64 kra_connstamp; /* conn stamp generator */
- int kra_next_cqid; /* cqid generator */
- cfs_atomic_t kra_nconns; /* # connections extant */
+ cfs_list_t *kra_conns; /* conns hashed by cqid */
+ int kra_conn_hash_size; /* size of kra_conns */
+ __u64 kra_peerstamp; /* when I started up */
+ __u64 kra_connstamp; /* conn stamp generator */
+ int kra_next_cqid; /* cqid generator */
+ cfs_atomic_t kra_nconns; /* # connections extant */
- long kra_new_min_timeout; /* minimum timeout on any new conn */
- cfs_waitq_t kra_reaper_waitq; /* reaper sleeps here */
+ long kra_new_min_timeout; /* minimum timeout on any new conn */
+ wait_queue_head_t kra_reaper_waitq; /* reaper sleeps here */
spinlock_t kra_reaper_lock; /* serialise */
- cfs_list_t kra_connd_peers; /* peers waiting for a connection */
- cfs_list_t kra_connd_acceptq; /* accepted sockets to handshake */
- cfs_waitq_t kra_connd_waitq; /* connection daemons sleep here */
+ cfs_list_t kra_connd_peers; /* peers waiting for a connection */
+ cfs_list_t kra_connd_acceptq; /* accepted sockets to handshake */
+ wait_queue_head_t kra_connd_waitq; /* connection daemons sleep here */
spinlock_t kra_connd_lock; /* serialise */
- cfs_list_t kra_idle_txs; /* idle tx descriptors */
- __u64 kra_next_tx_cookie; /* RDMA completion cookie */
+ cfs_list_t kra_idle_txs; /* idle tx descriptors */
+ __u64 kra_next_tx_cookie; /* RDMA completion cookie */
spinlock_t kra_tx_lock; /* serialise */
} kra_data_t;
#define RANAL_CONN_CLOSING 1
#define RANAL_CONN_CLOSED 2
-typedef struct kra_peer
-{
- cfs_list_t rap_list; /* stash on global peer list */
- cfs_list_t rap_connd_list; /* schedule on kra_connd_peers */
- cfs_list_t rap_conns; /* all active connections */
- cfs_list_t rap_tx_queue; /* msgs waiting for a conn */
- lnet_nid_t rap_nid; /* who's on the other end(s) */
- __u32 rap_ip; /* IP address of peer */
- int rap_port; /* port on which peer listens */
- cfs_atomic_t rap_refcount; /* # users */
- int rap_persistence; /* "known" peer refs */
- int rap_connecting; /* connection forming */
- unsigned long rap_reconnect_time; /* CURRENT_SECONDS when reconnect OK */
- unsigned long rap_reconnect_interval; /* exponential backoff */
+typedef struct kra_peer {
+ cfs_list_t rap_list; /* stash on global peer list */
+ cfs_list_t rap_connd_list; /* schedule on kra_connd_peers */
+ cfs_list_t rap_conns; /* all active connections */
+ cfs_list_t rap_tx_queue; /* msgs waiting for a conn */
+ lnet_nid_t rap_nid; /* who's on the other end(s) */
+ __u32 rap_ip; /* IP address of peer */
+ int rap_port; /* port on which peer listens */
+ cfs_atomic_t rap_refcount; /* # users */
+ int rap_persistence; /* "known" peer refs */
+ int rap_connecting; /* connection forming */
+ unsigned long rap_reconnect_time; /* get_seconds() when reconnect OK */
+ unsigned long rap_reconnect_interval; /* exponential backoff */
} kra_peer_t;
extern kra_data_t kranal_data;
int kranal_accept(lnet_ni_t *ni, struct socket *sock);
extern void kranal_free_acceptsock (kra_acceptsock_t *ras);
-extern int kranal_listener_procint (cfs_sysctl_table_t *table,
+extern int kranal_listener_procint (struct ctl_table *table,
int write, struct file *filp,
void *buffer, size_t *lenp);
extern void kranal_update_reaper_timeout (long timeout);