Server IP : 103.169.32.36 / Your IP : 216.73.217.13 Web Server : Apache System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : apache ( 48) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/build/include/scsi/ |
Upload File : |
| Current File : /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/build/include/scsi/srp.h |
/*
* Copyright (c) 2005 Cisco Systems. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* OpenIB.org BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* $Id$
*/
#ifndef SCSI_SRP_H
#define SCSI_SRP_H
/*
* Structures and constants for the SCSI RDMA Protocol (SRP) as
* defined by the INCITS T10 committee. This file was written using
* draft Revision 16a of the SRP standard.
*/
#include <linux/types.h>
#include <scsi/scsi.h>
enum {
SRP_LOGIN_REQ = 0x00,
SRP_TSK_MGMT = 0x01,
SRP_CMD = 0x02,
SRP_I_LOGOUT = 0x03,
SRP_LOGIN_RSP = 0xc0,
SRP_RSP = 0xc1,
SRP_LOGIN_REJ = 0xc2,
SRP_T_LOGOUT = 0x80,
SRP_CRED_REQ = 0x81,
SRP_AER_REQ = 0x82,
SRP_CRED_RSP = 0x41,
SRP_AER_RSP = 0x42
};
enum {
SRP_BUF_FORMAT_DIRECT = 1 << 1,
SRP_BUF_FORMAT_INDIRECT = 1 << 2
};
enum {
SRP_NO_DATA_DESC = 0,
SRP_DATA_DESC_DIRECT = 1,
SRP_DATA_DESC_INDIRECT = 2
};
enum {
SRP_TSK_ABORT_TASK = 0x01,
SRP_TSK_ABORT_TASK_SET = 0x02,
SRP_TSK_CLEAR_TASK_SET = 0x04,
SRP_TSK_LUN_RESET = 0x08,
SRP_TSK_CLEAR_ACA = 0x40
};
enum srp_login_rej_reason {
SRP_LOGIN_REJ_UNABLE_ESTABLISH_CHANNEL = 0x00010000,
SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES = 0x00010001,
SRP_LOGIN_REJ_REQ_IT_IU_LENGTH_TOO_LARGE = 0x00010002,
SRP_LOGIN_REJ_UNABLE_ASSOCIATE_CHANNEL = 0x00010003,
SRP_LOGIN_REJ_UNSUPPORTED_DESCRIPTOR_FMT = 0x00010004,
SRP_LOGIN_REJ_MULTI_CHANNEL_UNSUPPORTED = 0x00010005,
SRP_LOGIN_REJ_CHANNEL_LIMIT_REACHED = 0x00010006
};
enum {
SRP_REV10_IB_IO_CLASS = 0xff00,
SRP_REV16A_IB_IO_CLASS = 0x0100
};
struct srp_direct_buf {
__be64 va;
__be32 key;
__be32 len;
};
/*
* We need the packed attribute because the SRP spec puts the list of
* descriptors at an offset of 20, which is not aligned to the size of
* struct srp_direct_buf. The whole structure must be packed to avoid
* having the 20-byte structure padded to 24 bytes on 64-bit architectures.
*/
struct srp_indirect_buf {
struct srp_direct_buf table_desc;
__be32 len;
struct srp_direct_buf desc_list[0];
} __attribute__((packed));
enum {
SRP_MULTICHAN_SINGLE = 0,
SRP_MULTICHAN_MULTI = 1
};
struct srp_login_req {
u8 opcode;
u8 reserved1[7];
u64 tag;
__be32 req_it_iu_len;
u8 reserved2[4];
__be16 req_buf_fmt;
u8 req_flags;
u8 reserved3[5];
u8 initiator_port_id[16];
u8 target_port_id[16];
};
/**
* struct srp_login_req_rdma - RDMA/CM login parameters.
*
* RDMA/CM over InfiniBand can only carry 92 - 36 = 56 bytes of private
* data. The %srp_login_req_rdma structure contains the same information as
* %srp_login_req but with the reserved data removed.
*/
struct srp_login_req_rdma {
u64 tag;
__be16 req_buf_fmt;
u8 req_flags;
u8 opcode;
__be32 req_it_iu_len;
u8 initiator_port_id[16];
u8 target_port_id[16];
};
/*
* The SRP spec defines the size of the LOGIN_RSP structure to be 52
* bytes, so it needs to be packed to avoid having it padded to 56
* bytes on 64-bit architectures.
*/
struct srp_login_rsp {
u8 opcode;
u8 reserved1[3];
__be32 req_lim_delta;
u64 tag;
__be32 max_it_iu_len;
__be32 max_ti_iu_len;
__be16 buf_fmt;
u8 rsp_flags;
u8 reserved2[25];
} __attribute__((packed));
struct srp_login_rej {
u8 opcode;
u8 reserved1[3];
__be32 reason;
u64 tag;
u8 reserved2[8];
__be16 buf_fmt;
u8 reserved3[6];
};
struct srp_i_logout {
u8 opcode;
u8 reserved[7];
u64 tag;
};
struct srp_t_logout {
u8 opcode;
u8 sol_not;
u8 reserved[2];
__be32 reason;
u64 tag;
};
/*
* We need the packed attribute because the SRP spec only aligns the
* 8-byte LUN field to 4 bytes.
*/
struct srp_tsk_mgmt {
u8 opcode;
u8 sol_not;
u8 reserved1[6];
u64 tag;
u8 reserved2[4];
struct scsi_lun lun;
u8 reserved3[2];
u8 tsk_mgmt_func;
u8 reserved4;
u64 task_tag;
u8 reserved5[8];
};
/*
* We need the packed attribute because the SRP spec only aligns the
* 8-byte LUN field to 4 bytes.
*/
struct srp_cmd {
u8 opcode;
u8 sol_not;
u8 reserved1[3];
u8 buf_fmt;
u8 data_out_desc_cnt;
u8 data_in_desc_cnt;
u64 tag;
u8 reserved2[4];
struct scsi_lun lun;
u8 reserved3;
u8 task_attr;
u8 reserved4;
u8 add_cdb_len;
u8 cdb[16];
u8 add_data[0];
};
enum {
SRP_RSP_FLAG_RSPVALID = 1 << 0,
SRP_RSP_FLAG_SNSVALID = 1 << 1,
SRP_RSP_FLAG_DOOVER = 1 << 2,
SRP_RSP_FLAG_DOUNDER = 1 << 3,
SRP_RSP_FLAG_DIOVER = 1 << 4,
SRP_RSP_FLAG_DIUNDER = 1 << 5
};
/*
* The SRP spec defines the size of the RSP structure to be 36 bytes,
* so it needs to be packed to avoid having it padded to 40 bytes on
* 64-bit architectures.
*/
struct srp_rsp {
u8 opcode;
u8 sol_not;
u8 reserved1[2];
__be32 req_lim_delta;
u64 tag;
u8 reserved2[2];
u8 flags;
u8 status;
__be32 data_out_res_cnt;
__be32 data_in_res_cnt;
__be32 sense_data_len;
__be32 resp_data_len;
u8 data[0];
} __attribute__((packed));
struct srp_cred_req {
u8 opcode;
u8 sol_not;
u8 reserved[2];
__be32 req_lim_delta;
u64 tag;
};
struct srp_cred_rsp {
u8 opcode;
u8 reserved[7];
u64 tag;
};
/*
* The SRP spec defines the fixed portion of the AER_REQ structure to be
* 36 bytes, so it needs to be packed to avoid having it padded to 40 bytes
* on 64-bit architectures.
*/
struct srp_aer_req {
u8 opcode;
u8 sol_not;
u8 reserved[2];
__be32 req_lim_delta;
u64 tag;
u32 reserved2;
struct scsi_lun lun;
__be32 sense_data_len;
u32 reserved3;
u8 sense_data[0];
} __attribute__((packed));
struct srp_aer_rsp {
u8 opcode;
u8 reserved[7];
u64 tag;
};
#endif /* SCSI_SRP_H */
| N4m3 |
5!z3 |
L45t M0d!f!3d |
0wn3r / Gr0up |
P3Rm!55!0n5 |
0pt!0n5 |
| .. |
-- |
January 19 2024 08:12:51 |
0 / 0 |
0755 |
|
| fc |
-- |
January 19 2024 08:12:51 |
0 / 0 |
0755 |
|
| | | | | |
| fc_encode.h |
21.636 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| fc_frame.h |
6.897 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| fcoe_sysfs.h |
3.753 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| iscsi_if.h |
26.071 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| iscsi_proto.h |
16.064 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| iser.h |
2.341 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| libfc.h |
33.986 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| libfcoe.h |
13.814 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| libiscsi.h |
13.856 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| libiscsi_tcp.h |
4.242 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| libsas.h |
19.068 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| libsrp.h |
1.544 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| osd_attributes.h |
15.012 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| osd_initiator.h |
16.253 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| osd_ore.h |
5.337 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| osd_protocol.h |
17.623 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| osd_sec.h |
1.485 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| osd_sense.h |
9.89 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| osd_types.h |
0.997 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| sas.h |
12.208 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| sas_ata.h |
2.734 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi.h |
17.992 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_bsg_iscsi.h |
2.826 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_cmnd.h |
9.398 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_dbg.h |
2.073 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_device.h |
23.722 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_devinfo.h |
2.267 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_dh.h |
2.828 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_driver.h |
0.907 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_eh.h |
2.74 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_host.h |
30.871 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_ioctl.h |
1.229 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_tcq.h |
4.961 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_tgt.h |
0.788 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_tgt_if.h |
2.474 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_transport.h |
3.909 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_transport_fc.h |
27.21 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_transport_iscsi.h |
17.203 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_transport_sas.h |
6.719 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_transport_spi.h |
7.129 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsi_transport_srp.h |
3.813 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| scsicam.h |
0.658 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| sg.h |
11.994 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|
| srp.h |
6.526 KB |
November 06 2023 09:15:52 |
0 / 0 |
0644 |
|