#include <lnet/socklnd.h>
typedef struct {
- cfs_list_t tx_list; /* neccessary to form tx list */
+ struct list_head tx_list; /* neccessary to form tx list */
lnet_msg_t *tx_lnetmsg; /* lnet message for lnet_finalize() */
ksock_msg_t tx_msg; /* buffer for wire header of ksock msg */
int tx_resid; /* # of residual bytes */
struct usock_preq_s *uc_preq; /* preallocated request */
__u32 uc_peer_ip; /* IP address of the peer */
__u16 uc_peer_port; /* port of the peer */
- cfs_list_t uc_stale_list; /* orphaned connections */
+ struct list_head uc_stale_list; /* orphaned connections */
/* Receive state */
int uc_rx_state; /* message or hello state */
ksock_msg_t uc_rx_msg; /* message buffer */
/* Send state */
- cfs_list_t uc_tx_list; /* pending txs */
- cfs_list_t uc_zcack_list; /* pending zc_acks */
+ struct list_head uc_tx_list; /* pending txs */
+ struct list_head uc_zcack_list; /* pending zc_acks */
cfs_time_t uc_tx_deadline; /* when to time out */
int uc_tx_flag; /* deadline valid? */
int uc_sending; /* send op is in progress */
#define N_CONN_TYPES 3 /* CONTROL, BULK_IN and BULK_OUT */
typedef struct usock_peer_s {
- cfs_list_t up_list; /* neccessary to form peer list */
+ /* neccessary to form peer list */
+ struct list_head up_list;
lnet_process_id_t up_peerid; /* id of remote peer */
usock_conn_t *up_conns[N_CONN_TYPES]; /* conns that connect us
* us with the peer */
__u64 up_incarnation; /* peer's incarnation */
int up_incrn_is_set;/* 0 if peer's incarnation
* hasn't been set so far */
- mt_atomic_t up_refcount; /* # of users */
+ mt_atomic_t up_refcount; /* # of users */
pthread_mutex_t up_lock; /* serialize */
int up_errored; /* a flag for lnet_notify() */
cfs_time_t up_last_alive; /* when the peer was last alive */
* by fd */
int upt_nfd2idx; /* # of allocated elements
* of upt_fd2idx[] */
- cfs_list_t upt_stale_list; /* list of orphaned conns */
- cfs_list_t upt_pollrequests; /* list of poll requests */
+ struct list_head upt_stale_list; /* list of orphaned conns */
+ struct list_head upt_pollrequests; /* list of poll requests */
pthread_mutex_t upt_pollrequests_lock; /* serialize */
int upt_errno; /* non-zero if errored */
- struct completion upt_completion; /* wait/signal facility for
+ struct completion upt_completion; /* wait/signal facility for
* syncronizing shutdown */
} usock_pollthread_t;
usock_pollthread_t *ud_pollthreads; /* their state */
int ud_shutdown; /* shutdown flag */
int ud_nets_count; /* # of instances */
- cfs_list_t ud_peers[UD_PEER_HASH_SIZE]; /* peer hash table */
+ struct list_head ud_peers[UD_PEER_HASH_SIZE]; /* peer hash table */
pthread_rwlock_t ud_peers_lock; /* serialize */
} usock_data_t;
short upr_value; /* bitmask of POLLIN and POLLOUT bits */
usock_conn_t * upr_conn; /* a conn for the sake of which
* action will be performed */
- cfs_list_t upr_list; /* neccessary to form list */
+ struct list_head upr_list; /* neccessary to form list */
} usock_pollrequest_t;
/* Allowable poll request types are: */
#define POLL_SET_REQUEST 5
typedef struct {
- cfs_list_t zc_list; /* neccessary to form zc_ack list */
+ struct list_head zc_list; /* neccessary to form zc_ack list */
__u64 zc_cookie; /* zero-copy cookie */
} usock_zc_ack_t;
return ip % usock_data.ud_npollthreads;
}
-static inline cfs_list_t *
+static inline struct list_head *
usocklnd_nid2peerlist(lnet_nid_t nid)
{
unsigned int hash = ((unsigned int)nid) % UD_PEER_HASH_SIZE;
int usocklnd_activeconn_hellorecv(usock_conn_t *conn);
int usocklnd_passiveconn_hellorecv(usock_conn_t *conn);
int usocklnd_write_handler(usock_conn_t *conn);
-usock_tx_t * usocklnd_try_piggyback(cfs_list_t *tx_list_p,
- cfs_list_t *zcack_list_p);
+usock_tx_t *usocklnd_try_piggyback(struct list_head *tx_list_p,
+ struct list_head *zcack_list_p);
int usocklnd_activeconn_hellosent(usock_conn_t *conn);
int usocklnd_passiveconn_hellosent(usock_conn_t *conn);
int usocklnd_send_tx(usock_conn_t *conn, usock_tx_t *tx);
usock_tx_t *usocklnd_create_cr_hello_tx(lnet_ni_t *ni,
int type, lnet_nid_t peer_nid);
void usocklnd_destroy_tx(lnet_ni_t *ni, usock_tx_t *tx);
-void usocklnd_destroy_txlist(lnet_ni_t *ni, cfs_list_t *txlist);
-void usocklnd_destroy_zcack_list(cfs_list_t *zcack_list);
+void usocklnd_destroy_txlist(lnet_ni_t *ni, struct list_head *txlist);
+void usocklnd_destroy_zcack_list(struct list_head *zcack_list);
void usocklnd_destroy_peer (usock_peer_t *peer);
int usocklnd_get_conn_type(lnet_msg_t *lntmsg);
int usocklnd_type2idx(int type);