diff options
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/iscsi/iscsi_target_core.h | 27 | ||||
-rw-r--r-- | include/target/iscsi/iscsi_transport.h | 41 | ||||
-rw-r--r-- | include/target/target_core_base.h | 2 | ||||
-rw-r--r-- | include/target/target_core_fabric.h | 6 |
4 files changed, 68 insertions, 8 deletions
diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h index c3371fa548cb..4ac24f5a3308 100644 --- a/include/target/iscsi/iscsi_target_core.h +++ b/include/target/iscsi/iscsi_target_core.h | |||
@@ -74,6 +74,7 @@ enum iscsit_transport_type { | |||
74 | ISCSI_IWARP_TCP = 3, | 74 | ISCSI_IWARP_TCP = 3, |
75 | ISCSI_IWARP_SCTP = 4, | 75 | ISCSI_IWARP_SCTP = 4, |
76 | ISCSI_INFINIBAND = 5, | 76 | ISCSI_INFINIBAND = 5, |
77 | ISCSI_CXGBIT = 6, | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | /* RFC-3720 7.1.4 Standard Connection State Diagram for a Target */ | 80 | /* RFC-3720 7.1.4 Standard Connection State Diagram for a Target */ |
@@ -890,4 +891,30 @@ static inline u32 session_get_next_ttt(struct iscsi_session *session) | |||
890 | } | 891 | } |
891 | 892 | ||
892 | extern struct iscsi_cmd *iscsit_find_cmd_from_itt(struct iscsi_conn *, itt_t); | 893 | extern struct iscsi_cmd *iscsit_find_cmd_from_itt(struct iscsi_conn *, itt_t); |
894 | |||
895 | static inline void iscsit_thread_check_cpumask( | ||
896 | struct iscsi_conn *conn, | ||
897 | struct task_struct *p, | ||
898 | int mode) | ||
899 | { | ||
900 | /* | ||
901 | * mode == 1 signals iscsi_target_tx_thread() usage. | ||
902 | * mode == 0 signals iscsi_target_rx_thread() usage. | ||
903 | */ | ||
904 | if (mode == 1) { | ||
905 | if (!conn->conn_tx_reset_cpumask) | ||
906 | return; | ||
907 | conn->conn_tx_reset_cpumask = 0; | ||
908 | } else { | ||
909 | if (!conn->conn_rx_reset_cpumask) | ||
910 | return; | ||
911 | conn->conn_rx_reset_cpumask = 0; | ||
912 | } | ||
913 | /* | ||
914 | * Update the CPU mask for this single kthread so that | ||
915 | * both TX and RX kthreads are scheduled to run on the | ||
916 | * same CPU. | ||
917 | */ | ||
918 | set_cpus_allowed_ptr(p, conn->conn_cpumask); | ||
919 | } | ||
893 | #endif /* ISCSI_TARGET_CORE_H */ | 920 | #endif /* ISCSI_TARGET_CORE_H */ |
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 90e37faa2ede..40ac7cd80150 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h | |||
@@ -6,6 +6,7 @@ struct iscsit_transport { | |||
6 | #define ISCSIT_TRANSPORT_NAME 16 | 6 | #define ISCSIT_TRANSPORT_NAME 16 |
7 | char name[ISCSIT_TRANSPORT_NAME]; | 7 | char name[ISCSIT_TRANSPORT_NAME]; |
8 | int transport_type; | 8 | int transport_type; |
9 | bool rdma_shutdown; | ||
9 | int priv_size; | 10 | int priv_size; |
10 | struct module *owner; | 11 | struct module *owner; |
11 | struct list_head t_node; | 12 | struct list_head t_node; |
@@ -22,6 +23,13 @@ struct iscsit_transport { | |||
22 | int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); | 23 | int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); |
23 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); | 24 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); |
24 | void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); | 25 | void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); |
26 | int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *, | ||
27 | struct iscsi_datain_req *, const void *, u32); | ||
28 | void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *); | ||
29 | void (*iscsit_get_rx_pdu)(struct iscsi_conn *); | ||
30 | int (*iscsit_validate_params)(struct iscsi_conn *); | ||
31 | void (*iscsit_get_r2t_ttt)(struct iscsi_conn *, struct iscsi_cmd *, | ||
32 | struct iscsi_r2t *); | ||
25 | enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); | 33 | enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); |
26 | }; | 34 | }; |
27 | 35 | ||
@@ -77,6 +85,18 @@ extern void iscsit_build_reject(struct iscsi_cmd *, struct iscsi_conn *, | |||
77 | extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *, | 85 | extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *, |
78 | struct iscsi_logout_rsp *); | 86 | struct iscsi_logout_rsp *); |
79 | extern int iscsit_logout_post_handler(struct iscsi_cmd *, struct iscsi_conn *); | 87 | extern int iscsit_logout_post_handler(struct iscsi_cmd *, struct iscsi_conn *); |
88 | extern int iscsit_queue_rsp(struct iscsi_conn *, struct iscsi_cmd *); | ||
89 | extern void iscsit_aborted_task(struct iscsi_conn *, struct iscsi_cmd *); | ||
90 | extern int iscsit_add_reject(struct iscsi_conn *, u8, unsigned char *); | ||
91 | extern int iscsit_reject_cmd(struct iscsi_cmd *, u8, unsigned char *); | ||
92 | extern int iscsit_handle_snack(struct iscsi_conn *, unsigned char *); | ||
93 | extern void iscsit_build_datain_pdu(struct iscsi_cmd *, struct iscsi_conn *, | ||
94 | struct iscsi_datain *, | ||
95 | struct iscsi_data_rsp *, bool); | ||
96 | extern int iscsit_build_r2ts_for_cmd(struct iscsi_conn *, struct iscsi_cmd *, | ||
97 | bool); | ||
98 | extern int iscsit_immediate_queue(struct iscsi_conn *, struct iscsi_cmd *, int); | ||
99 | extern int iscsit_response_queue(struct iscsi_conn *, struct iscsi_cmd *, int); | ||
80 | /* | 100 | /* |
81 | * From iscsi_target_device.c | 101 | * From iscsi_target_device.c |
82 | */ | 102 | */ |
@@ -102,3 +122,24 @@ extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, int); | |||
102 | extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, | 122 | extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, |
103 | unsigned char *, __be32); | 123 | unsigned char *, __be32); |
104 | extern void iscsit_release_cmd(struct iscsi_cmd *); | 124 | extern void iscsit_release_cmd(struct iscsi_cmd *); |
125 | extern void iscsit_free_cmd(struct iscsi_cmd *, bool); | ||
126 | extern void iscsit_add_cmd_to_immediate_queue(struct iscsi_cmd *, | ||
127 | struct iscsi_conn *, u8); | ||
128 | |||
129 | /* | ||
130 | * From iscsi_target_nego.c | ||
131 | */ | ||
132 | extern int iscsi_target_check_login_request(struct iscsi_conn *, | ||
133 | struct iscsi_login *); | ||
134 | |||
135 | /* | ||
136 | * From iscsi_target_login.c | ||
137 | */ | ||
138 | extern __printf(2, 3) int iscsi_change_param_sprintf( | ||
139 | struct iscsi_conn *, const char *, ...); | ||
140 | |||
141 | /* | ||
142 | * From iscsi_target_parameters.c | ||
143 | */ | ||
144 | extern struct iscsi_param *iscsi_find_param_from_key( | ||
145 | char *, struct iscsi_param_list *); | ||
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 3e0dd86360a2..b316b44d03f3 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -536,7 +536,6 @@ struct se_node_acl { | |||
536 | char initiatorname[TRANSPORT_IQN_LEN]; | 536 | char initiatorname[TRANSPORT_IQN_LEN]; |
537 | /* Used to signal demo mode created ACL, disabled by default */ | 537 | /* Used to signal demo mode created ACL, disabled by default */ |
538 | bool dynamic_node_acl; | 538 | bool dynamic_node_acl; |
539 | bool acl_stop:1; | ||
540 | u32 queue_depth; | 539 | u32 queue_depth; |
541 | u32 acl_index; | 540 | u32 acl_index; |
542 | enum target_prot_type saved_prot_type; | 541 | enum target_prot_type saved_prot_type; |
@@ -603,7 +602,6 @@ struct se_session { | |||
603 | struct list_head sess_cmd_list; | 602 | struct list_head sess_cmd_list; |
604 | struct list_head sess_wait_list; | 603 | struct list_head sess_wait_list; |
605 | spinlock_t sess_cmd_lock; | 604 | spinlock_t sess_cmd_lock; |
606 | struct kref sess_kref; | ||
607 | void *sess_cmd_map; | 605 | void *sess_cmd_map; |
608 | struct percpu_ida sess_tag_pool; | 606 | struct percpu_ida sess_tag_pool; |
609 | }; | 607 | }; |
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 78d88f03b296..de44462a7680 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
@@ -50,10 +50,6 @@ struct target_core_fabric_ops { | |||
50 | */ | 50 | */ |
51 | int (*check_stop_free)(struct se_cmd *); | 51 | int (*check_stop_free)(struct se_cmd *); |
52 | void (*release_cmd)(struct se_cmd *); | 52 | void (*release_cmd)(struct se_cmd *); |
53 | /* | ||
54 | * Called with spin_lock_bh(struct se_portal_group->session_lock held. | ||
55 | */ | ||
56 | int (*shutdown_session)(struct se_session *); | ||
57 | void (*close_session)(struct se_session *); | 53 | void (*close_session)(struct se_session *); |
58 | u32 (*sess_get_index)(struct se_session *); | 54 | u32 (*sess_get_index)(struct se_session *); |
59 | /* | 55 | /* |
@@ -123,8 +119,6 @@ void __transport_register_session(struct se_portal_group *, | |||
123 | struct se_node_acl *, struct se_session *, void *); | 119 | struct se_node_acl *, struct se_session *, void *); |
124 | void transport_register_session(struct se_portal_group *, | 120 | void transport_register_session(struct se_portal_group *, |
125 | struct se_node_acl *, struct se_session *, void *); | 121 | struct se_node_acl *, struct se_session *, void *); |
126 | int target_get_session(struct se_session *); | ||
127 | void target_put_session(struct se_session *); | ||
128 | ssize_t target_show_dynamic_sessions(struct se_portal_group *, char *); | 122 | ssize_t target_show_dynamic_sessions(struct se_portal_group *, char *); |
129 | void transport_free_session(struct se_session *); | 123 | void transport_free_session(struct se_session *); |
130 | void target_put_nacl(struct se_node_acl *); | 124 | void target_put_nacl(struct se_node_acl *); |