summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
019dd47)
Now the client can see the parsed options. As it turns out,
we need to parse locally since the client and server can be
vastly different operating systems and architectures. Pass
back the options, allowing the client to change them before
starting the job.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
GtkWidget *results_widget;
GtkWidget *disk_util_frame;
GtkWidget *err_entry;
GtkWidget *results_widget;
GtkWidget *disk_util_frame;
GtkWidget *err_entry;
+ unsigned int job_added;
+ struct thread_options o;
};
static void setup_iops_graph(struct gui *ui)
};
static void setup_iops_graph(struct gui *ui)
{
struct cmd_add_job_pdu *p = (struct cmd_add_job_pdu *) cmd->payload;
struct gfio_client *gc = client->client_data;
{
struct cmd_add_job_pdu *p = (struct cmd_add_job_pdu *) cmd->payload;
struct gfio_client *gc = client->client_data;
+ struct thread_options *o = &gc->o;
struct gui *ui = gc->ui;
char tmp[8];
struct gui *ui = gc->ui;
char tmp[8];
- int i;
-
- p->iodepth = le32_to_cpu(p->iodepth);
- p->rw = le32_to_cpu(p->rw);
- for (i = 0; i < 2; i++) {
- p->min_bs[i] = le32_to_cpu(p->min_bs[i]);
- p->max_bs[i] = le32_to_cpu(p->max_bs[i]);
- }
-
- p->numjobs = le32_to_cpu(p->numjobs);
- p->group_reporting = le32_to_cpu(p->group_reporting);
+ convert_thread_options_to_cpu(o, &p->top);
- gtk_entry_set_text(GTK_ENTRY(ui->eta.name), (gchar *) p->jobname);
- gtk_entry_set_text(GTK_ENTRY(ui->eta.iotype), ddir_str(p->rw));
- gtk_entry_set_text(GTK_ENTRY(ui->eta.ioengine), (gchar *) p->ioengine);
+ gtk_entry_set_text(GTK_ENTRY(ui->eta.name), (gchar *) o->name);
+ gtk_entry_set_text(GTK_ENTRY(ui->eta.iotype), ddir_str(o->td_ddir));
+ gtk_entry_set_text(GTK_ENTRY(ui->eta.ioengine), (gchar *) o->ioengine);
- sprintf(tmp, "%u", p->iodepth);
+ sprintf(tmp, "%u", o->iodepth);
gtk_entry_set_text(GTK_ENTRY(ui->eta.iodepth), tmp);
gtk_entry_set_text(GTK_ENTRY(ui->eta.iodepth), tmp);
void fio_server_send_add_job(struct thread_options *o, const char *ioengine)
{
struct cmd_add_job_pdu pdu;
void fio_server_send_add_job(struct thread_options *o, const char *ioengine)
{
struct cmd_add_job_pdu pdu;
- int i;
-
- strcpy((char *) pdu.jobname, o->name);
- strcpy((char *) pdu.ioengine, ioengine);
-
- pdu.iodepth = cpu_to_le32(o->iodepth);
- pdu.rw = cpu_to_le32(o->td_ddir);
-
- for (i = 0; i < 2; i++) {
- pdu.min_bs[i] = cpu_to_le32(o->min_bs[i]);
- pdu.max_bs[i] = cpu_to_le32(o->max_bs[i]);
- }
- pdu.numjobs = cpu_to_le32(o->numjobs);
- pdu.group_reporting = cpu_to_le32(o->group_reporting);
+ convert_thread_options_to_net(&pdu.top, o);
fio_net_send_cmd(server_fd, FIO_NET_CMD_ADD_JOB, &pdu, sizeof(pdu), 0);
}
fio_net_send_cmd(server_fd, FIO_NET_CMD_ADD_JOB, &pdu, sizeof(pdu), 0);
}
};
struct cmd_add_job_pdu {
};
struct cmd_add_job_pdu {
- uint8_t jobname[32];
- uint8_t ioengine[32];
- uint32_t iodepth;
- uint32_t rw;
- uint32_t min_bs[2];
- uint32_t max_bs[2];
- uint32_t numjobs;
- uint32_t group_reporting;
+ struct thread_options_pack top;