Lines Matching refs:nvl

69 		rc = nvlist_add_##type(nvl, #field, structure->field);  \
77 rc = nvlist_add_##type##_array(nvl, #field, \
89 rc = nvlist_add_##type##_array(nvl, #field, \
97 rc = stmf_ic_scsi_devid_desc_marshal(nvl, #field, \
105 rc = stmf_ic_remote_port_marshal(nvl, #field, \
126 rc = nvlist_lookup_##type(nvl, #field, \
148 rc = nvlist_lookup_##type(nvl, #field, &tmp); \
166 rc = nvlist_lookup_boolean_value(nvl, #field, &tmp); \
259 static int stmf_ic_reg_port_msg_marshal(nvlist_t *nvl, void *msg);
260 static int stmf_ic_dereg_port_msg_marshal(nvlist_t *nvl, void *msg);
261 static int stmf_ic_reg_dereg_lun_msg_marshal(nvlist_t *nvl, void *msg);
262 static int stmf_ic_scsi_cmd_msg_marshal(nvlist_t *nvl, void *msg);
263 static int stmf_ic_scsi_data_msg_marshal(nvlist_t *nvl, void *msg);
264 static int stmf_ic_scsi_data_xfer_done_msg_marshal(nvlist_t *nvl, void *msg);
265 static int stmf_ic_scsi_status_msg_marshal(nvlist_t *nvl, void *msg);
266 static int stmf_ic_r2t_msg_marshal(nvlist_t *nvl, void *msg);
267 static int stmf_ic_status_msg_marshal(nvlist_t *nvl, void *msg);
268 static int stmf_ic_session_create_destroy_msg_marshal(nvlist_t *nvl, void *msg);
269 static int stmf_ic_echo_request_reply_msg_marshal(nvlist_t *nvl, void *msg);
278 static stmf_ic_msg_t *stmf_ic_msg_unmarshal(nvlist_t *nvl);
279 static void *stmf_ic_reg_port_msg_unmarshal(nvlist_t *nvl);
280 static void *stmf_ic_dereg_port_msg_unmarshal(nvlist_t *nvl);
281 static void *stmf_ic_reg_dereg_lun_msg_unmarshal(nvlist_t *nvl);
282 static void *stmf_ic_scsi_cmd_msg_unmarshal(nvlist_t *nvl);
283 static void *stmf_ic_scsi_data_msg_unmarshal(nvlist_t *nvl);
284 static void *stmf_ic_scsi_data_xfer_done_msg_unmarshal(nvlist_t *nvl);
285 static void *stmf_ic_scsi_status_msg_unmarshal(nvlist_t *nvl);
286 static void *stmf_ic_r2t_msg_unmarshal(nvlist_t *nvl);
287 static void *stmf_ic_status_msg_unmarshal(nvlist_t *nvl);
288 static void *stmf_ic_session_create_destroy_msg_unmarshal(nvlist_t *nvl);
289 static void *stmf_ic_echo_request_reply_msg_unmarshal(nvlist_t *nvl);
291 nvlist_t *nvl, char *field_name);
294 static uint8_t *stmf_ic_uint8_array_unmarshal(nvlist_t *nvl, char *field_name,
296 static char *stmf_ic_string_unmarshal(nvlist_t *nvl, char *field_name);
298 nvlist_t *nvl, char *field_name);
299 static stmf_remote_port_t *stmf_ic_remote_port_unmarshal(nvlist_t *nvl);
328 nvlist_t *nvl = NULL; in stmf_ic_tx_msg() local
333 nvl = stmf_ic_msg_marshal(msg); in stmf_ic_tx_msg()
334 if (!nvl) { in stmf_ic_tx_msg()
340 err = nvlist_size(nvl, &size, NV_ENCODE_XDR); in stmf_ic_tx_msg()
347 err = nvlist_pack(nvl, &buf, &size, NV_ENCODE_XDR, 0); in stmf_ic_tx_msg()
358 nvlist_free(nvl); in stmf_ic_tx_msg()
433 nvlist_t *nvl = NULL; in stmf_ic_rx_msg() local
439 rc = nvlist_unpack(buf, len, &nvl, 0); in stmf_ic_rx_msg()
445 m = stmf_ic_msg_unmarshal(nvl); in stmf_ic_rx_msg()
448 nvlist_free(nvl); in stmf_ic_rx_msg()
1103 nvlist_t *nvl = NULL; in stmf_ic_msg_marshal() local
1106 rc = nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP); in stmf_ic_msg_marshal()
1115 rc = stmf_ic_reg_port_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1120 rc = stmf_ic_dereg_port_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1126 rc = stmf_ic_reg_dereg_lun_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1130 rc = stmf_ic_scsi_cmd_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1134 rc = stmf_ic_scsi_data_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1138 rc = stmf_ic_scsi_data_xfer_done_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1142 rc = stmf_ic_scsi_status_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1146 rc = stmf_ic_r2t_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1150 rc = stmf_ic_status_msg_marshal(nvl, msg->icm_msg); in stmf_ic_msg_marshal()
1155 rc = stmf_ic_session_create_destroy_msg_marshal(nvl, in stmf_ic_msg_marshal()
1161 rc = stmf_ic_echo_request_reply_msg_marshal(nvl, in stmf_ic_msg_marshal()
1175 return (nvl); in stmf_ic_msg_marshal()
1177 nvlist_free(nvl); in stmf_ic_msg_marshal()
1184 stmf_ic_reg_port_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_reg_port_msg_marshal() argument
1203 stmf_ic_dereg_port_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_dereg_port_msg_marshal() argument
1226 stmf_ic_reg_dereg_lun_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_reg_dereg_lun_msg_marshal() argument
1245 stmf_ic_scsi_cmd_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_scsi_cmd_msg_marshal() argument
1280 stmf_ic_scsi_data_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_scsi_data_msg_marshal() argument
1296 stmf_ic_scsi_data_xfer_done_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_scsi_data_xfer_done_msg_marshal() argument
1311 stmf_ic_scsi_status_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_scsi_status_msg_marshal() argument
1334 stmf_ic_r2t_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_r2t_msg_marshal() argument
1349 stmf_ic_status_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_status_msg_marshal() argument
1363 stmf_ic_session_create_destroy_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_session_create_destroy_msg_marshal() argument
1379 stmf_ic_echo_request_reply_msg_marshal(nvlist_t *nvl, void *msg) in stmf_ic_echo_request_reply_msg_marshal() argument
1402 nvlist_t *nvl = NULL; in stmf_ic_scsi_devid_desc_marshal() local
1404 rc = nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP); in stmf_ic_scsi_devid_desc_marshal()
1415 rc = nvlist_add_uint8_array(nvl, "ident", sdid->ident, in stmf_ic_scsi_devid_desc_marshal()
1420 rc = nvlist_add_nvlist(parent_nvl, sdid_name, nvl); in stmf_ic_scsi_devid_desc_marshal()
1422 if (nvl) { in stmf_ic_scsi_devid_desc_marshal()
1423 nvlist_free(nvl); in stmf_ic_scsi_devid_desc_marshal()
1437 nvlist_t *nvl = NULL; in stmf_ic_remote_port_marshal() local
1439 rc = nvlist_alloc(&nvl, NV_UNIQUE_NAME, KM_SLEEP); in stmf_ic_remote_port_marshal()
1444 rc = nvlist_add_uint8_array(nvl, "rport_tptid", in stmf_ic_remote_port_marshal()
1449 rc = nvlist_add_nvlist(parent_nvl, rport_name, nvl); in stmf_ic_remote_port_marshal()
1451 if (nvl) { in stmf_ic_remote_port_marshal()
1452 nvlist_free(nvl); in stmf_ic_remote_port_marshal()
1462 stmf_ic_msg_unmarshal(nvlist_t *nvl) in stmf_ic_msg_unmarshal() argument
1475 rc = nvlist_lookup_uint8(nvl, "icm_msg_type", &msg_type); in stmf_ic_msg_unmarshal()
1482 m->icm_nvlist = nvl; in stmf_ic_msg_unmarshal()
1489 m->icm_msg = stmf_ic_reg_port_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1494 m->icm_msg = stmf_ic_dereg_port_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1500 m->icm_msg = stmf_ic_reg_dereg_lun_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1504 m->icm_msg = stmf_ic_scsi_cmd_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1508 m->icm_msg = stmf_ic_scsi_data_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1512 m->icm_msg = stmf_ic_scsi_data_xfer_done_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1516 m->icm_msg = stmf_ic_scsi_status_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1520 m->icm_msg = stmf_ic_r2t_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1524 m->icm_msg = stmf_ic_status_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1529 m->icm_msg = stmf_ic_session_create_destroy_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1534 m->icm_msg = stmf_ic_echo_request_reply_msg_unmarshal(nvl); in stmf_ic_msg_unmarshal()
1556 stmf_ic_reg_port_msg_unmarshal(nvlist_t *nvl) in stmf_ic_reg_port_msg_unmarshal() argument
1562 rc = nvlist_lookup_nvlist(nvl, "icrp_port_id", &nvl_port_id); in stmf_ic_reg_port_msg_unmarshal()
1580 m->icrp_cb_arg = stmf_ic_uint8_array_unmarshal(nvl, in stmf_ic_reg_port_msg_unmarshal()
1604 stmf_ic_dereg_port_msg_unmarshal(nvlist_t *nvl) in stmf_ic_dereg_port_msg_unmarshal() argument
1610 rc = nvlist_lookup_nvlist(nvl, "icdp_port_id", &nvl_port_id); in stmf_ic_dereg_port_msg_unmarshal()
1626 m->icdp_cb_arg = stmf_ic_uint8_array_unmarshal(nvl, in stmf_ic_dereg_port_msg_unmarshal()
1645 stmf_ic_reg_dereg_lun_msg_unmarshal(nvlist_t *nvl) in stmf_ic_reg_dereg_lun_msg_unmarshal() argument
1650 if (! stmf_ic_uint8_array_unmarshal(nvl, "icrl_lun_id", in stmf_ic_reg_dereg_lun_msg_unmarshal()
1657 m->icrl_lu_provider_name = stmf_ic_string_unmarshal(nvl, in stmf_ic_reg_dereg_lun_msg_unmarshal()
1669 m->icrl_cb_arg = stmf_ic_uint8_array_unmarshal(nvl, in stmf_ic_reg_dereg_lun_msg_unmarshal()
1688 stmf_ic_scsi_cmd_msg_unmarshal(nvlist_t *nvl) in stmf_ic_scsi_cmd_msg_unmarshal() argument
1693 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_scsi_cmd_msg_unmarshal()
1708 nvl, "icsc_ini_devid"); in stmf_ic_scsi_cmd_msg_unmarshal()
1716 nvl, "icsc_tgt_devid"); in stmf_ic_scsi_cmd_msg_unmarshal()
1724 nvl, "icsc_rport"); in stmf_ic_scsi_cmd_msg_unmarshal()
1732 if (!stmf_ic_uint8_array_unmarshal(nvl, "icsc_lun_id", in stmf_ic_scsi_cmd_msg_unmarshal()
1740 if (!stmf_ic_uint8_array_unmarshal(nvl, "icsc_task_lun_no", in stmf_ic_scsi_cmd_msg_unmarshal()
1749 m->icsc_task_cdb = stmf_ic_uint8_array_unmarshal(nvl, in stmf_ic_scsi_cmd_msg_unmarshal()
1760 m->icsc_immed_data = stmf_ic_uint8_array_unmarshal(nvl, in stmf_ic_scsi_cmd_msg_unmarshal()
1779 stmf_ic_scsi_data_msg_unmarshal(nvlist_t *nvl) in stmf_ic_scsi_data_msg_unmarshal() argument
1784 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_scsi_data_msg_unmarshal()
1794 if (!stmf_ic_uint8_array_unmarshal(nvl, "icsd_lun_id", in stmf_ic_scsi_data_msg_unmarshal()
1801 m->icsd_data = stmf_ic_uint8_array_unmarshal(nvl, "icsd_data", in stmf_ic_scsi_data_msg_unmarshal()
1819 stmf_ic_scsi_data_xfer_done_msg_unmarshal(nvlist_t *nvl) in stmf_ic_scsi_data_xfer_done_msg_unmarshal() argument
1825 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_scsi_data_xfer_done_msg_unmarshal()
1845 stmf_ic_scsi_status_msg_unmarshal(nvlist_t *nvl) in stmf_ic_scsi_status_msg_unmarshal() argument
1850 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_scsi_status_msg_unmarshal()
1864 if (!stmf_ic_uint8_array_unmarshal(nvl, "icss_lun_id", in stmf_ic_scsi_status_msg_unmarshal()
1872 m->icss_sense = stmf_ic_uint8_array_unmarshal(nvl, "icss_sense", in stmf_ic_scsi_status_msg_unmarshal()
1890 stmf_ic_r2t_msg_unmarshal(nvlist_t *nvl) in stmf_ic_r2t_msg_unmarshal() argument
1895 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_r2t_msg_unmarshal()
1916 stmf_ic_session_create_destroy_msg_unmarshal(nvlist_t *nvl) in stmf_ic_session_create_destroy_msg_unmarshal() argument
1922 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_session_create_destroy_msg_unmarshal()
1931 nvl, "icscd_ini_devid"); in stmf_ic_session_create_destroy_msg_unmarshal()
1939 nvl, "icscd_tgt_devid"); in stmf_ic_session_create_destroy_msg_unmarshal()
1947 nvl, "icscd_rport"); in stmf_ic_session_create_destroy_msg_unmarshal()
1964 stmf_ic_echo_request_reply_msg_unmarshal(nvlist_t *nvl) in stmf_ic_echo_request_reply_msg_unmarshal() argument
1970 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_echo_request_reply_msg_unmarshal()
1980 m->icerr_data = stmf_ic_uint8_array_unmarshal(nvl, in stmf_ic_echo_request_reply_msg_unmarshal()
1999 stmf_ic_status_msg_unmarshal(nvlist_t *nvl) in stmf_ic_status_msg_unmarshal() argument
2004 if (nvlist_lookup_pairs(nvl, 0, in stmf_ic_status_msg_unmarshal()
2024 stmf_ic_lookup_scsi_devid_desc_and_unmarshal(nvlist_t *nvl, char *field_name) in stmf_ic_lookup_scsi_devid_desc_and_unmarshal() argument
2030 rc = nvlist_lookup_nvlist(nvl, field_name, &nvl_devid); in stmf_ic_lookup_scsi_devid_desc_and_unmarshal()
2043 stmf_ic_scsi_devid_desc_unmarshal(nvlist_t *nvl) in stmf_ic_scsi_devid_desc_unmarshal() argument
2054 rc = nvlist_lookup_uint8(nvl, "ident_length", &ident_length); in stmf_ic_scsi_devid_desc_unmarshal()
2069 if (!stmf_ic_uint8_array_unmarshal(nvl, "ident", in stmf_ic_scsi_devid_desc_unmarshal()
2085 stmf_ic_lookup_remote_port_and_unmarshal(nvlist_t *nvl, char *field_name) in stmf_ic_lookup_remote_port_and_unmarshal() argument
2089 if (nvlist_lookup_nvlist(nvl, field_name, &nvl_rport) != 0) in stmf_ic_lookup_remote_port_and_unmarshal()
2096 stmf_ic_remote_port_unmarshal(nvlist_t *nvl) in stmf_ic_remote_port_unmarshal() argument
2102 rc = nvlist_lookup_uint16(nvl, "rport_tptid_sz", &rport_tptid_sz); in stmf_ic_remote_port_unmarshal()
2107 if (!stmf_ic_uint8_array_unmarshal(nvl, "rport_tptid", rport_tptid_sz, in stmf_ic_remote_port_unmarshal()
2130 nvlist_t *nvl, in stmf_ic_uint8_array_unmarshal() argument
2139 rc = nvlist_lookup_uint8_array(nvl, field_name, &array, &actual_len); in stmf_ic_uint8_array_unmarshal()
2169 nvlist_t *nvl, in stmf_ic_string_unmarshal() argument
2175 rc = nvlist_lookup_string(nvl, field_name, &s); in stmf_ic_string_unmarshal()