/* * 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 { … }; enum { … }; enum { … }; enum { … }; enum srp_login_rej_reason { … }; enum { … }; struct srp_direct_buf { … }; /* * 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 { … }; /* Immediate data buffer descriptor as defined in SRP2. */ struct srp_imm_buf { … }; /* srp_login_req.flags */ enum { … }; struct srp_login_req { … }; /** * 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 { … }; /* srp_login_rsp.rsp_flags */ enum { … }; /* * 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 { … }; struct srp_login_rej { … }; struct srp_i_logout { … }; struct srp_t_logout { … }; struct srp_tsk_mgmt { … }; struct srp_cmd { … }; enum { … }; /* * 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 { … }; struct srp_cred_req { … }; struct srp_cred_rsp { … }; /* * 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 { … }; struct srp_aer_rsp { … }; #endif /* SCSI_SRP_H */