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 OPX 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.

Functionality Description
Linux interfaces associated with physical ports OPX uses internal Linux tap devices 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 Packet I/O describes the control plane packet forwarding between physical ports and associated Linux interfaces—implemented as a standalone thread of the NAS daemon. Packets received by the NPU are forwarded to the CPU, and the packet I/O thread receives the packet through a SAI API callback. Each received packet contains the identity of the source physical port. The packet I/O module then 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.

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 OPX object library service as a server application to provide programmability for system devices.

File system organization

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

  • /usr/bin — contains binaries
  • /usr/lib — contains libraries and YANG models
  • /etc/opx/ — contains platform description files and default configuration files
Files Description
Platform description files Contains hardware module descriptions that apply to the current platform — the number of physical ports, fans, and power supplies
Default configuration files Contains initialization applicable to the current platform, such as the initial SAI configuration and system ACL rules applied at initialization

System startup

OPX uses the systemd framework to define the system startup sequence — unit definitions are stored in /lib/systemd/system/opx*.service. The systemd framework is enabled under Debian Stretch (see systemd).

Clone this wiki locally