* Remove rule based routing (no more pcre dependency)
* Add a limiter_link option to cluster tag, to specify a maximum reachable
bandwidth in fullduplex mode when it is < 2*nominal bw
- * Add a loopback_bw and loopback_lat options to cluster tag.
+ * Add a loopback_bw and loopback_lat options to cluster tag.
+ * Fix the peer tag that could not be mixed with other AS within a vivaldi
+ routing. Now peers are encapsulated in an AS and have their own private
+ router but this is transparent.
-- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
as cluster, <b>A PEER IS INTERNALLY INTERPRETED AS AN \<AS\></b>. It's
just a kind of shortcut that does the following :
+\li It creates a tiny AS whose routing type is cluster
\li It creates an host
\li Two links : one for download and one for upload. This is
convenient to use and simulate stuff under the last mile model (as
- ADSL peers).
-\li It creates a gateway that serve as entry point for this peer zone.
+ ADSL peers).
+\li It connects the two links to the host
+\li It creates a router (a gateway) that serve as entry point for this peer zone.
This router has coordinates.
<b>peer</b> attributes :
\li <b>state_file </b>: state file for the peer. Same as host state
file. See <b>host</b> description for details.
+In term of XML, the <b>peer</b> construct can be explained as follows: it transforms
+\verbatim
+ <peer id="FOO"
+ coordinates="12.8 14.4 6.4"
+ power="1.5Gf"
+ bw_in="2.25GBps"
+ bw_out="2.25GBps"
+ lat="500us" />
+\endverbatim
+into
+\verbatim
+ <AS id="as_FOO" routing="Cluster">
+ <host id="peer_FOO" power="1.5Gf"/>
+ <link id="link_FOO_UP" bandwidth="2.25GBps" latency="500us"/>
+ <link id="link_FOO_DOWN" bandwidth="2.25GBps" latency="500us"/>
+ <router id="router_FOO" coordinates="25.5 9.4 1.4"/>
+ <host_link id="peer_FOO" up="link_FOO_UP" down="link_FOO_DOWN"/>
+ </AS>
+\endverbatim
+
+
\subsection pf_ne Network equipments: links and routers
You have basically two entities available to represent network entities:
calculating the euclidian distance between the two hosts coordinates.
The results express the latency in ms.
+Note that the previous example defines a routing directly between hosts but it could be also used to define a routing between AS.
+That is for example what is commonly done when using peers (see Section \ref pf_peer).
+\verbatim
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+
+<config id="General">
+ <prop id="network/coordinates" value="yes"></prop>
+</config>
+ <AS id="AS0" routing="Vivaldi">
+ <peer id="peer-0" coordinates="173.0 96.8 0.1" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us"/>
+ <peer id="peer-1" coordinates="247.0 57.3 0.6" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
+ <peer id="peer-2" coordinates="243.4 58.8 1.4" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
+</AS>
+</platform>
+\endverbatim
+In such a case though, we connect the AS created by the <b>peer</b> tag with the Vivaldi routing mechanism.
+This means that to route between AS1 and AS2, it will use the coordinates of router_AS1 and router_AS2.
+This is currently a convention and we may offer to change this convention in the DTD later if needed.
+You may have noted that conveniently, a peer named FOO defines an AS named FOO and a router named router_FOO, which is why it works seamlessly with the <b>peer</b> tag.
+
+
\subsection pf_wisely Choosing wisely the routing model to use
static void routing_parse_peer(sg_platf_peer_cbarg_t peer)
{
char *host_id = NULL;
- char *link_id;
+ char *link_id = NULL;
+ char *router_id = NULL;
XBT_DEBUG(" ");
host_id = HOST_PEER(peer->id);
link_id = LINK_PEER(peer->id);
+ router_id = ROUTER_PEER(peer->id);
+
+ XBT_DEBUG("<AS id=\"%s\"\trouting=\"Cluster\">", peer->id);
+ s_sg_platf_AS_cbarg_t AS = SG_PLATF_AS_INITIALIZER;
+ AS.id = peer->id;
+ AS.routing = A_surfxml_AS_routing_Cluster;
+ sg_platf_new_AS_begin(&AS);
+
+ current_routing->link_up_down_list
+ = xbt_dynar_new(sizeof(s_surf_parsing_link_up_down_t),NULL);
XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%f\"/>", host_id, peer->power);
s_sg_platf_host_cbarg_t host;
host.power_trace = peer->availability_trace;
host.state_trace = peer->state_trace;
host.core_amount = 1;
- host.coord = peer->coord;
sg_platf_new_host(&host);
s_sg_platf_link_cbarg_t link;
host_link.link_down= link_down;
sg_platf_new_host_link(&host_link);
+ XBT_DEBUG("<router id=\"%s\"/>", router_id);
+ s_sg_platf_router_cbarg_t router;
+ memset(&router, 0, sizeof(router));
+ router.id = router_id;
+ router.coord = peer->coord;
+ sg_platf_new_router(&router);
+ ((as_cluster_t)current_routing)->router = xbt_lib_get_or_null(as_router_lib, router.id, ROUTING_ASR_LEVEL);
+
+ XBT_DEBUG("</AS>");
+ sg_platf_new_AS_end();
XBT_DEBUG(" ");
//xbt_dynar_free(&tab_elements_num);