From 695ab5c21d44a004b8f90bcc38b9331bc2d8feb7 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Wed, 5 Jun 2024 15:19:51 +0000 Subject: [PATCH] dataplacement: increase max data placement IDs to 128 Some users have requested the ability to test a larger number of placement IDs in a single job. Bump the max placement IDs to 128. Change the type to 16 bits to reduce the amount of space these additional IDs will consume. Also bump the server version for this change. Signed-off-by: Vincent Fu --- cconv.c | 4 ++-- dataplacement.h | 2 +- server.h | 2 +- thread_options.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cconv.c b/cconv.c index 9b344940cb..1d49498227 100644 --- a/cconv.c +++ b/cconv.c @@ -359,7 +359,7 @@ int convert_thread_options_to_cpu(struct thread_options *o, o->dp_id_select = le32_to_cpu(top->dp_id_select); o->dp_nr_ids = le32_to_cpu(top->dp_nr_ids); for (i = 0; i < o->dp_nr_ids; i++) - o->dp_ids[i] = le32_to_cpu(top->dp_ids[i]); + o->dp_ids[i] = le16_to_cpu(top->dp_ids[i]); #if 0 uint8_t cpumask[FIO_TOP_STR_MAX]; uint8_t verify_cpumask[FIO_TOP_STR_MAX]; @@ -659,7 +659,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top, top->dp_id_select = cpu_to_le32(o->dp_id_select); top->dp_nr_ids = cpu_to_le32(o->dp_nr_ids); for (i = 0; i < o->dp_nr_ids; i++) - top->dp_ids[i] = cpu_to_le32(o->dp_ids[i]); + top->dp_ids[i] = cpu_to_le16(o->dp_ids[i]); #if 0 uint8_t cpumask[FIO_TOP_STR_MAX]; uint8_t verify_cpumask[FIO_TOP_STR_MAX]; diff --git a/dataplacement.h b/dataplacement.h index 71d19d6965..3267a46040 100644 --- a/dataplacement.h +++ b/dataplacement.h @@ -6,7 +6,7 @@ #define STREAMS_DIR_DTYPE 1 #define FDP_DIR_DTYPE 2 #define FDP_MAX_RUHS 128 -#define FIO_MAX_DP_IDS 16 +#define FIO_MAX_DP_IDS 128 #define DP_MAX_SCHEME_ENTRIES 32 /* diff --git a/server.h b/server.h index e8659f7920..a8e4dbf27f 100644 --- a/server.h +++ b/server.h @@ -51,7 +51,7 @@ struct fio_net_cmd_reply { }; enum { - FIO_SERVER_VER = 105, + FIO_SERVER_VER = 106, FIO_SERVER_MAX_FRAGMENT_PDU = 1024, FIO_SERVER_MAX_CMD_MB = 2048, diff --git a/thread_options.h b/thread_options.h index ccd0c064b9..20fc18a302 100644 --- a/thread_options.h +++ b/thread_options.h @@ -394,7 +394,7 @@ struct thread_options { unsigned int fdp; unsigned int dp_type; unsigned int dp_id_select; - unsigned int dp_ids[FIO_MAX_DP_IDS]; + uint16_t dp_ids[FIO_MAX_DP_IDS]; unsigned int dp_nr_ids; char *dp_scheme_file; @@ -712,7 +712,7 @@ struct thread_options_pack { uint32_t fdp; uint32_t dp_type; uint32_t dp_id_select; - uint32_t dp_ids[FIO_MAX_DP_IDS]; + uint16_t dp_ids[FIO_MAX_DP_IDS]; uint32_t dp_nr_ids; uint8_t dp_scheme_file[FIO_TOP_STR_MAX];