target: Minimize SCSI header #include directives
[firefly-linux-kernel-4.4.55.git] / include / target / iscsi / iscsi_target_core.h
index d3583d3ee193aa5deaf1d9e3e0917560747af107..006983b296dd6da3afa466e43f40ec0699cad36f 100644 (file)
@@ -5,7 +5,6 @@
 #include <linux/configfs.h>
 #include <net/sock.h>
 #include <net/tcp.h>
-#include <scsi/scsi_cmnd.h>
 #include <scsi/iscsi_proto.h>
 #include <target/target_core_base.h>
 
@@ -20,6 +19,8 @@
 #define ISCSIT_MIN_TAGS                        16
 #define ISCSIT_EXTRA_TAGS              8
 #define ISCSIT_TCP_BACKLOG             256
+#define ISCSI_RX_THREAD_NAME           "iscsi_trx"
+#define ISCSI_TX_THREAD_NAME           "iscsi_ttx"
 
 /* struct iscsi_node_attrib sanity values */
 #define NA_DATAOUT_TIMEOUT             3
@@ -60,6 +61,7 @@
 #define TA_CACHE_CORE_NPS              0
 /* T10 protection information disabled by default */
 #define TA_DEFAULT_T10_PI              0
+#define TA_DEFAULT_FABRIC_PROT_TYPE    0
 
 #define ISCSI_IOV_DATA_BUFFER          5
 
@@ -600,8 +602,11 @@ struct iscsi_conn {
        struct iscsi_tpg_np     *tpg_np;
        /* Pointer to parent session */
        struct iscsi_session    *sess;
-       /* Pointer to thread_set in use for this conn's threads */
-       struct iscsi_thread_set *thread_set;
+       int                     bitmap_id;
+       int                     rx_thread_active;
+       struct task_struct      *rx_thread;
+       int                     tx_thread_active;
+       struct task_struct      *tx_thread;
        /* list_head for session connection list */
        struct list_head        conn_list;
 } ____cacheline_aligned;
@@ -767,6 +772,7 @@ struct iscsi_tpg_attrib {
        u32                     demo_mode_discovery;
        u32                     default_erl;
        u8                      t10_pi;
+       u32                     fabric_prot_type;
        struct iscsi_portal_group *tpg;
 };
 
@@ -871,10 +877,10 @@ struct iscsit_global {
        /* Unique identifier used for the authentication daemon */
        u32                     auth_id;
        u32                     inactive_ts;
-       /* Thread Set bitmap count */
-       int                     ts_bitmap_count;
+#define ISCSIT_BITMAP_BITS     262144
        /* Thread Set bitmap pointer */
        unsigned long           *ts_bitmap;
+       spinlock_t              ts_bitmap_lock;
        /* Used for iSCSI discovery session authentication */
        struct iscsi_node_acl   discovery_acl;
        struct iscsi_portal_group       *discovery_tpg;