/**/ /***************************************************************************/ /** **/ /** © Copyright 2010, Hewlett-Packard Development Company, L.P. **/ /** **/ /** Confidential computer software. Valid license from HP and/or **/ /** its subsidiaries required for possession, use, or copying. **/ /** **/ /** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, **/ /** Computer Software Documentation, and Technical Data for Commercial **/ /** Items are licensed to the U.S. Government under vendor's standard **/ /** commercial license. **/ /** **/ /** Neither HP nor any of its subsidiaries shall be liable for technical **/ /** or editorial errors or omissions contained herein. The information **/ /** in this document is provided "as is" without warranty of any kind and **/ /** is subject to change without notice. The warranties for HP products **/ /** are set forth in the express limited warranty statements accompanying **/ /** such products. Nothing herein should be construed as constituting an **/ /** additional warranty. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 30-Mar-2010 17:27:17 by OpenVMS SDL EV3-3 */ /* Source: 16-MAR-2004 16:51:56 $1$DGA7274:[LIB_H.SRC]DSRVDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $DSRVDEF ***/ #ifndef __DSRVDEF_LOADED #define __DSRVDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /*+ */ /* DSRV ( ) Definitions */ /* */ /* This module defines the main data structure of the MSCP */ /* server. This structure contains the values specified in */ /* the start up qualifiers when the server was loaded, the */ /* UQB vector table, and statistics that are kept for server */ /* performance measurements. */ /* */ /* <<== !NOTICE! ==>> */ /* */ /* DO NOT change offsets of the top part of the data structure. */ /* If new fields have to be added please add them to the */ /* end of the structure. */ /*- */ /*Max number of served units */ #define DSRV$M_LOG_ENABLD 0x1 #define DSRV$M_LOG_PRESENT 0x2 #define DSRV$M_PKT_LOGGED 0x4 #define DSRV$M_PKT_LOST 0x8 #define DSRV$M_LBSTEP1 0x10 #define DSRV$M_LBSTEP2 0x20 #define DSRV$M_LBEVENT 0x40 #define DSRV$M_HULB_DEL 0x80 #define DSRV$M_MON_ACTIVE 0x100 #define DSRV$M_LB_REQ 0x200 #define DSRV$M_CONFIG_WAIT 0x400 #define DSRV$C_LENGTH 41452 #define DSRV$K_LENGTH 41452 #define DSRV$K_AR_ADD 2 /* Action routine code */ #define DSRV$K_MAX_UNITS 9999 #define DSRV$S_DSRVDEF 41452 /* Old size name synonym */ #ifdef __cplusplus /* Define structure prototypes */ struct _fkb; #endif /* #ifdef __cplusplus */ typedef struct _dsrv { void *dsrv$l_flink; /* Field maintained for */ void *dsrv$l_blink; /* compatability */ unsigned short int dsrv$w_size; /* Structure size in bytes */ unsigned char dsrv$b_type; /* MSCP type structure */ unsigned char dsrv$b_subtype; /* with a DSRV subtype (1) */ __union { unsigned short int dsrv$w_state; /* Current state of the server */ __struct { unsigned dsrv$v_log_enabld : 1; /* Logging is enabled */ unsigned dsrv$v_log_present : 1; /* Logging code is present */ unsigned dsrv$v_pkt_logged : 1; /* A packet has been logged */ unsigned dsrv$v_pkt_lost : 1; /* One or more packets over- */ /* written since last read */ unsigned dsrv$v_lbstep1 : 1; /* Load balancing step1 active */ unsigned dsrv$v_lbstep2 : 1; /* Load balancing step2 active */ unsigned dsrv$v_lbevent : 1; /* An event of interest to LB has */ /* occured while STEP1 was active */ unsigned dsrv$v_hulb_del : 1; /* One or more HULBs to be deleted */ unsigned dsrv$v_mon_active : 1; /* The load monitor thread is active */ unsigned dsrv$v_lb_req : 1; /* A load balance request has been sent */ unsigned dsrv$v_config_wait : 1; /* Waiting for STACONFIG to complete */ unsigned dsrv$v_fill_2_ : 5; } dsrv$r_fill_1_; } dsrv$r_fill_0_; unsigned short int dsrv$w_bufwait; /*I/Os that had to wait */ void *dsrv$l_log_buf_start; /* Address of start of buffer */ void *dsrv$l_log_buf_end; /* Address of end of buffer */ void *dsrv$l_next_read; /* Adrs of next packet to read */ void *dsrv$l_next_write; /* Adrs of next packet to write */ unsigned short int dsrv$w_inc_lolim; /* Low unit number to log */ unsigned short int dsrv$w_inc_hilim; /* High unit number to log */ unsigned short int dsrv$w_exc_lolim; /* Low unit number not to log */ unsigned short int dsrv$w_exc_hilim; /* High unit number not to log */ void *dsrv$l_srvbuf; /* Address of preallocated pool */ void *dsrv$l_free_list; /* Pointer to head of free pool */ unsigned int dsrv$l_avail; /* Sum of bytes available in buffer */ unsigned int dsrv$l_buffer_min; /* Min xfer size based on buffer */ unsigned int dsrv$l_splitxfer; /* Fragmented I/O count */ __struct { /* Info returned in GCI cmd */ unsigned short int dsrv$w_version; /* Server software version */ unsigned short int dsrv$w_cflags; /* Controller flags */ unsigned short int dsrv$w_ctimo; /* Controller timeout */ unsigned short int dsrv$w_reserved; /* Reserved for alignment */ } dsrv$r_ctrl_info; unsigned __int64 dsrv$q_ctrl_id; /* Unique MSCP device identifier */ unsigned int dsrv$l_memw_tot; /* Number of I/Os that had to wait */ unsigned short int dsrv$w_memw_cnt; /* Requests in memory wait queue */ unsigned short int dsrv$w_memw_max; /* Most requests ever in MEMWAIT */ void *dsrv$l_memw_fl; /* Queue listhead for requests */ void *dsrv$l_memw_bl; /* in memory wait state */ unsigned short int dsrv$w_num_host; /* Count of hosts being served */ unsigned short int dsrv$w_num_unit; /* Count of disks being served */ void *dsrv$l_hqb_fl; /* Host queue block list head */ void *dsrv$l_hqb_bl; /* */ void *dsrv$l_uqb_fl; /* Unit queue block list head */ void *dsrv$l_uqb_bl; /* */ /* */ /* Server Load Balancing fields */ /* */ /* The following fields containing working information and statistics */ /* for the server load balancing function. Load balancing status bits */ /* are defined in DSRV$STATE above. Time fields are in EXE$GL_ABSTIM */ /* format. */ /* */ unsigned short int dsrv$w_load_avail; /* Current load available */ unsigned short int dsrv$w_load_capacity; /* Server load capacity */ unsigned short int dsrv$w_lbload; /* Target load for LB request */ unsigned short int dsrv$w_lbresp; /* Load available from other server */ unsigned short int dsrv$w_lm_load1; /* previous interval load 1 */ unsigned short int dsrv$w_lm_load2; /* previous interval load 2 */ unsigned short int dsrv$w_lm_load3; /* previous interval load 3 */ unsigned short int dsrv$w_lm_load4; /* previous interval load 4 */ unsigned short int dsrv$w_lbinit_cnt; /* Count of LB requests we have sent */ unsigned short int dsrv$w_lbfail_cnt; /* Count of LB requests that failed */ unsigned short int dsrv$w_lbreq_cnt; /* Count of LB requests from other servers */ unsigned short int dsrv$w_lbresp_cnt; /* Count of LB requests we to which we responded */ unsigned int dsrv$l_lbreq_time; /* Time last LB request was sent */ unsigned int dsrv$l_lbmon_time; /* Time of last LB monitor pass */ struct _fkb *dsrv$l_lm_fkb; /* Address of load monitor thread FKB */ struct _fkb *dsrv$l_lb_fkb; /* Address of load balance thread FKB */ unsigned short int dsrv$w_lm_interval; /* Load monitoring interval */ unsigned char dsrv$b_lb_count1; /* Counter for load balancing thread */ unsigned char dsrv$b_lb_count2; /* Counter for load balancing thread */ void *dsrv$l_hulb_fl; /* HULB queue listhead */ void *dsrv$l_hulb_bl; /* */ unsigned char dsrv$b_hosts [32]; /* Bit array of hosts served */ char dsrv$b_fill_3_ [12]; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __octaword #else #pragma __nomember_alignment #endif void *dsrv$l_units [9999]; /* Table of UQB addresses */ /* */ /* Statistics gathering fields */ /* */ /* Two tables are maintained below. The first table is made up of the */ /* frequency count for each of the opcodes received since the server */ /* was loaded. The opcode is used as an index into the table to its own */ /* frequency count (the zeroeth element contains a total count). The */ /* second table is made up of the frequency counters for all the */ /* different sized block transfers. For this table, the size of the */ /* transfer is the index into the table. */ /* */ #pragma __nomember_alignment char dsrv$b_fill_4_ [4]; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __struct { /* Op-code counters */ #pragma __nomember_alignment unsigned int dsrv$l_opcount; /* Total operations count */ unsigned int dsrv$l_abort_cnt; /* - 1 - */ unsigned int dsrv$l_get_cmd_cnt; /* - 2 - */ unsigned int dsrv$l_get_unt_cnt; /* - 3 - */ unsigned int dsrv$l_set_con_cnt; /* - 4 - */ unsigned int dsrv$l_acc_nvm_cnt; /* - 5 - */ unsigned int dsrv$l_display_cnt; /* - 6 - */ unsigned int dsrv$l_get_unn_cnt; /* - 7 - */ unsigned int dsrv$l_avail_cnt; /* - 8 - */ unsigned int dsrv$l_onlin_cnt; /* - 9 - */ unsigned int dsrv$l_set_unt_cnt; /* - 10 - */ unsigned int dsrv$l_det_acc_cnt; /* - 11 - */ unsigned int dsrv$l_move_cnt; /* - 12 - */ unsigned int dsrv$l_dcd_cnt; /* - 13 - */ unsigned int dsrv$l_reserved14; /* - 14 - */ unsigned int dsrv$l_reserved15; /* - 15 - */ unsigned int dsrv$l_acces_cnt; /* - 16 - */ unsigned int dsrv$l_cmp_con_cnt; /* - 17 - */ unsigned int dsrv$l_erase_cnt; /* - 18 - */ unsigned int dsrv$l_flush_cnt; /* - 19 - */ unsigned int dsrv$l_replc_cnt; /* - 20 - */ unsigned int dsrv$l_reserved21; /* - 21 - */ unsigned int dsrv$l_eraseg_cnt; /* - 22 - */ unsigned int dsrv$l_reserved22; /* - 23 - */ unsigned int dsrv$l_format_cnt; /* - 24 - */ unsigned int dsrv$l_wri_his_cnt; /* - 25 - */ unsigned int dsrv$l_reserved26; /* - 26 - */ unsigned int dsrv$l_reserved27; /* - 27 - */ unsigned int dsrv$l_reserved28; /* - 28 - */ unsigned int dsrv$l_reserved29; /* - 29 - */ unsigned int dsrv$l_reserved30; /* - 30 - */ unsigned int dsrv$l_reserved31; /* - 31 - */ unsigned int dsrv$l_cmp_hst_cnt; /* - 32 - */ unsigned int dsrv$l_read_cnt; /* - 33 - */ unsigned int dsrv$l_write_cnt; /* - 34 - */ unsigned int dsrv$l_rea_ced_cnt; /* - 35 - */ unsigned int dsrv$l_wri_tm_cnt; /* - 36 - */ unsigned int dsrv$l_repos_cnt; /* - 37 - */ unsigned int dsrv$l_reserved38; /* - 38 - */ unsigned int dsrv$l_reserved39; /* - 39 - */ unsigned int dsrv$l_reserved40; /* - 40 - */ unsigned int dsrv$l_reserved41; /* - 41 - */ unsigned int dsrv$l_reserved42; /* - 42 - */ unsigned int dsrv$l_reserved43; /* - 43 - */ unsigned int dsrv$l_reserved44; /* - 44 - */ unsigned int dsrv$l_reserved45; /* - 45 - */ unsigned int dsrv$l_reserved46; /* - 46 - */ unsigned int dsrv$l_reserved47; /* - 47 - */ unsigned int dsrv$l_terco_cnt; /* - 48 - */ char dsrv$b_fill_5_ [4]; } dsrv$r_opcode_cntrs; unsigned int dsrv$l_vcfail_cnt; /* Count of VC failures */ unsigned int dsrv$l_blkcount [257]; /* Counters for block xfer reqs */ unsigned int dsrv$l_pcb; /* Pointer to simulated PCB */ unsigned int dsrv$l_hrb_tmo_cntr; /* Counter for timed out HRB's */ unsigned int dsrv$l_seed; /* Seed for next host number. */ } DSRV; #if !defined(__VAXC) #define dsrv$w_state dsrv$r_fill_0_.dsrv$w_state #define dsrv$v_log_enabld dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_log_enabld #define dsrv$v_log_present dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_log_present #define dsrv$v_pkt_logged dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_pkt_logged #define dsrv$v_pkt_lost dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_pkt_lost #define dsrv$v_lbstep1 dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_lbstep1 #define dsrv$v_lbstep2 dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_lbstep2 #define dsrv$v_lbevent dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_lbevent #define dsrv$v_hulb_del dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_hulb_del #define dsrv$v_mon_active dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_mon_active #define dsrv$v_lb_req dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_lb_req #define dsrv$v_config_wait dsrv$r_fill_0_.dsrv$r_fill_1_.dsrv$v_config_wait #define dsrv$w_version dsrv$r_ctrl_info.dsrv$w_version #define dsrv$w_cflags dsrv$r_ctrl_info.dsrv$w_cflags #define dsrv$w_ctimo dsrv$r_ctrl_info.dsrv$w_ctimo #define dsrv$l_opcount dsrv$r_opcode_cntrs.dsrv$l_opcount #define dsrv$l_abort_cnt dsrv$r_opcode_cntrs.dsrv$l_abort_cnt #define dsrv$l_get_cmd_cnt dsrv$r_opcode_cntrs.dsrv$l_get_cmd_cnt #define dsrv$l_get_unt_cnt dsrv$r_opcode_cntrs.dsrv$l_get_unt_cnt #define dsrv$l_set_con_cnt dsrv$r_opcode_cntrs.dsrv$l_set_con_cnt #define dsrv$l_acc_nvm_cnt dsrv$r_opcode_cntrs.dsrv$l_acc_nvm_cnt #define dsrv$l_display_cnt dsrv$r_opcode_cntrs.dsrv$l_display_cnt #define dsrv$l_get_unn_cnt dsrv$r_opcode_cntrs.dsrv$l_get_unn_cnt #define dsrv$l_avail_cnt dsrv$r_opcode_cntrs.dsrv$l_avail_cnt #define dsrv$l_onlin_cnt dsrv$r_opcode_cntrs.dsrv$l_onlin_cnt #define dsrv$l_set_unt_cnt dsrv$r_opcode_cntrs.dsrv$l_set_unt_cnt #define dsrv$l_det_acc_cnt dsrv$r_opcode_cntrs.dsrv$l_det_acc_cnt #define dsrv$l_move_cnt dsrv$r_opcode_cntrs.dsrv$l_move_cnt #define dsrv$l_dcd_cnt dsrv$r_opcode_cntrs.dsrv$l_dcd_cnt #define dsrv$l_acces_cnt dsrv$r_opcode_cntrs.dsrv$l_acces_cnt #define dsrv$l_cmp_con_cnt dsrv$r_opcode_cntrs.dsrv$l_cmp_con_cnt #define dsrv$l_erase_cnt dsrv$r_opcode_cntrs.dsrv$l_erase_cnt #define dsrv$l_flush_cnt dsrv$r_opcode_cntrs.dsrv$l_flush_cnt #define dsrv$l_replc_cnt dsrv$r_opcode_cntrs.dsrv$l_replc_cnt #define dsrv$l_eraseg_cnt dsrv$r_opcode_cntrs.dsrv$l_eraseg_cnt #define dsrv$l_format_cnt dsrv$r_opcode_cntrs.dsrv$l_format_cnt #define dsrv$l_wri_his_cnt dsrv$r_opcode_cntrs.dsrv$l_wri_his_cnt #define dsrv$l_cmp_hst_cnt dsrv$r_opcode_cntrs.dsrv$l_cmp_hst_cnt #define dsrv$l_read_cnt dsrv$r_opcode_cntrs.dsrv$l_read_cnt #define dsrv$l_write_cnt dsrv$r_opcode_cntrs.dsrv$l_write_cnt #define dsrv$l_rea_ced_cnt dsrv$r_opcode_cntrs.dsrv$l_rea_ced_cnt #define dsrv$l_wri_tm_cnt dsrv$r_opcode_cntrs.dsrv$l_wri_tm_cnt #define dsrv$l_repos_cnt dsrv$r_opcode_cntrs.dsrv$l_repos_cnt #define dsrv$l_terco_cnt dsrv$r_opcode_cntrs.dsrv$l_terco_cnt #endif /* #if !defined(__VAXC) */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __DSRVDEF_LOADED */