Commit 59bbab26 authored by Jonathan Jenkins's avatar Jonathan Jenkins

workload/mapping name clash

parent 453a5268
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define CODES_WORKLOAD_H #define CODES_WORKLOAD_H
#include "ross.h" #include "ross.h"
#define MAX_NAME_LENGTH 512 #define MAX_NAME_LENGTH_WKLD 512
typedef struct bgp_params bgp_params; typedef struct bgp_params bgp_params;
typedef struct codes_workload_info codes_workload_info; typedef struct codes_workload_info codes_workload_info;
...@@ -21,10 +21,10 @@ typedef struct codes_workload_info codes_workload_info; ...@@ -21,10 +21,10 @@ typedef struct codes_workload_info codes_workload_info;
struct bgp_params struct bgp_params
{ {
int num_cns_per_lp; int num_cns_per_lp;
char io_kernel_meta_path[MAX_NAME_LENGTH]; char io_kernel_meta_path[MAX_NAME_LENGTH_WKLD];
char bgp_config_file[MAX_NAME_LENGTH]; char bgp_config_file[MAX_NAME_LENGTH_WKLD];
char io_kernel_path[MAX_NAME_LENGTH]; char io_kernel_path[MAX_NAME_LENGTH_WKLD];
char io_kernel_def_path[MAX_NAME_LENGTH]; char io_kernel_def_path[MAX_NAME_LENGTH_WKLD];
}; };
struct codes_workload_info struct codes_workload_info
......
...@@ -6,13 +6,12 @@ ...@@ -6,13 +6,12 @@
#ifndef CODES_WORKLOAD_TEST_CN_LP_H #ifndef CODES_WORKLOAD_TEST_CN_LP_H
#define CODES_WORKLOAD_TEST_CN_LP_H #define CODES_WORKLOAD_TEST_CN_LP_H
#define MAX_NAME_LENGTH 512
#include <ross.h> #include <ross.h>
#include "codes/codes-workload.h" #include "codes/codes-workload.h"
extern tw_lptype client_lp; extern tw_lptype client_lp;
char workload_type[MAX_NAME_LENGTH]; char workload_type[MAX_NAME_LENGTH_WKLD];
struct bgp_params bgparams; struct bgp_params bgparams;
void cn_op_complete(tw_lp *lp, tw_stime svc_time, tw_lpid gid); void cn_op_complete(tw_lp *lp, tw_stime svc_time, tw_lpid gid);
......
...@@ -36,21 +36,21 @@ static int num_clients_per_lp = -1; ...@@ -36,21 +36,21 @@ static int num_clients_per_lp = -1;
void workload_set_params() void workload_set_params()
{ {
config_lpgroups_t paramconf; config_lpgroups_t paramconf;
char io_kernel_meta_path[MAX_NAME_LENGTH]; char io_kernel_meta_path[MAX_NAME_LENGTH_WKLD];
char bgp_config_file[MAX_NAME_LENGTH]; char bgp_config_file[MAX_NAME_LENGTH_WKLD];
configuration_get_lpgroups(&config, "PARAMS", &paramconf); configuration_get_lpgroups(&config, "PARAMS", &paramconf);
configuration_get_value(&config, "PARAMS", "workload_type", workload_type, MAX_NAME_LENGTH); configuration_get_value(&config, "PARAMS", "workload_type", workload_type, MAX_NAME_LENGTH_WKLD);
if(strcmp(workload_type,"bgp_io_workload") == 0) if(strcmp(workload_type,"bgp_io_workload") == 0)
{ {
strcpy(bgparams.io_kernel_path,""); strcpy(bgparams.io_kernel_path,"");
strcpy(bgparams.io_kernel_def_path, ""); strcpy(bgparams.io_kernel_def_path, "");
configuration_get_value(&config, "PARAMS", "io_kernel_meta_path", io_kernel_meta_path, MAX_NAME_LENGTH); configuration_get_value(&config, "PARAMS", "io_kernel_meta_path", io_kernel_meta_path, MAX_NAME_LENGTH_WKLD);
strcpy(bgparams.io_kernel_meta_path, io_kernel_meta_path); strcpy(bgparams.io_kernel_meta_path, io_kernel_meta_path);
configuration_get_value(&config, "PARAMS", "bgp_config_file", bgp_config_file, MAX_NAME_LENGTH); configuration_get_value(&config, "PARAMS", "bgp_config_file", bgp_config_file, MAX_NAME_LENGTH_WKLD);
strcpy(bgparams.bgp_config_file, bgp_config_file); strcpy(bgparams.bgp_config_file, bgp_config_file);
bgparams.num_cns_per_lp = num_clients_per_lp; bgparams.num_cns_per_lp = num_clients_per_lp;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment