X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fklnds%2Fqswlnd%2Fqswlnd.h;h=b45c2cdd13878a9e4df340dc36ddee0536a180fa;hb=35a1096a4741b24dbcd674bda5daf7b8a13cfe28;hp=aa6b3de389707b6a946cee8948bb79aecbdf8cba;hpb=9fb46705ae86aa2c0ac29427f0ff24f923560eb7;p=fs%2Flustre-release.git diff --git a/lnet/klnds/qswlnd/qswlnd.h b/lnet/klnds/qswlnd/qswlnd.h index aa6b3de..b45c2cd 100644 --- a/lnet/klnds/qswlnd/qswlnd.h +++ b/lnet/klnds/qswlnd/qswlnd.h @@ -26,6 +26,8 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -180,7 +182,7 @@ typedef struct kqswnal_rx int krx_nob; /* Number Of Bytes received into buffer */ int krx_rpc_reply_needed:1; /* peer waiting for EKC RPC reply */ int krx_state; /* what this RX is doing */ - cfs_atomic_t krx_refcount; /* how to tell when rpc is done */ + atomic_t krx_refcount; /* how to tell when rpc is done */ #if KQSW_CKSUM __u32 krx_cksum; /* checksum */ #endif @@ -246,47 +248,47 @@ typedef struct #endif #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM - cfs_sysctl_table_header_t *kqn_sysctl; /* sysctl interface */ + struct ctl_table_header *kqn_sysctl; /* sysctl interface */ #endif } kqswnal_tunables_t; typedef struct { - char kqn_init; /* what's been initialised */ - char kqn_shuttingdown;/* I'm trying to shut down */ - cfs_atomic_t kqn_nthreads; /* # threads running */ - lnet_ni_t *kqn_ni; /* _the_ instance of me */ + char kqn_init; /* what's been initialised */ + char kqn_shuttingdown;/* I'm trying to shut down */ + atomic_t kqn_nthreads; /* # threads running */ + lnet_ni_t *kqn_ni; /* _the_ instance of me */ - kqswnal_rx_t *kqn_rxds; /* stack of all the receive descriptors */ - kqswnal_tx_t *kqn_txds; /* stack of all the transmit descriptors */ + kqswnal_rx_t *kqn_rxds; /* stack of all the receive descriptors */ + kqswnal_tx_t *kqn_txds; /* stack of all the transmit descriptors */ - cfs_list_t kqn_idletxds; /* transmit descriptors free to use */ - cfs_list_t kqn_activetxds; /* transmit descriptors being used */ + cfs_list_t kqn_idletxds; /* transmit descriptors free to use */ + cfs_list_t kqn_activetxds; /* transmit descriptors being used */ spinlock_t kqn_idletxd_lock; /* serialise idle txd access */ - cfs_atomic_t kqn_pending_txs; /* # transmits being prepped */ + atomic_t kqn_pending_txs; /* # transmits being prepped */ spinlock_t kqn_sched_lock; /* serialise packet schedulers */ - cfs_waitq_t kqn_sched_waitq;/* scheduler blocks here */ + wait_queue_head_t kqn_sched_waitq;/* scheduler blocks here */ - cfs_list_t kqn_readyrxds; /* rxds full of data */ - cfs_list_t kqn_donetxds; /* completed transmits */ - cfs_list_t kqn_delayedtxds;/* delayed transmits */ + cfs_list_t kqn_readyrxds; /* rxds full of data */ + cfs_list_t kqn_donetxds; /* completed transmits */ + cfs_list_t kqn_delayedtxds;/* delayed transmits */ - EP_SYS *kqn_ep; /* elan system */ - EP_NMH *kqn_ep_tx_nmh; /* elan reserved tx vaddrs */ - EP_NMH *kqn_ep_rx_nmh; /* elan reserved rx vaddrs */ - EP_XMTR *kqn_eptx; /* elan transmitter */ - EP_RCVR *kqn_eprx_small; /* elan receiver (small messages) */ - EP_RCVR *kqn_eprx_large; /* elan receiver (large messages) */ + EP_SYS *kqn_ep; /* elan system */ + EP_NMH *kqn_ep_tx_nmh; /* elan reserved tx vaddrs */ + EP_NMH *kqn_ep_rx_nmh; /* elan reserved rx vaddrs */ + EP_XMTR *kqn_eptx; /* elan transmitter */ + EP_RCVR *kqn_eprx_small; /* elan receiver (small messages) */ + EP_RCVR *kqn_eprx_large; /* elan receiver (large messages) */ - int kqn_nnodes; /* this cluster's size */ - int kqn_elanid; /* this nodes's elan ID */ + int kqn_nnodes; /* this cluster's size */ + int kqn_elanid; /* this nodes's elan ID */ - EP_STATUSBLK kqn_rpc_success;/* preset RPC reply status blocks */ - EP_STATUSBLK kqn_rpc_failed; - EP_STATUSBLK kqn_rpc_version;/* reply to future version query */ - EP_STATUSBLK kqn_rpc_magic; /* reply to future version query */ -} kqswnal_data_t; + EP_STATUSBLK kqn_rpc_success;/* preset RPC reply status blocks */ + EP_STATUSBLK kqn_rpc_failed; + EP_STATUSBLK kqn_rpc_version;/* reply to future version query */ + EP_STATUSBLK kqn_rpc_magic; /* reply to future version query */ +} kqswnal_data_t; /* kqn_init state */ #define KQN_INIT_NOTHING 0 /* MUST BE ZERO so zeroed state is initialised OK */ @@ -334,8 +336,8 @@ kqswnal_pages_spanned (void *base, int nob) static inline void kqswnal_rx_decref (kqswnal_rx_t *krx) { - LASSERT (cfs_atomic_read (&krx->krx_refcount) > 0); - if (cfs_atomic_dec_and_test (&krx->krx_refcount)) + LASSERT (atomic_read (&krx->krx_refcount) > 0); + if (atomic_dec_and_test (&krx->krx_refcount)) kqswnal_rx_done(krx); }