A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model-checker : comment backtrace and add ignore mechanism in mmalloc metadata
[simgrid.git]
/
src
/
surf
/
network_ns3.c
diff --git
a/src/surf/network_ns3.c
b/src/surf/network_ns3.c
index
b235051
..
25175c7
100644
(file)
--- a/
src/surf/network_ns3.c
+++ b/
src/surf/network_ns3.c
@@
-18,7
+18,7
@@
extern xbt_lib_t as_router_lib;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_ns3, surf,
"Logging specific to the SURF network NS3 module");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_ns3, surf,
"Logging specific to the SURF network NS3 module");
-extern routing_
global_t global_routing
;
+extern routing_
platf_t routing_platf
;
extern xbt_dict_t dict_socket;
static double time_to_next_flow_completion = -1;
extern xbt_dict_t dict_socket;
static double time_to_next_flow_completion = -1;
@@
-26,8
+26,8
@@
static double time_to_next_flow_completion = -1;
static double ns3_share_resources(double min);
static void ns3_update_actions_state(double now, double delta);
static void finalize(void);
static double ns3_share_resources(double min);
static void ns3_update_actions_state(double now, double delta);
static void finalize(void);
-static surf_action_t ns3_communicate(
network_element
_t src_elm,
-
network_element
_t dst_elm,
+static surf_action_t ns3_communicate(
sg_routing_edge
_t src_elm,
+
sg_routing_edge
_t dst_elm,
double size, double rate);
static void action_suspend(surf_action_t action);
static void action_resume(surf_action_t action);
double size, double rate);
static void action_suspend(surf_action_t action);
static void action_resume(surf_action_t action);
@@
-109,13
+109,13
@@
static void parse_ns3_add_router(sg_platf_router_cbarg_t router)
);
}
);
}
-static void parse_ns3_add_AS(
const char*id, const char*routing
)
+static void parse_ns3_add_AS(
sg_platf_AS_cbarg_t AS
)
{
{
- XBT_DEBUG("NS3_ADD_AS '%s'",id);
+ XBT_DEBUG("NS3_ADD_AS '%s'",
AS->
id);
xbt_lib_set(as_router_lib,
xbt_lib_set(as_router_lib,
- id,
+
AS->
id,
NS3_ASR_LEVEL,
NS3_ASR_LEVEL,
- ns3_add_AS(id)
+ ns3_add_AS(
AS->
id)
);
}
);
}
@@
-215,7
+215,7
@@
static void parse_ns3_add_cluster(sg_platf_cluster_cbarg_t cluster)
replace_bdw_ns3(&bw);
ns3_add_cluster(bw,lat,cluster->id);
xbt_free(lat);
replace_bdw_ns3(&bw);
ns3_add_cluster(bw,lat,cluster->id);
xbt_free(lat);
- xbt_free(bw);
+ xbt_free(bw);
}
static double ns3_get_link_latency (const void *link)
}
static double ns3_get_link_latency (const void *link)
@@
-253,7
+253,7
@@
static void create_ns3_topology(void)
xbt_dynar_shrink(IPV4addr,0);
//get the onelinks from the parsed platform
xbt_dynar_shrink(IPV4addr,0);
//get the onelinks from the parsed platform
- xbt_dynar_t onelink_routes =
global_routing
->get_onelink_routes();
+ xbt_dynar_t onelink_routes =
routing_platf
->get_onelink_routes();
if (!onelink_routes)
xbt_die("There is no routes!");
XBT_DEBUG("Have get_onelink_routes, found %ld routes",onelink_routes->used);
if (!onelink_routes)
xbt_die("There is no routes!");
XBT_DEBUG("Have get_onelink_routes, found %ld routes",onelink_routes->used);
@@
-272,7
+272,7
@@
static void create_ns3_topology(void)
replace_bdw_ns3(&link_bdw);
((surf_ns3_link_t)link)->created = 0;
replace_bdw_ns3(&link_bdw);
((surf_ns3_link_t)link)->created = 0;
- //
XBT_DEBUG("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
+ // XBT_DEBUG("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
XBT_DEBUG("\tLink (%s) bdw:%s lat:%s",((surf_ns3_link_t)link)->data->id,
link_bdw,
link_lat
XBT_DEBUG("\tLink (%s) bdw:%s lat:%s",((surf_ns3_link_t)link)->data->id,
link_bdw,
link_lat
@@
-317,8
+317,8
@@
static void free_ns3_link(void * elmts)
static void free_ns3_host(void * elmts)
{
static void free_ns3_host(void * elmts)
{
-
ns3_nodes_t host = elmts;
-
free(host);
+ ns3_nodes_t host = elmts;
+ free(host);
}
#ifdef HAVE_LATENCY_BOUND_TRACKING
}
#ifdef HAVE_LATENCY_BOUND_TRACKING
@@
-366,7
+366,7
@@
void surf_network_model_init_NS3()
xbt_die("Impossible to initialize NS3 interface");
}
xbt_die("Impossible to initialize NS3 interface");
}
- routing_model_create(
sizeof(s_surf_ns3_link_t),
NULL);
+ routing_model_create(NULL);
define_callbacks_ns3();
NS3_HOST_LEVEL = xbt_lib_add_level(host_lib,(void_f_pvoid_t)free_ns3_host);
define_callbacks_ns3();
NS3_HOST_LEVEL = xbt_lib_add_level(host_lib,(void_f_pvoid_t)free_ns3_host);
@@
-479,8
+479,8
@@
static void ns3_update_actions_state(double now, double delta)
}
/* Max durations are not supported */
}
/* Max durations are not supported */
-static surf_action_t ns3_communicate(
network_element
_t src_elm,
-
network_element
_t dst_elm,
+static surf_action_t ns3_communicate(
sg_routing_edge
_t src_elm,
+
sg_routing_edge
_t dst_elm,
double size, double rate)
{
surf_action_network_ns3_t action = NULL;
double size, double rate)
{
surf_action_network_ns3_t action = NULL;