1. 26 Apr, 2004 1 commit
    • Robert Ricci's avatar
      Some big changes to assign, and some related changes to assign_wrapper · 238dce73
      Robert Ricci authored
      and ptopgen.
      
      Add link typing to assign. Each virtual link is given a single type.
      Each physical link is given one or more types. A virtual link will
      only be mapped to a physical link which can satisfy its type. In both
      the top and ptop files, the link types are now mandatory, and they
      fall at the end of the mandatory link arguments.
      
      This differers from the 'regular' type system in two ways. First, a
      plink is not constrained to filling only one type at a time. If we are
      using emulated links, a plink could satisfy, say, an 'ethernet' link
      and an 'fxp' link at the same time. This seems to more naturally match
      the way we'll use link types.  Second, there are no counts assoicated
      with link types, as there are for node types. ie. a link is not an
      'ethernet:1' link, it's an 'ethernet' link. Presumably, when
      multiplexing virtual links onto a physical one, it's bandwidth that's
      the factor that limits the multiplexing.
      
      The link type is now taken into account when constructing pclasses,
      and in the mapping precheck.
      
      As a side-effect of these changes, the silly 'count' argument on the
      end of link lines in the ptop file, which was used for the fake LAN
      nodes, is no longer supported.
      
      The implementation could be a bit more efficient, but that would mean
      tossing more of the stuff we do with boost's graph library. I think
      this should happen, but today is not the day.
      
      Modify assign_wrapper and ptopgen to spit out top and ptop files in
      the new format.
      
      Changed the constant LINK_UKNOWN to LINK_UNMAPPED - the new name more
      accurately reflects the way this constant is used.
      
      Add a new '-n' flag that tells assign not to do annealing, just exit
      after the type precheck.
      
      Clarify the usage message for the -c flag.
      
      Removed some dead code for dealing with LAN nodes.
      238dce73
  2. 12 Apr, 2004 1 commit
    • Leigh B. Stoller's avatar
      The core of the wireless support code. · 86155d03
      Leigh B. Stoller authored
      * ptopgen:
      
         1. Change to using interface_capabilities table to get the default
            speed for an interface type.
      
         2. The wrinkle is that an interface can have multiple speeds,
            depending on the protocol that is requested. In the wireless case the
            table looks like:
      
      	| type             | capkey            | capval               |
      	+------------------+-------------------+----------------------+
      	| ath              | protocols         | 80211a,80211b,80211g |
      	| ath              | 80211a_defspeed   | 54000                |
      	| ath              | 80211b_defspeed   | 11000                |
      	| ath              | 80211g_defspeed   | 54000                |
      
         3. We use the above info to tell us the default speed for links, based
            on the particular protocol.
      
         4. And lastly, create "air" switches for each of 80211a, 80211b, 80211g,
            and specify links from the switches to the nodes that have interfaces
            that support those protocols. At the moment, there is a hardwired
            list of 80211a, 80211b, 80211g in ptopgen, so create 3 new air
            switches and links from each of the nodes to each of the switches.
            Rob says that assign can handle this just fine (using the same
            interface on a node to connect to three different air switches, at
            different speeds).
      
      * assign_wrapper:
      
         1. First off, I had to increase the bogousity factor of how we determine
            that a delay node is required (requires_delay() routine) on a link or
            lan. Using the interface_capabilities table, I determine the default
            speed for each protocol on each interface type.
      
         2. When calling requires_delay() I now the pass the lan so that we can
            get the "protocol" of the link/lan and use that to find the default
            speed. The main reason for all this crud is that if a user specifies
            a bandwidth of 54Mb on a wired ethernet, we want to make sure we
            insert a delay node, but not if the user is using 80211g. As it was,
            delay nodes would be skipped cause there are now nodes with
            interfaces that support those speeds. This change also allows to know
            that a delay node should be inserted on a wireless link, if we ever
            wanted to do something as silly as that!
      
         3. Okay, so now onto the actual wireless support!  Whenever the protocol
            for a lan is not "ethernet" spit out links to fake lan nodes, sorta
            like we used to do with ethernet lans before Rob made all those great
            changes to assign. So, a lan with protocol 80211a will get fake links
            to the 80211a air switch that ptopgen spits out (see above).  We
            currently bypass all delay node processing on wireless lans, and in
            fact we avoid most post-processing (after assign) of wireless lans
            (no vlans, veths, etc). At some point we can bring certain things
            back in (like emulated links) but that will be some time! See
            comments above about ptopgen.
      
         4. Added a section to copy over the virt_lan_settings and
            virt_lan_member_settings to the interface_settings table, for each
            node's interfaces in the mapped experiment. I also make up the ssid
            for the lan, and add the protocol to the settings so that the client
            side knows what it is supposed to do. I also set the acesspoint since
            that requires MAC addresses, and this is easiest place to get and set
            the MAC (all of the nodes in a lan need to know the MAC of the node
            acting as the access point). In the virtual topology, the accesspoint
            is specified as a node name.
      
      * tbsetup/ns2ir:
      
         1. Add tb-set-lan-protocol(lan, protocol) to set the protocol to one of
            ethernet, 80211a, 80211b, 80211g. Defaults to ethernet.
      
         2. Add tb-set-lan-accesspoint(lan, accesspoint) to set the name of the
            access point for a lan. Obviously this makes sense for only wireless
            links; ignored for wired links.
      
         3. Add tb-set-lan-setting(lan, setting, value) to specify a setting that
            applies to the entire lan. At present, these are ignored for wired
            lans. Both setting and value are strings.
      
         4. Add tb-set-node-lan-setting(lan, node, setting, value) to specify a
            setting that applies to a particular node in a lan. At present, these
            are ignored for wired lans. Both setting and value are strings.
      86155d03
  3. 01 Apr, 2004 1 commit
  4. 20 Feb, 2004 2 commits
  5. 10 Feb, 2004 1 commit
  6. 23 Jan, 2004 1 commit
  7. 09 Jan, 2004 1 commit
    • Shashi Guruprasad's avatar
      Changes to do auto re-swap of expts with simnodes when an nse on a simhost · 375f87c1
      Shashi Guruprasad authored
      (or more than one simhost) is unable to keep up with real-time. It includes
      changes to assign_wrapper to handle swap modify for simnodes, the simple
      algorithm in nseswap that bumps up the nodeweight of simnodes being hosted
      on a simhost that reports "can't keep up with real-time" (aka nse violation),
      ptopgen and sim.tcl to prefer nodes that already have the FBSD-NSE image.
      Also, changes to other files to send out NSESWAP event.
      
      One unrelated change: We now have per-swapin .top files and assign.log
      files along with .ptop files. This helps in debugging across multiple
      swapins since files remain in the form of
      <pid>-<eid>-<process_id>.{top,ptop} and assign-<pid>-<eid>-<process_id>.log
      Also useful for archiving.
      375f87c1
  8. 23 Dec, 2003 1 commit
    • Leigh B. Stoller's avatar
      Add new state PXEWAIT to be explained later ... · 22ee2594
      Leigh B. Stoller authored
      Change ptopgen to look at the eventstate of a node; a node is not considered
      free unless it is ISUP or PXEWAIT.
      
      Add TBAvailablePCs() to libdb, removing the corresponding code from
      assign_wrapper. This routine does the equiv of ptopgen, returning the
      number of PCs that are available for use (looking at eventstate).
      
      Change TBFreePCs in the web interface accordingly.
      
      The above changes correspond to an upcoming change in stated.
      22ee2594
  9. 15 Dec, 2003 1 commit
    • Shashi Guruprasad's avatar
      Distributed NSE changes. In other words, simulation resources are · d266bd71
      Shashi Guruprasad authored
      now mapped to more than one PC if required. The simnode_capacity
      column in the node_types table determines how many sim nodes can
      be packed on one PC. The packing factor can also be controlled via
      tb-set-colocate-factor to be smaller than simnode_capacity.
      
      - No frontend code changes. To summarize:
        $ns make-simulated {
          ...
        }
        is still the easy way to put a whole bunch of Tcl code to be
        in simulation.
        One unrelated fix in the frontend code is to fix the
        xmlencode() function which prior to this would knock off
        newlines from columns in the XML output. This affected
        nseconfigs since it is one of the few columns with embedded
        newlines. Also changed the event type and event object type
        in traffic.tcl from TRAFGEN/MODIFY to NSE/NSEEVENT.
      
      - More Tcl code in a new directory tbsetup/nseparse
        -> Runs on ops similar to the main parser. This is invoked
           from assign_wrapper in the end if there are simnodes
        -> Partitions the Tcl code into multiple Tcl specifications
           and updates the nseconfigs table via xmlconvert
        -> Comes with a lot of caveats. Arbitrary Tcl code such as user
           specified objects or procedures will not be re-generated. For
           example, if a user wanted a procedure to be included in Tcl
           code for all partitions, there is no way for code in nseparse
           to do that. Besides that, it needs to be tested more thoroughly.
      
      - xmlconvert has a new option -s. When invoked with this option,
        the experiments table is not allowed to be modified. Also,
        virtual tables are just updated (as opposed to deleting
        all rows in the first invocation before inserting new rows)
      
      - nse.patch has all the IP address related changes committed in
        iversion 1.11 + 2 other changes. 1) MTU discovery support in
        the ICMP agent 2) "$ns rlink" mechanism for sim node to real
        node links
      
      - nseinput.tcl includes several client side changes to add IP
        routes in NSE and the kernel routing table for packets crossing
        pnodes. Also made the parsing of tmcc command output more robust
        to new changes. Other client side changes in libsetup.pm and other
        scripts to run nse, are also in this commit
      
      - Besides the expected changes in assign_wrapper for simulated nodes,
        the interfaces and veth_interfaces tables are updated with
        routing table identifiers (rtabid). The tmcd changes are already
        committed. This field is used only by sim hosts on the client side.
        Of course, they can be used by jails as well if desired.
      d266bd71
  10. 08 Dec, 2003 1 commit
    • Leigh B. Stoller's avatar
      Move calculation of the virtnode_capacity from the node_types table, · ecec9f67
      Leigh B. Stoller authored
      to the node_types_auxtypes and node_auxtypes tables. The goal is to
      not have a gaggle of fake types in the node_types table, but rather to
      store the virtual types that a node (type) can take on, in the two aux
      tables (node_auxtypes holds the count). This removes part of the
      special handling of virtual types from ptopgen, and cuts down the
      number of bogus entries in the node_types table.
      
      I also did some cleanup. Got rid of a bunch of separate hash tables
      and combined into a single hash of "records" indexed by type. This
      script could use quite a bit more such cleanup.
      ecec9f67
  11. 03 Dec, 2003 1 commit
    • Robert Ricci's avatar
      A bit of a hack - assume that PC NICs are connected to switch ports · 5eac12e2
      Robert Ricci authored
      of the same speed. This is obviously not right, but I think it's
      better than the old hack, which was that we assume switch ports are
      100Mbps.
      
      Some stuff Chris is working on should remove the need for this hack
      because we will start keeping track of the speeds of switch ports.
      5eac12e2
  12. 24 Sep, 2003 1 commit
  13. 19 Sep, 2003 1 commit
  14. 11 Sep, 2003 3 commits
  15. 09 Sep, 2003 1 commit
  16. 08 Sep, 2003 1 commit
    • Robert Ricci's avatar
      Add subnode support. If a pnode's type ase the subnode flag set, tell · af5ad0ce
      Robert Ricci authored
      assign what it's a subnode of. Also, if a subnode's parent is not
      going to be included in the ptop file, don't include the subnode
      either.
      
      Also, re-structure the part in which we generate the 'node' line to
      make it cleaner, since it's gotten more complex than that code
      originally intended.
      af5ad0ce
  17. 17 Jul, 2003 1 commit
  18. 10 Jul, 2003 3 commits
    • Leigh B. Stoller's avatar
      Fix minor bug in last revision; local pcvm nodes should never go into · 8ef454c3
      Leigh B. Stoller authored
      the ptop file since we allocate them sort like we do delay nodes now
      (based on class:count).
      8ef454c3
    • Leigh B. Stoller's avatar
      Split the -e option to ptopgen into -p/-e. Assign will always pass in · f5e2a9d3
      Leigh B. Stoller authored
      the pid so that ptopgen can do permission checks on the node types and
      classes before it sticks them into the ptop file. -e now takes just eid,
      but operates as before.
      
      Change the -v option slightly; assign passes -v option when it sees
      that the topology requires virtual nodes. Without -v, virtual nodes
      are not placed into the the ptop file, saving about 6000 lines of node
      entries!
      
      Get rid of the pcvm and pc601 hacks, and replace with a permission
      check, as determined by the nodetypeXpid_permissions. I've updated
      that table to reflect current types/classes.
      
      Change Rob's last change, which was doing a DB query on each node,
      which when used with -v, was issuing a lot of queries. I was puzzled
      why ptopgen was taking 4 seconds to run!
      
      Kill more sharks.
      Cleanup some terrible indenting.
      f5e2a9d3
    • Robert Ricci's avatar
      At long last, support for assign's 'features'! Added a new table into · 25880e2e
      Robert Ricci authored
      which features and their weights can be placed, per node type.
      ptopgen now includes these features in the ptop files it generates.
      25880e2e
  19. 26 Jun, 2003 2 commits
    • Leigh B. Stoller's avatar
      Turn on lans for virtual nodes in assign_wrapper, now that Rob has · af86b3ba
      Leigh B. Stoller authored
      fixed the trivial_link problem for Lans.
      Add an option to ptopgen that says to include the various virtnode
      related things, so as not to slow down assign in the general case
      that virtnodes are not being used.
      af86b3ba
    • Robert Ricci's avatar
      Major changes to the way assign handles LAN nodes. · 83cfa8ec
      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...
      83cfa8ec
  20. 30 May, 2003 1 commit
  21. 27 May, 2003 1 commit
  22. 07 Mar, 2003 1 commit
    • Chad Barb's avatar
      · 5a8a8f27
      Chad Barb authored
      There were two "uninitialized variable used" warnings..
      one was due to a check for $type ne "", which I changed to
      ((defined $type) && ($type ne "")).
      
      The other is due to NULL values in the iface column of the interfaces table.
      Rob is going to change the schema to disallow such NULLs.
      5a8a8f27
  23. 05 Mar, 2003 1 commit
  24. 12 Feb, 2003 1 commit
  25. 10 Feb, 2003 1 commit
  26. 04 Feb, 2003 1 commit
  27. 03 Feb, 2003 2 commits
  28. 30 Jan, 2003 1 commit
  29. 10 Jan, 2003 1 commit
  30. 20 Dec, 2002 1 commit
  31. 19 Dec, 2002 1 commit
  32. 06 Nov, 2002 1 commit
    • Shashi Guruprasad's avatar
      NSE related changes: · 05bc3bd4
      Shashi Guruprasad authored
        - Fixes the routing problem
        - A new type "sim" has been created but not in the DB. node_types and
          nodes remain unchanged. This will change after we figure out how
          to represent in the DB the local multiple virtnodes in one phynode case
          The frontend tb_compat.tcl adds the sim type and ptopgen associates
          a huge number of sim nodes to all local PCs.
        - All simulated nodes go into one pc untill I finish coding the distributed
          nse case. Also, sim nodes go through assign but with an explicit
          "fix-node" directive in the top file. A random free pc is chosen using
          the avail script in assign_wrapper. If we don't fix node it, assign
          maps sim nodes to multiple phy nodes even when a valid all to one
          mapping is possible.
        - Syntax for nse:
      
         $ns make-simulated {
      
             set simnode1 [$ns node]
             set simnode2 [$ns node]
      
         }
         ...
      
         The old syntax
      
         set nsenode [$ns nsenode]
         $nsenode make-simulated {
         }
      
         is deprecated
      
        - All 38 frontend tests in the testsuite pass
      
        - A new table v2pmap has been added to handle multiple virt nodes to
          one phy node mapping. This is used in "tmcc hostnames" currently.
      
        - The phy node that is picked to run nse is loaded with a custom image
          FBSD45-NSE . This can use the default FBSD kernel if there is a mechanism
          to run at 1000HZ, have options IPFIREWALL_FORWARD and PERFMON turned on.
          The image is in the 'testbed' group. Do not delete this image.
      
        - Static routes now adds routes for the case dst == nexthop. The routing
          graph would be disconnected otherwise and I need to traverse this in
          assign_wrapper for nse. On the client side, such a route is filtered out in
          libsetup.pm
      
        - sim nodes are also correctly visualized
      05bc3bd4
  33. 07 Jul, 2002 1 commit