Skip to main content
This page lists the Scala Switch attributes a simulation configuration can set, with their types and defaults, and shows how to change them. The tables list the attributes the components API offers for the Scala Switch, grouped by the component that holds them. The page ends with the configuration rules: what stops a simulation, what the switch does not check, and the PFC class-to-pool rule. Packet handling and Shared buffer manager explain the behavior behind them.

How to read the tables

Default is the value an attribute carries in a switch the platform adds to a configuration, for example with POST /api/v1/configurations/{config_id}/components. Such a switch carries every attribute in these tables at its Default until you change it. If you supply a switch’s typedParameters yourself instead, for example in the components of POST /api/v1/configurations, include every attribute of each sub-component you send, such as SharedBufferManager or EcnHandler: an attribute left out of it runs the model’s built-in value, which can differ from the Default shown here. Attributes at the switch’s top level, and sub-components you leave out entirely, take their Defaults. Type is the value of the attribute’s type field in the API, which a patch must repeat. Values of type bytes, datarate, and timeval carry a unit: KB is 1,000 bytes and MB is 1,000,000 bytes; data rates are in Gbps; times are in ps, ns, us (µs), ms, or s. A bytes value can be at most 4,294,967,295 bytes. Attributes of type string that hold a list, such as PoolAllocationMap, hold eight comma-separated entries, where the index is the traffic class or the pool number, 0 to 7. The platform shows them in square brackets, for example [0.9, 0.1, 0, 0, 0, 0, 0, 0]. Send them the same way when you change one: as a string, with the brackets and all eight entries (Change values in a configuration).

Switch

These attributes sit at the top level of the switch component’s typedParameters.

Network interfaces

The NetworkInterface component holds three sub-components: UplinkNetworkInterface and DownlinkNetworkInterface, the switch’s uplink and downlink ports, and TransmissionMedium, the link.

UplinkNetworkInterface

DownlinkNetworkInterface

TransmissionMedium

Packet trimmer

The PacketTrimmer component reduces eligible packets to headers only during congestion, instead of dropping them. Trimming runs only with UETPolicyEnabled set to true and PFC off for every traffic class; otherwise the simulation stops (see Configuration rules that stop a simulation). Egress admission describes which packets are trimmed.

Load balancing flowlet

The LoadBalancingFlowlet component holds the parameters of the flowlet load balancing method. The switch reads them only when LoadBalancingMethod is flowlet, but checks the range of Gap whenever the configuration carries the component.

Shared buffer manager

These attributes sit in the SharedBufferManager object of the switch’s typedParameters. Shared buffer manager shows how they combine at startup, with a worked example of the defaults.

ECN handler

The EcnHandler object in the switch’s typedParameters configures the ECN marker. ECN marking explains which limit the two thresholds are fractions of.

Setting attributes through the platform

Attributes are set per configuration, through the platform API. The reference pages for the two APIs involved are Components and Configurations. Get an API token first (Authentication) and export it as SCALA_API_TOKEN.

Read the switch’s parameters

GET /api/v1/components lists the component types the platform offers; the Scala Switch entry gives its id and its versions. GET /api/v1/components/{component_id}, with the version query parameter set to the model version these pages describe, returns the switch’s typedParameters. Each attribute in the tables above appears there as an object with its value, its type, a unit for dimensional types, and, where the model sets them, its default, description, min, max, and allowed values in enum. A sub-component, such as NetworkInterface or SharedBufferManager, is a nested object named after it. For example:

Change values in a configuration

PATCH /api/v1/configurations/{config_id}/components/{component_name}/parameters merges a patch into the typedParameters of the component named component_name in the configuration; GET /api/v1/configurations/{config_id}/components lists the configuration’s components and their names. Set CONFIG_ID to the configuration’s ID and SWITCH_NAME to the name of the switch component you are changing. A configuration can hold several Scala Switch components, for example one for each tier; each has its own typedParameters, and a patch changes only the component it names. The patch repeats the nesting of the component’s typedParameters, down to each attribute you change:
  • Only keys the component already has can be updated. An unknown key returns 400.
  • Each attribute’s type must match the stored type, or the request returns 400. The request also returns 400 for an empty patch, or when a nested object is sent where an attribute is expected, or the reverse.
  • The value and the unit you send replace the stored ones, so send the unit with every dimensional value.
  • A list attribute’s value is a string with its square brackets and exactly eight entries, each made of letters, digits, ., _, +, or -, for example "value": "[0.8, 0.2, 0, 0, 0, 0, 0, 0]". A list in any other form returns 400.
  • Where an attribute has enum values, its value must be one of them, or the request returns 400.
  • A 200 response returns the component’s full, updated typedParameters.
This example sets the switch’s uplink DataRate to 800 Gbps and its Delay to 750 ns. An uplink runs at 800 Gbps only where the DataRate of the uplink peer’s DownlinkNetworkInterface is also 800 Gbps or more, and the switch’s Delay applies to the links to its uplink peers (see Network interfaces):
A switch the platform added carries every attribute at its Default, so a patch only needs the attributes you change. For a switch whose typedParameters you supplied yourself, see How to read the tables.

Configuration rules that stop a simulation

The switch checks these rules before or as the simulation starts, and stops the run when one is broken:
  • EnablePFC or TrafficClassPoolMapping does not have exactly eight entries, or has an entry that is not a whole number.
  • PoolAllocationMap does not have exactly eight entries, or has an entry that is not a number.
  • PoolAllocationMap has no non-zero entry.
  • PoolAllocationMap sums to more than 1 by more than its last non-zero entry.
  • The total headroom, HeadRoomPerPortLimit × connected ports, is larger than TotalSharedBufferSize.
  • LoadBalancingMethod is flowlet and EcmpHashMethod is dpr or dprWithFallback.
  • Gap is outside 0s to 2s. This is checked whenever the configuration carries the LoadBalancingFlowlet component, whatever the method.
  • LoadBalancingStatsReportInterval is below 10us.
  • UETPolicyEnabled is true on any switch and the topology places a NIC other than the Scala UET NIC or the Scala MRC NIC. Under the UET policy the switch takes each packet’s traffic class from its DSCP codepoint, which those two NICs send (Buffer under the UET policy).
  • TrimmingEnabled is true and UETPolicyEnabled is false. Packet trimming runs only under the UET policy.
  • TrimmingEnabled is true and any entry of EnablePFC is 1. Trimming cannot be combined with PFC. The default EnablePFC enables TC0 and TC1, so set every entry to 0 before turning trimming on.

Settings the switch does not check

  • A PoolAllocationMap that does not sum to 1 is otherwise accepted. The shortfall or excess is added to or taken from the last pool with a non-zero entry, but that pool’s ECN thresholds, and with LossyAlpha = 0 its fixed egress limit, still come from its size before the adjustment. Make the entries sum to 1.

PFC traffic classes and pools

PFC behaves as these pages describe when each PFC-enabled class n is mapped to pool n, as the default mapping does.