Forked from
emulab / emulab-devel
Source project has a limited visibility.
-
Robert Ricci authored
LAN nodes are no longer treated specially. Instead, I've introduced the idea of 'static' types (old-style types retroactively become 'dynamic' types). While a pnode can only satisfy one dynamic type at a time, it can always satisfy its static types (assuming it has enough capacity left.) Static types are flagged by prepending them with a '*' in the ptop file. So, for example, you may give switches the '*lan:10000' type so that they can satisfy virtual LAN nodes. Of course, other pnodes can have this type too, so that we can get 'trivial LANs'. Actually, removing special treatment for LANs cleans up a lot of code. However, it may have some negative impacts on solutions, since we're not as smart about where to place LAN nodes as we used to be (they get annealed along with everything else, and not migrated.) I haven't seen any evidence of this yet, however. This leaves us with a single type of special pnode, a switch. Also added a new bit of syntax in ptop files - when '*' is given as a the maxiumum load for a type, the node is allowed to take on an infinite (well, actually, just a really big number of) vnodes of that type. ptopgen was modified to always report switches as being capable of hosting LANs, and assign_wrapper now understands direct links to LANs, which is what we get when the LAN is hosted directly on a switch. Fixed a bug in scoring direct links, in which the penatly was being added once when a direct link was mapped, but subtracted only once when it was freed. Added a '-T' option for doing simple self-testing. When adding a node to the solution, assign records the score, adds the node, removes it again, and checks to make sure that the resulting score is the same as the original score. The usefulness of this feature in debugging scoring problems cannot be understated...
Robert Ricci authoredLAN nodes are no longer treated specially. Instead, I've introduced the idea of 'static' types (old-style types retroactively become 'dynamic' types). While a pnode can only satisfy one dynamic type at a time, it can always satisfy its static types (assuming it has enough capacity left.) Static types are flagged by prepending them with a '*' in the ptop file. So, for example, you may give switches the '*lan:10000' type so that they can satisfy virtual LAN nodes. Of course, other pnodes can have this type too, so that we can get 'trivial LANs'. Actually, removing special treatment for LANs cleans up a lot of code. However, it may have some negative impacts on solutions, since we're not as smart about where to place LAN nodes as we used to be (they get annealed along with everything else, and not migrated.) I haven't seen any evidence of this yet, however. This leaves us with a single type of special pnode, a switch. Also added a new bit of syntax in ptop files - when '*' is given as a the maxiumum load for a type, the node is allowed to take on an infinite (well, actually, just a really big number of) vnodes of that type. ptopgen was modified to always report switches as being capable of hosting LANs, and assign_wrapper now understands direct links to LANs, which is what we get when the LAN is hosted directly on a switch. Fixed a bug in scoring direct links, in which the penatly was being added once when a direct link was mapped, but subtracted only once when it was freed. Added a '-T' option for doing simple self-testing. When adding a node to the solution, assign records the score, adds the node, removes it again, and checks to make sure that the resulting score is the same as the original score. The usefulness of this feature in debugging scoring problems cannot be understated...