Skip to content

Run time

Amy Buck edited this page Nov 27, 2018 · 18 revisions

This information describes the NAS run-time processes and components.

NAS software processes

  • opx_cps_service — runs the CPS broker which mediates all CPS operations and events
  • opx_pas_service — PAS daemon which runs PAS functionality
  • opx_nas_daemon — NAS daemon which runs NAS functionality

System components managed by applications:

  • opx-front-panel-ports — Manages physical port mapping to Linux interfaces
  • opx-phy-media-config — Manages configuration of physical media
  • opx-monitor-phy-media — Monitors physical media (SFP) events generated by PAS when a pluggable module is inserted (automatically configures port parameters)
  • opx-ip — Gets/sets IP address parameters using the Base object library API
  • opx-nas-shell — Runs NPU shell commands

NAS Linux adaptation functionality

The NAS daemon integrates standard Linux network APIs with NPU hardware functionality, and registers and listens to networking (netlink) events. When it receives an event, the NAS daemon processes the event contents and programs the NPU with relevant information, such as enabling/disabling an interface, adding/removing a route, or adding/deleting a VLAN.

Internal tap devices are used to associate physical ports on the NPU with Linux interfaces. When the NAS detects a change in physical port status (up/down), the daemon propagates the new port status to the associated tap device.

Packet I/O describes control-plane packet forwarding between physical ports and associated Linux interfaces. Packet I/O is implemented as a standalone thread of the NAS daemon. Packets received by the NPU are forwarded to the CPU. The packet I/O thread receives the packet through the SAI API callback. Each received packet contains the identity of the source physical port. The packet I/O module injects the packet to the tap device associated with the source physical port.

Applications receive packets from the Linux IP stack using standard sockets. Applications use tap devices to transmit packets. The packet I/O thread receives the transmitted packet from the Linux IP stack. Based on the source tap device of the packet, the transmitted packet is forwarded to the associated physical port.

OpenSwitch control plane services

The NAS daemon registers with the object library as a server application to provide programmability of the NPU. The NAS performs create, delete, set, and get operations for objects which model the networking functionality. The PAS daemon also registers with the OpenSwitch object library service as a server application to provide programmability for system devices.

File system organization

The OPX package uses a standard Linux ext4 file system. The Linux packages required for OpenSwitch software are installed on the file system as per standard package locations.

  • /usr/bin — Contains binaries, libraries, and YANG models.
  • /etc/opx/ — Contains platform description files and default configuration files

The platform files contain hardware module descriptions that apply to the current platform — the number of physical ports, fans, and power supplies. The default configuration files contain initialization applicable to the current platform, such as the initial SAI configuration and system ACL rules applied at initialization.

System startup

OpenSwitch OPX uses the system framework to define the system startup sequence — unit definitions are stored in /lib/systemd/system/opx*.service.

Clone this wiki locally