- cfs_list_t ni_list; /* chain on ln_nis */
- cfs_list_t ni_txq; /* messages waiting for tx credits */
- int ni_maxtxcredits; /* # tx credits */
- int ni_txcredits; /* # tx credits free */
- int ni_mintxcredits; /* lowest it's been */
- int ni_peertxcredits; /* # per-peer send credits */
- int ni_peerrtrcredits; /* # per-peer router buffer credits */
- int ni_peertimeout; /* seconds to consider peer dead */
- lnet_nid_t ni_nid; /* interface's NID */
- void *ni_data; /* instance-specific data */
- lnd_t *ni_lnd; /* procedural interface */
- int ni_refcount; /* reference count */
- /* when I was last alive */
- long ni_last_alive;
+#ifdef __KERNEL__
+ cfs_spinlock_t ni_lock;
+#else
+# ifndef HAVE_LIBPTHREAD
+ int ni_lock;
+# else
+ pthread_mutex_t ni_lock;
+# endif
+#endif
+ cfs_list_t ni_list; /* chain on ln_nis */
+ cfs_list_t ni_cptlist; /* chain on ln_nis_cpt */
+ int ni_maxtxcredits; /* # tx credits */
+ /* # per-peer send credits */
+ int ni_peertxcredits;
+ /* # per-peer router buffer credits */
+ int ni_peerrtrcredits;
+ /* seconds to consider peer dead */
+ int ni_peertimeout;
+ int ni_ncpts; /* number of CPTs */
+ __u32 *ni_cpts; /* bond NI on some CPTs */
+ lnet_nid_t ni_nid; /* interface's NID */
+ void *ni_data; /* instance-specific data */
+ lnd_t *ni_lnd; /* procedural interface */
+ struct lnet_tx_queue **ni_tx_queues; /* percpt TX queues */
+ int **ni_refs; /* percpt reference count */
+ long ni_last_alive; /* when I was last alive */