Lines Matching refs:pdu
387 struct cmd_client_probe_pdu pdu; in probe_client() local
395 pdu.flags = __le64_to_cpu(FIO_PROBE_FLAG_ZLIB); in probe_client()
397 pdu.flags = 0; in probe_client()
401 memset(pdu.server, 0, sizeof(pdu.server)); in probe_client()
402 strncpy((char *) pdu.server, sname, sizeof(pdu.server) - 1); in probe_client()
404 fio_net_send_cmd(client->fd, FIO_NET_CMD_PROBE, &pdu, sizeof(pdu), &tag, &client->cmd_list); in probe_client()
565 void *pdu; in send_client_cmd_line() local
586 pdu = malloc(mem); in send_client_cmd_line()
587 clp = pdu; in send_client_cmd_line()
593 cslp = pdu + offset; in send_client_cmd_line()
602 ret = fio_net_send_cmd(client->fd, FIO_NET_CMD_JOBLINE, pdu, mem, NULL, NULL); in send_client_cmd_line()
603 free(pdu); in send_client_cmd_line()
670 struct cmd_load_file_pdu *pdu; in __fio_client_send_remote_ini() local
676 p_size = sizeof(*pdu) + strlen(filename) + 1; in __fio_client_send_remote_ini()
677 pdu = malloc(p_size); in __fio_client_send_remote_ini()
678 memset(pdu, 0, p_size); in __fio_client_send_remote_ini()
679 pdu->name_len = strlen(filename); in __fio_client_send_remote_ini()
680 strcpy((char *) pdu->file, filename); in __fio_client_send_remote_ini()
681 pdu->client_type = cpu_to_le16((uint16_t) client->type); in __fio_client_send_remote_ini()
684 ret = fio_net_send_cmd(client->fd, FIO_NET_CMD_LOAD_FILE, pdu, p_size,NULL, NULL); in __fio_client_send_remote_ini()
685 free(pdu); in __fio_client_send_remote_ini()
696 struct cmd_job_pdu *pdu; in __fio_client_send_local_ini() local
720 p_size = sb.st_size + sizeof(*pdu); in __fio_client_send_local_ini()
721 pdu = malloc(p_size); in __fio_client_send_local_ini()
722 buf = pdu->buf; in __fio_client_send_local_ini()
729 free(pdu); in __fio_client_send_local_ini()
733 pdu->buf_len = __cpu_to_le32(sb.st_size); in __fio_client_send_local_ini()
734 pdu->client_type = cpu_to_le32(client->type); in __fio_client_send_local_ini()
737 ret = fio_net_send_cmd(client->fd, FIO_NET_CMD_JOB, pdu, p_size, NULL, NULL); in __fio_client_send_local_ini()
738 free(pdu); in __fio_client_send_local_ini()
799 struct cmd_add_job_pdu pdu; in fio_client_update_options() local
801 pdu.thread_number = cpu_to_le32(client->thread_number); in fio_client_update_options()
802 pdu.groupid = cpu_to_le32(client->groupid); in fio_client_update_options()
803 convert_thread_options_to_net(&pdu.top, o); in fio_client_update_options()
805 …return fio_net_send_cmd(client->fd, FIO_NET_CMD_UPDATE_JOB, &pdu, sizeof(pdu), tag, &client->cmd_l… in fio_client_update_options()
966 struct cmd_text_pdu *pdu = (struct cmd_text_pdu *) cmd->payload; in handle_text() local
967 const char *buf = (const char *) pdu->buf; in handle_text()
975 ret = fwrite(buf, pdu->buf_len, 1, f_out); in handle_text()
1192 struct cmd_start_pdu *pdu = (struct cmd_start_pdu *) cmd->payload; in handle_start() local
1195 client->jobs = le32_to_cpu(pdu->jobs); in handle_start()
1196 client->nr_stat = le32_to_cpu(pdu->stat_outputs); in handle_start()
1209 struct cmd_end_pdu *pdu = (struct cmd_end_pdu *) cmd->payload; in convert_stop() local
1211 pdu->error = le32_to_cpu(pdu->error); in convert_stop()
1216 struct cmd_text_pdu *pdu = (struct cmd_text_pdu *) cmd->payload; in convert_text() local
1218 pdu->level = le32_to_cpu(pdu->level); in convert_text()
1219 pdu->buf_len = le32_to_cpu(pdu->buf_len); in convert_text()
1220 pdu->log_sec = le64_to_cpu(pdu->log_sec); in convert_text()
1221 pdu->log_usec = le64_to_cpu(pdu->log_usec); in convert_text()
1225 struct cmd_iolog_pdu *pdu) in convert_iolog_gz() argument
1246 nr_samples = le64_to_cpu(pdu->nr_samples); in convert_iolog_gz()
1248 total = nr_samples * __log_entry_sz(le32_to_cpu(pdu->log_offset)); in convert_iolog_gz()
1249 ret = malloc(total + sizeof(*pdu)); in convert_iolog_gz()
1252 memcpy(ret, pdu, sizeof(*pdu)); in convert_iolog_gz()
1254 p = (void *) ret + sizeof(*pdu); in convert_iolog_gz()
1256 stream.avail_in = cmd->pdu_len - sizeof(*pdu); in convert_iolog_gz()
1257 stream.next_in = (void *) pdu + sizeof(*pdu); in convert_iolog_gz()
1296 struct cmd_iolog_pdu *pdu = (struct cmd_iolog_pdu *) cmd->payload; in convert_iolog() local
1305 if (le32_to_cpu(pdu->compressed)) { in convert_iolog()
1310 ret = convert_iolog_gz(cmd, pdu); in convert_iolog()
1316 ret = pdu; in convert_iolog()
1351 static int send_file(struct fio_client *client, struct cmd_sendfile *pdu, in send_file() argument
1362 if (stat((char *)pdu->path, &sb) < 0) { in send_file()
1374 fd = open((char *)pdu->path, O_RDONLY); in send_file()
1453 struct cmd_start_pdu *pdu = (struct cmd_start_pdu *) cmd->payload; in fio_handle_client() local
1455 pdu->jobs = le32_to_cpu(pdu->jobs); in fio_handle_client()
1460 struct cmd_end_pdu *pdu = (struct cmd_end_pdu *) cmd->payload; in fio_handle_client() local
1464 client->error = le32_to_cpu(pdu->error); in fio_handle_client()
1465 client->signal = le32_to_cpu(pdu->signal); in fio_handle_client()
1470 struct cmd_add_job_pdu *pdu = (struct cmd_add_job_pdu *) cmd->payload; in fio_handle_client() local
1472 client->thread_number = le32_to_cpu(pdu->thread_number); in fio_handle_client()
1473 client->groupid = le32_to_cpu(pdu->groupid); in fio_handle_client()
1481 struct cmd_iolog_pdu *pdu; in fio_handle_client() local
1483 pdu = convert_iolog(cmd); in fio_handle_client()
1484 ops->iolog(client, pdu); in fio_handle_client()
1492 struct all_io_list *pdu = (struct all_io_list *) cmd->payload; in fio_handle_client() local
1495 __verify_save_state(pdu, server_name(client, buf, sizeof(buf))); in fio_handle_client()
1500 struct cmd_sendfile *pdu = (struct cmd_sendfile *) cmd->payload; in fio_handle_client() local
1501 send_file(client, pdu, cmd->tag); in fio_handle_client()
1527 struct cmd_vtrigger_pdu *pdu; in fio_clients_send_trigger() local
1531 pdu = malloc(sizeof(*pdu) + slen); in fio_clients_send_trigger()
1532 pdu->len = cpu_to_le16((uint16_t) slen); in fio_clients_send_trigger()
1534 memcpy(pdu->cmd, cmd, slen); in fio_clients_send_trigger()
1535 fio_net_send_cmd(client->fd, FIO_NET_CMD_VTRIGGER, pdu, in fio_clients_send_trigger()
1536 sizeof(*pdu) + slen, NULL, NULL); in fio_clients_send_trigger()
1537 free(pdu); in fio_clients_send_trigger()