LowCbfConnector

The LowCbfConnector is a Tango device server for monitoring and control of registers in the Low.CBF P4 switch. Tofino-based in-network processors require two compulsory components, the P4 program that will be compiled and run on the switch and the compiler/SDE to compile this code.

In addition, software is required to be able to process runtime commands via a series of API (i.e. gRPC, gNMI), for this part, SKA leverages the Barefoot Runtime gRPCs. These gRPCs are used being the scene in the Tango devices, through multiple classes centralised in the Connector class, to configure and monitor a given switch.

In terms of Tango device usability, the Connector offers standard operations with:

  • attributes representing both states of the tango device itself and the health and monitoring of the P4 switch

  • commands to control both tango device and the switch including routing configuration and telemetry.

Tango attribute/command list

Low CBF Connector Tango attributes

LowCbfConnector.allocatorAddress()

Return Allocator Device FQDN.

Returns:

JSON string

LowCbfConnector.arpRoutingTable()

Return the routingTable attribute.

LowCbfConnector.arp_replies()

Get route info needed by P4 switches to route SPS packets

Returns:

JSON string

LowCbfConnector.basicRoutingTable()

Return the routingTable attribute.

LowCbfConnector.bfrtAddress()

Return BFRT gRPC address.

Returns:

JSON string

LowCbfConnector.byteRate()

Return the byteRate attribute.

LowCbfConnector.bytesLossRate()

Return the bytesLossRate attribute.

LowCbfConnector.bytesLost()

Return the bytesLost attribute.

LowCbfConnector.dynamicRoutes()

Return the dynamicRoutes attribute.

LowCbfConnector.function_alveo_port_up()

Indicate the percentage of Alveo port up.

Returns:

percentage of Alveo port up

LowCbfConnector.function_p4_code_version_present()

Indicate if P4 is present.

Returns:

true if program is present

LowCbfConnector.function_pss_port_up()

Indicate the percentage of PSS port up.

Returns:

percentage of PSS port up

LowCbfConnector.function_pst_port_up()

Indicate the percentage of PST port up.

Returns:

percentage of PST port up

LowCbfConnector.function_sdp_port_up()

Indicate the percentage of SDP port up.

Returns:

percentage of SDP port up

LowCbfConnector.function_sps_port_up()

Indicate the percentage of SPS port up.

Returns:

percentage of SPS port up

LowCbfConnector.function_valid_routing_port()

Indicate if requested is valid.

Returns:

true if all routes are valid

LowCbfConnector.hardware_motherboard_temperature()

Get board average temperature.

Returns:

average board temperature

LowCbfConnector.hardware_tofino_temperature()

Get board tofino temperature.

Returns:

tofino board temperature

LowCbfConnector.healthState(*args, **kwargs)

Override attribute when test mode is active and value specified.

LowCbfConnector.health_function(*args, **kwargs)

Override attribute when test mode is active and value specified.

LowCbfConnector.health_hardware(*args, **kwargs)

Override attribute when test mode is active and value specified.

LowCbfConnector.health_process(*args, **kwargs)

Override attribute when test mode is active and value specified.

LowCbfConnector.health_status()

Get health status from the P4 switch.

Returns:

JSON string

LowCbfConnector.ipAddressToMacAndPort()

Return the portStatus attribute.

LowCbfConnector.multicastSessions()

Return the multicast session configured on the switch

LowCbfConnector.packetLossRate()

Return the packetLossRate attribute.

LowCbfConnector.packetRate()

Return the packetRate attribute.

LowCbfConnector.packetsLost()

Return the packetsLost attribute.

LowCbfConnector.portStatus()

Return the portStatus attribute.

LowCbfConnector.port_rx_pps()

Get incoming throughput in packets per seconds for all ports.

Returns:

JSON string

LowCbfConnector.port_rx_throughput()

Get incoming throughput for all ports.

Returns:

JSON string

LowCbfConnector.port_tx_pps()

Get outgoing throughput in packets per seconds for all ports.

Returns:

JSON string

LowCbfConnector.port_tx_throughput()

Get outgoing throughput for all ports.

Returns:

JSON string

LowCbfConnector.psrRoutingTable()

Return the routingTable attribute.

LowCbfConnector.routeCounters()

Return the routeCounters attribute.

LowCbfConnector.sdpIpRoutingTable()

Return the routingTable attribute.

LowCbfConnector.sdpMacRoutingTable()

Return the routingTable attribute.

LowCbfConnector.speadMultiplierCounterTotal()

Return the packetsTotal attribute.

LowCbfConnector.speadMultiplierRoutingTable()

Return the routingTable attribute.

LowCbfConnector.speadUnicastCounterTotal()

Return the packetsTotal attribute.

LowCbfConnector.speadUnicastRoutingTable() str

Return the routingTable attribute.

Returns:

JSON string

LowCbfConnector.spsRates()

Return all the rates of current active SPS traffic arriving at that switch.

Returns:

JSON string with current active traffic

LowCbfConnector.staticConfig()

Return the staticConfig attribute.

LowCbfConnector.subStationTable()

Return the routingTable attribute.

LowCbfConnector.switchName()

Return Switch Name.

Returns:

JSON string

LowCbfConnector.test_mode_overrides(value_str: str) None

Write new override configuration.

Parameters:

value_str – JSON-encoded dict of overrides (attribute name: value)

LowCbfConnector.unit_serial()

Get serial number of the switch.

Returns:

string

Low CBF Connector Tango commands

LowCbfConnector.AddARPEntry()
Parameters:

argin (string) –

JSON String describing one or more routing rules to add. e.g. ‘{“arp”: [{“ip”: {“address”: “192.168.1.1”},

”mac”: {“address”: “aa:bb:cc:dd:ee:ff”}}]}’

We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.AddBasicEntry(argin)
Parameters:

argin (string) – JSON String describing one or more routing rules to add. e.g. ‘{“basic”: [{“src”: {“port”: “1/0”}, “dst”: {“port”: “2/0”}}]}’ We assume src is an engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.AddIPToResolve(argin)
Parameters:

argin (str) – JSON String describing one or more IP Addresses to ARP resolve. e.g. ‘{“IP”: [{“address”: “192.168.1.1”}]}’

LowCbfConnector.AddMultiplierUnicastEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“spead”: [{“src”: {“frequency”: 123, “beam”: 12, “sub_array”: 1 }, “dst”: {“port_bf”: “12/0”, “port_corr”: “13/0”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.AddPSREntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“psr”: [{“src”: {“beam”: 12 }, “dst”: {“port”: “12/0”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.AddPTPClockPort(argin)
Parameters:

argin (str) – JSON String describing one or more ports connected to PTP. e.g. ‘{“PTPClock”: [{“port”: “1/0”}]}’

LowCbfConnector.AddPTPEntry(argin)
Parameters:

argin (str) – JSON String describing one or more PTP routing rules to add. e.g. ‘{“ptp”: [{“src”: {“port”: “1/0”}, “dst”: {“port”: “2/0”}}]}’

Returns:

None

LowCbfConnector.AddPortMapping(argin)
Parameters:

argin (str) – JSON String describing one or more port mapping to add e.g. ‘{“port_mapping”: [{“board_num”: 1, “port_num”: 1, “lane_num”: 0}]}’

Returns:

None

LowCbfConnector.AddPortsToPTP(argin)
Parameters:

argin (str) – JSON String describing one or more ports connected to PTP. e.g. ‘{“PTPMulti”: [{“port”: “10/0”}, {“port”: “11/0”}]}’

LowCbfConnector.AddPortsToSDPARP(argin)
Parameters:

argin (str) – JSON String describing one or more ports connected to SDP. e.g. ‘{“SDP”: [{“port”: “10/0”}]}’

LowCbfConnector.AddSDPIPEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“sdp_ip”: [{“src”: {“ip”: “192.168.1.1” }, “dst”: {“port”: “12/0”}}]}’

Returns:

None

LowCbfConnector.AddSDPMACEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“sdp_mac”: [{“src”: {“ip”: “192.168.1.1” }, “dst”: {“mac”: “aa:bb:cc:dd:ee:ff”}}]}’

Returns:

None

LowCbfConnector.AddSpeadUnicastEntry(argin)

Add SPEAD unicast entry.

Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“spead”: [{“src”: {“frequency”: 123, “beam”: 12, “sub_array”: 1 }, “dst”: {“port”: “12/0”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.AddSubStationEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“substation”: [{“id”: 1}]}’

Returns:

None

LowCbfConnector.ClearARPTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearBasicTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearPSRTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearPTPTable(argin)
Parameters:

argin (str) – JSON String describing one or more PTP routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearSDPIPTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearSDPMACTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearSpeadMultiplierTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearSpeadUnicastTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ClearSubStationTable(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to delete. If a route is partially specified, all matching routes will be deleted.

Returns:

None

LowCbfConnector.ConnectToSwitch(argin)
Parameters:

argin (str) – JSON String describing the address to connect to. e.g. ‘{“Switch”: “202.9.15.135:50052”}’

LowCbfConnector.LoadPorts(argin)
Parameters:

argin (str) – JSON String describing the physical ports configuration. e.g. ‘{“Physical”: [{“port”: “10/0”, “speed”: “100G”, “fec”: “none”, “autoneg”: “disable”, “mac”: “84:c7:8f:03:79:b2” }]}’

LowCbfConnector.RegisterCallbackAllocator(argin)
Parameters:

argin (str) – JSON String describing one or more ports connected to SDP. e.g. ‘{“Allocator”: “tango-databaseds.ska-low-cbf:10000/low-cbf/allocator/0”}’

LowCbfConnector.RemoveARPEntry(argin)
Parameters:

argin (str) – String describing one or more ARP rules to remove.. e.g. ‘{“arp”: [{“ip”: {“address”: “192.168.1.1”}, “mac”: {“address”: “aa:bb:cc:dd:ee:ff”}}]}’

Returns:

None

LowCbfConnector.RemoveBasicEntry(argin)
Parameters:

argin (str) – String describing one or more basic rules to remove. e.g. ‘{“basic”: [{“src”: {“port”: “1/0”}}]}’

Returns:

None

LowCbfConnector.RemovePSREntry(argin)
Parameters:

argin (str) – JSON String describing one or more psr rules to remove. e.g. ‘{“psr”: [{“src”: {“beam”: 12 }}]}’

Returns:

None

LowCbfConnector.RemovePorts(argin)
Parameters:

argin (str) – JSON String describing the physical ports to remove. e.g. ‘{“Physical”: [{“port”: “10/0”}]}’

LowCbfConnector.RemoveSDPIPEntry(argin)
Parameters:

argin (str) – JSON String describing one or more psr rules to remove. e.g. ‘{“sdp_ip”: [{“src”: {“ip”: “192.168.1.1” } }]}’

Returns:

None

LowCbfConnector.RemoveSDPMACEntry(argin)
Parameters:

argin (str) – JSON String describing one or more psr rules to remove. e.g. ‘{“sdp_mac”: [{“src”: {“ip”: “192.168.1.1” }}]}’

Returns:

None

LowCbfConnector.RemoveSpeadMultiplierEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to remove. e.g. ‘{“spead”: [{“src”: {“frequency”: 123, “beam”: 12, “sub_array”: 1 }}]}’ src is required, dst is optional

Returns:

None

LowCbfConnector.RemoveSpeadUnicastEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to remove. e.g. ‘{“spead”: [{“src”: {“frequency”: 123, “beam”: 12, “sub_array”: 1 }}]}’ src is required, dst is optional

Returns:

None

LowCbfConnector.RemoveSubStationEntry(argin)
Parameters:

argin (str) – JSON String describing one or more substation to stop dropping. e.g. ‘{“substation”: [{“id”: 1}]}’

Returns:

None

LowCbfConnector.ResetPortStatistics()

Reset all port statistics counters

LowCbfConnector.UnsubscribeAllocator()

Unsubscribe from the allocator.

LowCbfConnector.UpdateARPEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“arp”: [{“ip”: {“address”: “192.168.1.1”}, “mac”: {“address”: “aa:bb:cc:dd:ee:ff”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.UpdateBasicEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“basic”: [{“src”: {“port”: “1/0”}, “dst”: {“port”: “2/0”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.UpdateMultiplierUnicastEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“spead”: [{“src”: {“frequency”: 123, “beam”: 12, “sub_array”: 1 }, “dst”: {“port”: “12/0”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.UpdatePSREntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“psr”: [{“src”: {“beam”: 12 }, “dst”: {“port”: “12/0”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

LowCbfConnector.UpdatePTPEntry(argin)
Parameters:

argin (str) – JSON String describing one or more PTP routing rules to add. e.g. ‘{“ptp”: [{“src”: {“port”: “1/0”}, “dst”: {“port”: “2/0”}}]}’

Returns:

None

LowCbfConnector.UpdateSDPIPEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“sdp_ip”: [{“src”: {“ip”: “192.168.1.1” }, “dst”: {“port”: “12/0”}}]}’

Returns:

None

LowCbfConnector.UpdateSDPMACEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“sdp_mac”: [{“src”: {“ip”: “192.168.1.1” }, “dst”: {“mac”: “aa:bb:cc:dd:ee:ff”}}]}’

Returns:

None

LowCbfConnector.UpdateSpeadUnicastEntry(argin)
Parameters:

argin (str) – JSON String describing one or more routing rules to add. e.g. ‘{“spead”: [{“src”: {“frequency”: 123, “beam”: 12, “sub_array”: 1 }, “dst”: {“port”: “12/0”}}]}’ We assume src is am engineering subarray and dst is a port.

Returns:

None

Dynamically Created Tango Attributes

These attributes are created for each P4 switch port (currently ports 1-32) on startup.

LowCbfConnector.diagnostic_port_N_rxpps

Where N is the port number [1..32]

LowCbfConnector.diagnostic_port_N_serial

Where N is the port number [1..32]

LowCbfConnector.diagnostic_port_N_txpps

Where N is the port number [1..32]

LowCbfConnector.diagnostic_port_N_up

Where N is the port number [1..32]

LowCbfConnector.hardware_port_N_rxpower

Where N is the port number [1..32]

LowCbfConnector.hardware_port_N_temperature

Where N is the port number [1..32]

LowCbfConnector.hardware_port_N_txpower

Where N is the port number [1..32]

LowCbfConnector.process_port_N_rxthroughput

Where N is the port number [1..32]

LowCbfConnector.process_port_N_txthroughput

Where N is the port number [1..32]