From d31e26d0a575f91db96bda4d76b36fe38996d5f8 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 28 Mar 2012 21:38:24 +0200 Subject: [PATCH] server: include number of CPUs in probe reply We'll need this for affinity mask setting. Also add room for flags, we'll want to pass back a flag mask of supported features on the remote end. Signed-off-by: Jens Axboe --- gclient.c | 3 +++ gfio.h | 2 ++ server.c | 3 ++- server.h | 4 +++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gclient.c b/gclient.c index e4ff1c47..8675f617 100644 --- a/gclient.c +++ b/gclient.c @@ -538,6 +538,9 @@ static void gfio_probe_op(struct fio_client *client, struct fio_net_cmd *cmd) if (!client->name) client->name = strdup((char *) probe->hostname); + gc->client_cpus = le32_to_cpu(probe->cpus); + gc->client_flags = le64_to_cpu(probe->flags); + gdk_threads_enter(); gtk_label_set_text(GTK_LABEL(ge->probe.hostname), (char *) probe->hostname); diff --git a/gfio.h b/gfio.h index b4cef0b2..c0427687 100644 --- a/gfio.h +++ b/gfio.h @@ -146,6 +146,8 @@ struct gfio_client { struct gui_entry *ge; struct fio_client *client; GtkWidget *err_entry; + uint32_t client_cpus; + uint64_t client_flags; struct flist_head o_list; unsigned int o_list_nr; diff --git a/server.c b/server.c index c859ad72..2bf74b25 100644 --- a/server.c +++ b/server.c @@ -630,8 +630,9 @@ static int handle_probe_cmd(struct fio_net_cmd *cmd) probe.os = FIO_OS; probe.arch = FIO_ARCH; - probe.bpp = sizeof(void *); + probe.cpus = __cpu_to_le32(cpus_online()); + probe.flags = 0; return fio_net_send_cmd(server_fd, FIO_NET_CMD_PROBE, &probe, sizeof(probe), &tag, NULL); } diff --git a/server.h b/server.h index d56d498a..3c704213 100644 --- a/server.h +++ b/server.h @@ -38,7 +38,7 @@ struct fio_net_cmd_reply { }; enum { - FIO_SERVER_VER = 14, + FIO_SERVER_VER = 15, FIO_SERVER_MAX_FRAGMENT_PDU = 1024, @@ -92,6 +92,8 @@ struct cmd_probe_pdu { uint8_t os; uint8_t arch; uint8_t bpp; + uint32_t cpus; + uint64_t flags; }; struct cmd_single_line_pdu { -- 2.25.1