server: include number of CPUs in probe reply
authorJens Axboe <axboe@kernel.dk>
Wed, 28 Mar 2012 19:38:24 +0000 (21:38 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Mar 2012 19:38:24 +0000 (21:38 +0200)
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 <axboe@kernel.dk>
gclient.c
gfio.h
server.c
server.h

index e4ff1c471fb1d5e0a1b61266750902c7d2fa969d..8675f617fb2d4dfd46d4326c16c5f88e8baf56bd 100644 (file)
--- 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);
 
        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);
        gdk_threads_enter();
 
        gtk_label_set_text(GTK_LABEL(ge->probe.hostname), (char *) probe->hostname);
diff --git a/gfio.h b/gfio.h
index b4cef0b2b450328074905db0131685f5685a3d34..c0427687dfc17c7af5435cfa2db8a0f5b92c0592 100644 (file)
--- a/gfio.h
+++ b/gfio.h
@@ -146,6 +146,8 @@ struct gfio_client {
        struct gui_entry *ge;
        struct fio_client *client;
        GtkWidget *err_entry;
        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;
 
        struct flist_head o_list;
        unsigned int o_list_nr;
index c859ad7277d471742fd7eae0c1ea574a106970c5..2bf74b255965c03ec7bf4074ea5d8e10ba4e46c7 100644 (file)
--- 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.os        = FIO_OS;
        probe.arch      = FIO_ARCH;
-
        probe.bpp       = sizeof(void *);
        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);
 }
 
        return fio_net_send_cmd(server_fd, FIO_NET_CMD_PROBE, &probe, sizeof(probe), &tag, NULL);
 }
index d56d498a149903d50159da0552455d2a707f8201..3c704213a82fe35c88780e13f32f8ca6bc59890c 100644 (file)
--- a/server.h
+++ b/server.h
@@ -38,7 +38,7 @@ struct fio_net_cmd_reply {
 };
 
 enum {
 };
 
 enum {
-       FIO_SERVER_VER                  = 14,
+       FIO_SERVER_VER                  = 15,
 
        FIO_SERVER_MAX_FRAGMENT_PDU     = 1024,
 
 
        FIO_SERVER_MAX_FRAGMENT_PDU     = 1024,
 
@@ -92,6 +92,8 @@ struct cmd_probe_pdu {
        uint8_t os;
        uint8_t arch;
        uint8_t bpp;
        uint8_t os;
        uint8_t arch;
        uint8_t bpp;
+       uint32_t cpus;
+       uint64_t flags;
 };
 
 struct cmd_single_line_pdu {
 };
 
 struct cmd_single_line_pdu {