iser_idm.c revision aedf2b3bb56b025fcaf87b49ec6c8aeea07f16d7
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * CDDL HEADER START
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * The contents of this file are subject to the terms of the
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * Common Development and Distribution License (the "License").
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * You may not use this file except in compliance with the License.
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * See the License for the specific language governing permissions
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * and limitations under the License.
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * When distributing Covered Code, include this CDDL HEADER in each
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * If applicable, add the following below this CDDL HEADER, with the
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * fields enclosed by brackets "[]" replaced with your own identifying
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * information: Portions Copyright [yyyy] [name of copyright owner]
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * CDDL HEADER END
24fe0b3bf671e123467ce1df0b67cadd3614c8e4jmcp * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * Use is subject to license terms.
8696d418011068e5cedf3a229f7a6613e7798e92ky * iSER transport routines
8696d418011068e5cedf3a229f7a6613e7798e92ky * All transport functions except iser_tgt_svc_create() are called through
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * the ops vector, iser_tgt_svc_create() is called from the async handler
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard * inaddition to being called by the ULP
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic void iser_pdu_tx(idm_conn_t *ic, idm_pdu_t *pdu);
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic idm_status_t iser_buf_tx_to_ini(idm_task_t *idt, idm_buf_t *idb);
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic idm_status_t iser_buf_rx_from_ini(idm_task_t *idt, idm_buf_t *idb);
24fe0b3bf671e123467ce1df0b67cadd3614c8e4jmcpstatic idm_status_t iser_tgt_enable_datamover(idm_conn_t *ic);
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic idm_status_t iser_ini_enable_datamover(idm_conn_t *ic);
75ce41a57ff334bd8fe2cb9ed51eea835892f944Ali Bahramistatic void iser_notice_key_values(struct idm_conn_s *ic,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic kv_status_t iser_declare_key_values(struct idm_conn_s *ic,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic idm_status_t iser_free_task_rsrcs(idm_task_t *idt);
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic kv_status_t iser_negotiate_key_values(idm_conn_t *ic,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard nvlist_t *request_nvl, nvlist_t *response_nvl, nvlist_t *negotiated_nvl);
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic kv_status_t iser_handle_numerical(nvpair_t *nvp, uint64_t value,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard const idm_kv_xlate_t *ikvx, uint64_t min_value, uint64_t max_value,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard uint64_t iser_max_value, nvlist_t *request_nvl, nvlist_t *response_nvl,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic kv_status_t iser_handle_boolean(nvpair_t *nvp, boolean_t value,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willard const idm_kv_xlate_t *ikvx, boolean_t iser_value, nvlist_t *request_nvl,
8696d418011068e5cedf3a229f7a6613e7798e92ky const idm_kv_xlate_t *ikvx, nvlist_t *request_nvl, nvlist_t *response_nvl,
8696d418011068e5cedf3a229f7a6613e7798e92kystatic kv_status_t iser_handle_key(nvpair_t *nvp, const idm_kv_xlate_t *ikvx,
8696d418011068e5cedf3a229f7a6613e7798e92ky nvlist_t *request_nvl, nvlist_t *response_nvl, nvlist_t *negotiated_nvl);
8696d418011068e5cedf3a229f7a6613e7798e92kystatic kv_status_t iser_process_request_nvlist(nvlist_t *request_nvl,
8696d418011068e5cedf3a229f7a6613e7798e92kystatic idm_status_t iser_buf_alloc(idm_buf_t *idb, uint64_t buflen);
8696d418011068e5cedf3a229f7a6613e7798e92kystatic idm_status_t iser_tgt_svc_online(struct idm_svc_s *is);
8696d418011068e5cedf3a229f7a6613e7798e92kystatic idm_status_t iser_tgt_conn_connect(struct idm_conn_s *ic);
8696d418011068e5cedf3a229f7a6613e7798e92kystatic idm_status_t iser_ini_conn_create(idm_conn_req_t *cr,
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic void iser_conn_destroy(struct idm_conn_s *ic);
4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6willardstatic idm_status_t iser_ini_conn_connect(struct idm_conn_s *ic);
return (DDI_FAILURE);
return (DDI_SUCCESS);
static idm_status_t
return (IDM_STATUS_FAIL);
case AF_INET:
case AF_INET6:
return (IDM_STATUS_SUCCESS);
static idm_status_t
return (IDM_STATUS_FAIL);
return (IDM_STATUS_SUCCESS);
int rc;
return (IDM_STATUS_FAIL);
return (IDM_STATUS_SUCCESS);
static idm_status_t
return (IDM_STATUS_FAIL);
return (IDM_STATUS_SUCCESS);
static idm_status_t
return (IDM_STATUS_SUCCESS);
static idm_status_t
return (IDM_STATUS_SUCCESS);
static idm_status_t
int status;
return (IDM_STATUS_FAIL);
return (IDM_STATUS_SUCCESS);
return (IDM_STATUS_FAIL);
return (IDM_STATUS_SUCCESS);
static kv_status_t
return (kvrc);
static kv_status_t
char *nvp_name;
return (kvrc);
static kv_status_t
int nvrc;
case KI_RDMA_EXTENSIONS:
case KI_IMMEDIATE_DATA:
case KI_IFMARKER:
case KI_OFMARKER:
case KI_HEADER_DIGEST:
case KI_DATA_DIGEST:
case KI_RDMA_EXTENSIONS:
case KI_IMMEDIATE_DATA:
case KI_OFMARKER:
case KI_IFMARKER:
return (kvrc);
static kv_status_t
int nvrc = 0;
char *digest_choice_string;
if (nvrc == 0) {
return (kvrc);
static kv_status_t
int nvrc;
nvrc = 0;
return (kvrc);
static kv_status_t
int nvrc;
nvrc = 0;
return (kvrc);
static kv_status_t
int nvrc = 0;
int rc;
if (outgoing_nvl) {
return (kvrc);
int nvrc;
#ifdef ISER_DEBUG
static boolean_t
* with the completion status. See iser_cq.c for more
static idm_status_t
return (idm_status);
static idm_status_t
return (idm_status);
static idm_status_t
return (IDM_STATUS_FAIL);
return (IDM_STATUS_FAIL);
return (IDM_STATUS_SUCCESS);
static idm_status_t
int status;
iser_buf =
return (status);
return (IDM_STATUS_SUCCESS);
return (status);