3e1c81a95f
This patch refactors existing traditional iscsi RX side PDU handling to use iscsit_transport, and exports the necessary logic for external transport modules. This includes: - Refactor iscsit_handle_scsi_cmd() into PDU setup / processing - Add updated iscsit_handle_scsi_cmd() for tradtional iscsi code - Add iscsit_set_unsoliticed_dataout() wrapper - Refactor iscsit_handle_data_out() into PDU check / processing - Add updated iscsit_handle_data_out() for tradtional iscsi code - Add iscsit_handle_nop_out() + iscsit_handle_task_mgt_cmd() to accept pre-allocated struct iscsi_cmd - Add iscsit_build_r2ts_for_cmd() caller for iscsi_target_transport to handle ISTATE_SEND_R2T for TX immediate queue - Refactor main traditional iscsi iscsi_target_rx_thread() PDU switch into iscsi_target_rx_opcode() using iscsit_allocate_cmd() - Turn iscsi_target_rx_thread() process context into NOP for ib_isert side work-queue. v5 changes: - Make iscsit_handle_scsi_cmd() static (Fengguang) - Fix iscsit_handle_scsi_cmd() exception se_cmd leak (nab) v3 changes: - Add extra target_put_sess_cmd call in iscsit_add_reject_from_cmd after completion v2 changes: - Disable iscsit_ack_from_expstatsn() usage for RDMAExtentions=Yes - Disable iscsit_allocate_datain_req() usage for RDMAExtentions=Yes - Add target_get_sess_cmd() reference counting to iscsit_setup_scsi_cmd() - Add TFO->lio_check_stop_free() fabric API caller - Add export of iscsit_stop_dataout_timer() symbol - Add iscsit_build_r2ts_for_cmd() for iscsit_transport->iscsit_get_dataout() - Convert existing usage of iscsit_build_r2ts_for_cmd() to ->iscsit_get_dataout() - Drop RDMAExtentions=Yes specific check in iscsit_build_r2ts_for_cmd() - Fix RDMAExtentions -> RDMAExtensions typo (andy) - Pass correct dump_payload value into iscsit_get_immediate_data() for iscsit_handle_scsi_cmd() Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
50 lines
2.3 KiB
C
50 lines
2.3 KiB
C
#ifndef ISCSI_TARGET_H
|
|
#define ISCSI_TARGET_H
|
|
|
|
extern struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *);
|
|
extern struct iscsi_tiqn *iscsit_get_tiqn(unsigned char *, int);
|
|
extern void iscsit_put_tiqn_for_login(struct iscsi_tiqn *);
|
|
extern struct iscsi_tiqn *iscsit_add_tiqn(unsigned char *);
|
|
extern void iscsit_del_tiqn(struct iscsi_tiqn *);
|
|
extern int iscsit_access_np(struct iscsi_np *, struct iscsi_portal_group *);
|
|
extern int iscsit_deaccess_np(struct iscsi_np *, struct iscsi_portal_group *);
|
|
extern bool iscsit_check_np_match(struct __kernel_sockaddr_storage *,
|
|
struct iscsi_np *, int);
|
|
extern struct iscsi_np *iscsit_add_np(struct __kernel_sockaddr_storage *,
|
|
char *, int);
|
|
extern int iscsit_reset_np_thread(struct iscsi_np *, struct iscsi_tpg_np *,
|
|
struct iscsi_portal_group *);
|
|
extern int iscsit_del_np(struct iscsi_np *);
|
|
extern int iscsit_add_reject_from_cmd(u8, int, int, unsigned char *, struct iscsi_cmd *);
|
|
extern void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *);
|
|
extern int iscsit_logout_closesession(struct iscsi_cmd *, struct iscsi_conn *);
|
|
extern int iscsit_logout_closeconnection(struct iscsi_cmd *, struct iscsi_conn *);
|
|
extern int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *, struct iscsi_conn *);
|
|
extern int iscsit_send_async_msg(struct iscsi_conn *, u16, u8, u8);
|
|
extern int iscsit_build_r2ts_for_cmd(struct iscsi_conn *, struct iscsi_cmd *, bool recovery);
|
|
extern void iscsit_thread_get_cpumask(struct iscsi_conn *);
|
|
extern int iscsi_target_tx_thread(void *);
|
|
extern int iscsi_target_rx_thread(void *);
|
|
extern int iscsit_close_connection(struct iscsi_conn *);
|
|
extern int iscsit_close_session(struct iscsi_session *);
|
|
extern void iscsit_fail_session(struct iscsi_session *);
|
|
extern int iscsit_free_session(struct iscsi_session *);
|
|
extern void iscsit_stop_session(struct iscsi_session *, int, int);
|
|
extern int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *, int);
|
|
|
|
extern struct iscsit_global *iscsit_global;
|
|
extern struct target_fabric_configfs *lio_target_fabric_configfs;
|
|
|
|
extern struct kmem_cache *lio_dr_cache;
|
|
extern struct kmem_cache *lio_ooo_cache;
|
|
extern struct kmem_cache *lio_cmd_cache;
|
|
extern struct kmem_cache *lio_qr_cache;
|
|
extern struct kmem_cache *lio_r2t_cache;
|
|
|
|
extern struct idr sess_idr;
|
|
extern struct mutex auth_id_lock;
|
|
extern spinlock_t sess_idr_lock;
|
|
|
|
|
|
#endif /*** ISCSI_TARGET_H ***/
|