Skip to content
  • Robert Ricci's avatar
    Working version of auto speed selection for vlinks · eac6b811
    Robert Ricci authored
    Use '*' as the bandwidth on the link line in the .top file to have
    assign auto-select the speed for the link - it uses the slower of the
    two interfaces selected as endpoints for the link.
    
    Tested, but not heavily.
    
    Known limitations:
    
    * Doesn't work with trivial or emulated links, it's not clear what the
    semantics would be.
    
    * Doesn't work on links that go directly to switches, for complicated
    reasons of code strcutre. We never use these in practice anyway.
    
    * Not yet supported in XML parser; it should be a special tag or
    attribute in that format.
    
    * Might not find valid solutions in a very unlikely case: if a single
    node has interfaces of different speeds on the same physical switch,
    this code will always select the faster interface that's not already in
    use. If the faster interface is faster than the inter-switch bandwidth,
    and the slower interface is slower than it, assign *could* find a
    feasible solution by using the slower interface.  However, it will never
    try this solution.
    
    * Assign doesn't print the speed it picks; its up to the wrapper to know
    how fast the interface is. However, this shouldn't be an undue burden,
    as assign *never* prints out link speeds.
    eac6b811