stmf_impl.h revision 034d83c4b3be1c9bbe03552a652ebb90d4d66885
843e19887f64dde75055cf8842fc4db2171eff45johnlev/*
843e19887f64dde75055cf8842fc4db2171eff45johnlev * CDDL HEADER START
843e19887f64dde75055cf8842fc4db2171eff45johnlev *
843e19887f64dde75055cf8842fc4db2171eff45johnlev * The contents of this file are subject to the terms of the
843e19887f64dde75055cf8842fc4db2171eff45johnlev * Common Development and Distribution License (the "License").
843e19887f64dde75055cf8842fc4db2171eff45johnlev * You may not use this file except in compliance with the License.
843e19887f64dde75055cf8842fc4db2171eff45johnlev *
843e19887f64dde75055cf8842fc4db2171eff45johnlev * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
843e19887f64dde75055cf8842fc4db2171eff45johnlev * or http://www.opensolaris.org/os/licensing.
843e19887f64dde75055cf8842fc4db2171eff45johnlev * See the License for the specific language governing permissions
843e19887f64dde75055cf8842fc4db2171eff45johnlev * and limitations under the License.
843e19887f64dde75055cf8842fc4db2171eff45johnlev *
843e19887f64dde75055cf8842fc4db2171eff45johnlev * When distributing Covered Code, include this CDDL HEADER in each
843e19887f64dde75055cf8842fc4db2171eff45johnlev * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
843e19887f64dde75055cf8842fc4db2171eff45johnlev * If applicable, add the following below this CDDL HEADER, with the
843e19887f64dde75055cf8842fc4db2171eff45johnlev * fields enclosed by brackets "[]" replaced with your own identifying
843e19887f64dde75055cf8842fc4db2171eff45johnlev * information: Portions Copyright [yyyy] [name of copyright owner]
843e19887f64dde75055cf8842fc4db2171eff45johnlev *
843e19887f64dde75055cf8842fc4db2171eff45johnlev * CDDL HEADER END
843e19887f64dde75055cf8842fc4db2171eff45johnlev */
843e19887f64dde75055cf8842fc4db2171eff45johnlev/*
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
843e19887f64dde75055cf8842fc4db2171eff45johnlev * Use is subject to license terms.
843e19887f64dde75055cf8842fc4db2171eff45johnlev */
843e19887f64dde75055cf8842fc4db2171eff45johnlev#ifndef _STMF_IMPL_H
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define _STMF_IMPL_H
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev#include <sys/stmf_defines.h>
843e19887f64dde75055cf8842fc4db2171eff45johnlev#include <sys/stmf_ioctl.h>
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev#ifdef __cplusplus
843e19887f64dde75055cf8842fc4db2171eff45johnlevextern "C" {
843e19887f64dde75055cf8842fc4db2171eff45johnlev#endif
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlevtypedef uint32_t stmf_event_handle_t;
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_MAX_NUM_EVENTS (sizeof (stmf_event_handle_t) * 8)
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_EVENT_ADD(h, e) (atomic_or_32(&(h), \
843e19887f64dde75055cf8842fc4db2171eff45johnlev ((uint32_t)1) << (e)))
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_EVENT_REMOVE(h, e) (atomic_and_32(&(h), \
843e19887f64dde75055cf8842fc4db2171eff45johnlev ~(((uint32_t)1) << (e))))
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_EVENT_ENABLED(h, e) (((h) & ((uint32_t)1) << (e)) != 0)
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_EVENT_CLEAR_ALL(h) ((h) = 0)
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_EVENT_ALLOC_HANDLE(h) ((h) = 0)
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_EVENT_FREE_HANDLE(h) ((h) = 0)
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_TGT_NAME_LEN 256
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_GUID_INPUT 32
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_UPDATE_KSTAT_IO(kip, dbuf) \
843e19887f64dde75055cf8842fc4db2171eff45johnlev if (dbuf->db_flags & DB_DIRECTION_TO_RPORT) { \
843e19887f64dde75055cf8842fc4db2171eff45johnlev kip->reads++; \
843e19887f64dde75055cf8842fc4db2171eff45johnlev kip->nread += dbuf->db_data_size; \
843e19887f64dde75055cf8842fc4db2171eff45johnlev } else { \
843e19887f64dde75055cf8842fc4db2171eff45johnlev kip->writes++; \
843e19887f64dde75055cf8842fc4db2171eff45johnlev kip->nwritten += dbuf->db_data_size; \
843e19887f64dde75055cf8842fc4db2171eff45johnlev }
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlevstruct stmf_i_scsi_task;
843e19887f64dde75055cf8842fc4db2171eff45johnlevstruct stmf_itl_data;
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlevtypedef struct stmf_i_lu_provider {
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_lu_provider_t *ilp_lp;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilp_alloc_size;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilp_nlus; /* # LUNs being exported */
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilp_cb_in_progress:1,
843e19887f64dde75055cf8842fc4db2171eff45johnlev ilp_rsvd:31;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_lu_provider *ilp_next;
d62bc4badc1c1f1549c961cfb8b420e650e1272byz struct stmf_pp_data *ilp_ppd;
843e19887f64dde75055cf8842fc4db2171eff45johnlev} stmf_i_lu_provider_t;
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlevtypedef struct stmf_i_lu {
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_lu_t *ilu_lu;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilu_alloc_size;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilu_flags;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilu_ref_cnt;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint8_t ilu_state;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint8_t ilu_prev_state;
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_event_handle_t ilu_event_hdl;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_lu *ilu_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_lu *ilu_prev;
843e19887f64dde75055cf8842fc4db2171eff45johnlev char *ilu_alias;
843e19887f64dde75055cf8842fc4db2171eff45johnlev char ilu_ascii_hex_guid[STMF_GUID_INPUT + 1];
843e19887f64dde75055cf8842fc4db2171eff45johnlev kmutex_t ilu_task_lock;
d62bc4badc1c1f1549c961cfb8b420e650e1272byz uint32_t ilu_task_cntr1;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilu_task_cntr2;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t *ilu_cur_task_cntr;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilu_ntasks; /* # of tasks in the ilu_task list */
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilu_ntasks_free; /* # of tasks that are free */
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilu_ntasks_min_free; /* # minimal free tasks */
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_task *ilu_tasks;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_task *ilu_free_tasks;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_itl_data *ilu_itl_list;
843e19887f64dde75055cf8842fc4db2171eff45johnlev kstat_t *ilu_kstat_info;
843e19887f64dde75055cf8842fc4db2171eff45johnlev kstat_t *ilu_kstat_io;
843e19887f64dde75055cf8842fc4db2171eff45johnlev kmutex_t ilu_kstat_lock;
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev /* point to the luid entry in stmf_state.stmf_luid_list */
843e19887f64dde75055cf8842fc4db2171eff45johnlev void *ilu_luid;
d62bc4badc1c1f1549c961cfb8b420e650e1272byz} stmf_i_lu_t;
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev/*
843e19887f64dde75055cf8842fc4db2171eff45johnlev * ilu_flags
843e19887f64dde75055cf8842fc4db2171eff45johnlev */
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ILU_STALL_DEREGISTER 0x0001
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ILU_RESET_ACTIVE 0x0002
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlevtypedef struct stmf_i_port_provider {
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_port_provider_t *ipp_pp;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ipp_alloc_size;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ipp_npps;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ipp_cb_in_progress:1,
843e19887f64dde75055cf8842fc4db2171eff45johnlev ipp_rsvd:31;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_port_provider *ipp_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_pp_data *ipp_ppd;
843e19887f64dde75055cf8842fc4db2171eff45johnlev} stmf_i_port_provider_t;
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlevtypedef struct stmf_i_local_port {
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_local_port_t *ilport_lport;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilport_alloc_size;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilport_nsessions;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_session *ilport_ss_list;
843e19887f64dde75055cf8842fc4db2171eff45johnlev krwlock_t ilport_lock;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_local_port *ilport_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_local_port *ilport_prev;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint8_t ilport_state;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint8_t ilport_prev_state;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint16_t ilport_rtpid; /* relative tpid */
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_event_handle_t ilport_event_hdl;
843e19887f64dde75055cf8842fc4db2171eff45johnlev clock_t ilport_last_online_clock;
843e19887f64dde75055cf8842fc4db2171eff45johnlev clock_t ilport_avg_interval;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilport_online_times;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t ilport_flags;
843e19887f64dde75055cf8842fc4db2171eff45johnlev kstat_t *ilport_kstat_info;
843e19887f64dde75055cf8842fc4db2171eff45johnlev kstat_t *ilport_kstat_io;
843e19887f64dde75055cf8842fc4db2171eff45johnlev kmutex_t ilport_kstat_lock;
843e19887f64dde75055cf8842fc4db2171eff45johnlev char ilport_kstat_tgt_name[STMF_TGT_NAME_LEN];
843e19887f64dde75055cf8842fc4db2171eff45johnlev /* which target group this port belongs to in stmf_state.stmf_tg_list */
843e19887f64dde75055cf8842fc4db2171eff45johnlev void *ilport_tg;
843e19887f64dde75055cf8842fc4db2171eff45johnlev /* XXX Need something to track all the remote ports also */
843e19887f64dde75055cf8842fc4db2171eff45johnlev} stmf_i_local_port_t;
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define STMF_AVG_ONLINE_INTERVAL (30 * drv_usectohz(1000000))
843e19887f64dde75055cf8842fc4db2171eff45johnlev
d62bc4badc1c1f1549c961cfb8b420e650e1272byz/*
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * ilport flags
843e19887f64dde75055cf8842fc4db2171eff45johnlev */
d62bc4badc1c1f1549c961cfb8b420e650e1272byz#define ILPORT_FORCED_OFFLINE 0x01
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ILPORT_SS_GOT_INITIAL_LUNS 0x02
d62bc4badc1c1f1549c961cfb8b420e650e1272byz
d62bc4badc1c1f1549c961cfb8b420e650e1272byztypedef struct stmf_i_scsi_session {
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_scsi_session_t *iss_ss;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t iss_alloc_size;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t iss_flags;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_session *iss_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev /*
843e19887f64dde75055cf8842fc4db2171eff45johnlev * Ideally we should maintain 2 maps. One would indicate a new map
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * which will become available only upon receipt of a REPORT LUN
843e19887f64dde75055cf8842fc4db2171eff45johnlev * cmd.
843e19887f64dde75055cf8842fc4db2171eff45johnlev */
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_lun_map *iss_sm;
843e19887f64dde75055cf8842fc4db2171eff45johnlev /*
843e19887f64dde75055cf8842fc4db2171eff45johnlev * which host group the host of this session belongs to in
843e19887f64dde75055cf8842fc4db2171eff45johnlev * stmf_state.stmf_hg_list
843e19887f64dde75055cf8842fc4db2171eff45johnlev */
843e19887f64dde75055cf8842fc4db2171eff45johnlev void *iss_hg;
843e19887f64dde75055cf8842fc4db2171eff45johnlev krwlock_t *iss_lockp;
843e19887f64dde75055cf8842fc4db2171eff45johnlev time_t iss_creation_time;
843e19887f64dde75055cf8842fc4db2171eff45johnlev} stmf_i_scsi_session_t;
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev/*
843e19887f64dde75055cf8842fc4db2171eff45johnlev * iss flags
843e19887f64dde75055cf8842fc4db2171eff45johnlev */
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ISS_LUN_INVENTORY_CHANGED 0x0001
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ISS_RESET_ACTIVE 0x0002
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ISS_BEING_CREATED 0x0004
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ISS_GOT_INITIAL_LUNS 0x0008
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ISS_EVENT_ACTIVE 0x0010
843e19887f64dde75055cf8842fc4db2171eff45johnlev
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ITASK_MAX_NCMDS 14
843e19887f64dde75055cf8842fc4db2171eff45johnlev#define ITASK_DEFAULT_POLL_TIMEOUT 0
843e19887f64dde75055cf8842fc4db2171eff45johnlevstruct stmf_worker;
843e19887f64dde75055cf8842fc4db2171eff45johnlevtypedef struct stmf_i_scsi_task {
843e19887f64dde75055cf8842fc4db2171eff45johnlev scsi_task_t *itask_task;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t itask_alloc_size;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t itask_flags;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_worker *itask_worker;
843e19887f64dde75055cf8842fc4db2171eff45johnlev uint32_t *itask_ilu_task_cntr;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_task *itask_worker_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_task *itask_lu_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_task *itask_lu_prev;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_task *itask_lu_free_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_i_scsi_task *itask_abort_next;
843e19887f64dde75055cf8842fc4db2171eff45johnlev struct stmf_itl_data *itask_itl_datap;
843e19887f64dde75055cf8842fc4db2171eff45johnlev clock_t itask_start_time; /* abort and normal */
843e19887f64dde75055cf8842fc4db2171eff45johnlev /* For now we only support 4 parallel buffers. Should be enough. */
843e19887f64dde75055cf8842fc4db2171eff45johnlev stmf_data_buf_t *itask_dbufs[4];
clock_t itask_poll_timeout;
uint8_t itask_cmd_stack[ITASK_MAX_NCMDS];
uint8_t itask_ncmds;
uint8_t itask_allocated_buf_map;
uint16_t itask_cdb_buf_size;
} stmf_i_scsi_task_t;
#define ITASK_DEFAULT_ABORT_TIMEOUT 5
/*
* itask_flags
*/
#define ITASK_IN_FREE_LIST 0x0001
#define ITASK_IN_TRANSITION 0x0002
#define ITASK_IN_WORKER_QUEUE 0x0004
#define ITASK_BEING_ABORTED 0x0008
#define ITASK_BEING_COMPLETED 0x0010
#define ITASK_KNOWN_TO_TGT_PORT 0x0020
#define ITASK_KNOWN_TO_LU 0x0040
#define ITASK_LU_ABORT_CALLED 0x0080
#define ITASK_TGT_PORT_ABORT_CALLED 0x0100
#define ITASK_DEFAULT_HANDLING 0x0200
#define ITASK_CAUSING_LU_RESET 0x0400
#define ITASK_CAUSING_TARGET_RESET 0x0800
/*
* itask cmds.
*/
#define ITASK_CMD_MASK 0x1F
#define ITASK_CMD_BUF_NDX(cmd) (((uint8_t)(cmd)) >> 5)
#define ITASK_CMD_NEW_TASK 0x1
#define ITASK_CMD_DATA_XFER_DONE 0x2
#define ITASK_CMD_STATUS_DONE 0x3
#define ITASK_CMD_ABORT 0x4
#define ITASK_CMD_SEND_STATUS 0x5
#define ITASK_CMD_POLL 0x10
#define ITASK_CMD_POLL_LU (ITASK_CMD_POLL | 1)
#define ITASK_CMD_POLL_LPORT (ITASK_CMD_POLL | 2)
/*
* struct maintained on a per itl basis when the lu registers ITL handle.
*/
typedef struct stmf_itl_data {
uint32_t itl_counter;
uint8_t itl_flags;
uint8_t itl_hdlrm_reason;
uint16_t itl_lun;
void *itl_handle;
struct stmf_i_scsi_session *itl_session;
struct stmf_itl_data *itl_next;
} stmf_itl_data_t;
/*
* itl flags
*/
#define STMF_ITL_BEING_TERMINATED 0x01
/*
* data structures to maintain provider private data.
*/
typedef struct stmf_pp_data {
struct stmf_pp_data *ppd_next;
void *ppd_provider;
nvlist_t *ppd_nv;
uint32_t ppd_lu_provider:1,
ppd_port_provider:1,
ppd_rsvd:30;
uint32_t ppd_alloc_size;
char ppd_name[8];
} stmf_pp_data_t;
typedef struct stmf_worker {
kthread_t *worker_tid;
stmf_i_scsi_task_t *worker_task_head;
stmf_i_scsi_task_t *worker_task_tail;
stmf_i_scsi_task_t *worker_wait_head;
stmf_i_scsi_task_t *worker_wait_tail;
kmutex_t worker_lock;
kcondvar_t worker_cv;
uint32_t worker_flags;
uint32_t worker_queue_depth; /* ntasks cur queued */
uint32_t worker_max_qdepth_pu; /* maxqd / unit time */
uint32_t worker_max_sys_qdepth_pu; /* for all workers */
uint32_t worker_ref_count; /* # IOs referencing */
} stmf_worker_t;
/*
* worker flags
*/
#define STMF_WORKER_STARTED 1
#define STMF_WORKER_ACTIVE 2
#define STMF_WORKER_TERMINATE 4
/*
* data struct for managing transfers.
*/
typedef struct stmf_xfer_data {
uint32_t alloc_size; /* Including this struct */
uint32_t size_done;
uint32_t size_left;
uint8_t buf[4];
} stmf_xfer_data_t;
/*
* Define frequently used macros
*/
#define TASK_TO_ITASK(x_task) \
((stmf_i_scsi_task_t *)(x_task)->task_stmf_private)
void stmf_dlun_init();
stmf_status_t stmf_dlun_fini();
void stmf_worker_init();
stmf_status_t stmf_worker_fini();
void stmf_task_free(scsi_task_t *task);
void stmf_task_lu_free(scsi_task_t *task);
void stmf_do_task_abort(scsi_task_t *task);
void stmf_do_itl_dereg(stmf_lu_t *lu, stmf_itl_data_t *itl,
uint8_t hdlrm_reason);
void stmf_generate_lu_event(stmf_i_lu_t *ilu, int eventid,
void *arg, uint32_t flags);
void stmf_generate_lport_event(stmf_i_local_port_t *ilport, int eventid,
void *arg, uint32_t flags);
#ifdef __cplusplus
}
#endif
#endif /* _STMF_IMPL_H */