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;