NXP Semiconductors Product Brief: S32G PFE Product Brief

Document Number: 2.0

Rev. 2.0 02/2023

1. Software Product Overview

The Packet Forwarding Engine (PFE) software (SW) consists of the following SW components for the S32G Hardware (HW) Platform:

All components, or specific ones, are subject to integration with the target environment, represented by the target HW platform, operating system (OS), OS-provided networking components (Networking Stack, firewall), and related user applications.

Firmware

Firmware is a software component running within the PFE. Each packet reaching the PFE (ingress/egress) is processed by the firmware, which is responsible for packet classification, routing, modifications, and supporting functions. Firmware is under the control of NXP and can be modified/extended as required by target use cases to add specific features related to Ethernet traffic processing. The firmware is delivered in a binary form.

Ethernet Driver

The Ethernet driver is, in general, an OS-specific component and consists of three main functional blocks:

Configuration API

To allow host applications to configure PFE features, the PFE SW provides a configuration API called "Fast Control Interface (FCI)." It is an io-ctl-like interface implemented as a user-space library and a kernel-space part running within the driver. Functions like fci_open(), fci_write(), fci_cmd(), or fci_query() provided by the LibFCI are available to pass commands with arguments and receive responses. The Configuration API implementation is closely coupled to the platform driver and is therefore OS-dependent.

CMM

CMM is a host user-space demo application developed to simplify the configuration of some PFE features, like L3 Router. It runs within the host OS and monitors the networking stack. When it detects an Ethernet flow that could be potentially fast-forwarded (routed by PFE instead of the host CPU), it uses LibFCI to configure the PFE accordingly. Users do not need to program their own management application and configure the PFE directly; instead, they configure the routing subsystem using native OS-provided interfaces. CMM could potentially be extended to automatically configure IPsec offload or L2 bridging. For CMM availability, please contact an NXP representative.

2. Software Content

This chapter covers a basic functional description of features supported by the PFE block and related SW stack (firmware, drivers, APIs).

Datapath Endpoint

This is standard data flow functionality provided by the Firmware and Ethernet driver via endpoints (PFEn) exposed to the OS and corresponding to particular physical interfaces (MACn) of the PFE. It covers:

Figure 2. Driver and Interfaces depicts the interaction between CPU, PFE, and interfaces.

IPv4/IPv6 Router

The IPv4/IPv6 Router is a dedicated feature to offload the host CPU from tasks related to forwarding specific IP traffic between two physical interfaces. Normally, ingress IP traffic is passed to the host CPU running the TCP/IP stack, which is responsible for routing the packets. Once the stack identifies that a packet does not belong to any local IP endpoints, it performs a lookup in the routing table to determine how to process such traffic. If the routing table contains an entry associated with the packet (5-tuple search), the stack modifies and forwards the packet to another interface to reach its intended destination node.

The PFE can be configured to identify flows that do not need to enter the host CPU using its internal routing table, ensuring that the correct packets are forwarded to the correct destination interface. The following features support the forwarding functionality:

L2 Bridge (Switch)

The L2 Bridge functionality covers forwarding of packets based on MAC addresses. It allows moving bridging-related tasks from the host CPU to the PFE, thus offloading the host-based networking stack. The L2 Bridge feature represents a network switch device implementing the following functionality:

The bridge utilizes PFE HW accelerators to perform MAC and VLAN table lookups, making these operations highly optimized. The Host CPU SW is solely responsible for correct bridge configuration using the dedicated API.

Ingress QoS

Under heavy traffic conditions, a network device can experience a "congestion state." This can be caused, for instance, by internal performance limitations (e.g., limited processing bandwidth for routing large amounts of small packets or too complex/time-consuming operations), resulting in packet drops within the device's input stages. Therefore, the input interface is where Ingress QoS takes place. Its main purpose is congestion avoidance and congestion control. To support this, Ingress QoS implements the following mechanisms:

These mechanisms allow users to prioritize ingress traffic and ensure that high-priority traffic is received preferentially at the expense of low-priority flows.

Classification

Classification is implemented via a table where the user can program data flow parameters (L2/L3/L4) and specify which type of traffic (Managed, unManaged, Reserved) the flow belongs to. Optionally, certain flows can be classified as "To be dropped" to identify and terminate malicious flows within the ingress block, without reaching subsequent processing stages.

WRED

After the classification stage, Ingress QoS implements the WRED algorithm to drop low-priority traffic when the PFE reaches a congestion state. There are multiple configurable zones with different thresholds and drop probabilities. The higher the zone, the higher the drop probability used by WRED.

Figure 3. WRED Zones illustrates the different zones and their associated actions.

Shaper

Frames passing the WRED are routed to the last Ingress QoS component: the port-based rate shaper. This shaper is implemented for the complete port traffic. It uses a standard token bucket algorithm to count the number of bytes to be admitted. The user can configure its parameters and leverage the maximum data rate (64 kbps to 2.4 Gbps) to be received by the particular ingress interface.

Ingress QoS also provides statistics to inform the user about the number of drops at particular stages.

Egress QoS

Egress QoS is located within the egress stage of the PFE packet processing pipeline. It is implemented on a per-interface basis using a set of queues (8x), schedulers (2x), and shapers (4x) with configurable topology.

Figure 4. Egress QoS Topology Example shows a typical Egress QoS topology.

Queue

A Queue is an entity representing an input FIFO of the Egress QoS block, used to temporarily hold packets to be transmitted. It can also be understood as an interface through which packets belonging to a certain traffic class are transmitted. It has a limited size; once this limit is reached, all attempts to enqueue additional packets into the full queue result in "tail drop behavior," where new packets are dropped. Packets are written to particular queues by the PFE classifier engine.

The mapping between traffic class and destination queue is defined by a configurable priority mapping table. The user can configure the PFE to map packets to queues based on the TOS/TrafficClass value from the IPv4/IPv6 header. Packet transmission from queues is managed using schedulers and various scheduling algorithms to arbitrate the queues.

Scheduler

A Scheduler is a component of Egress QoS responsible for traffic aggregation from multiple queues. Its main task is to select the next packet from a queue for transmission. Schedulers implement the following scheduling disciplines:

The maximum number of inputs assigned to a single scheduler is 8.

Shaper

Egress QoS implements 801.Q Credit Based Shapers. Their purpose is to space out frames as much as possible, reduce bursting during data peaks, and control the maximum egress data rate (in data rate or packet rate units). Generally, shapers operate with configurable clock ticks. With each tick, the internal credit value is updated according to configured parameters. When an input queue has data and the credit value is positive, the queue is serviced, and the credit value is decreased. If the credit value is negative, the input queue will not be serviced. Users can configure the position and parameters of the shaper according to application needs.

Flexible Parser and Flexible Router

The PFE classifier performs a lookup on standard L2/3/4 header fields to make a routing decision. The flexible parser allows proprietary fields to be part of the routing decision. A similar scheme is implemented in HW for the GMAC on S32G. For PFE, this is a firmware-based solution.

Flexible Filter

Flexible Filter allows users to define a table of rules associated with certain actions. Each rule specifies data, data position, and a mask to be matched with the content of an Ethernet frame. When a frame payload matches the rule, the associated action (accept, reject, jump to another rule) is executed. This enables routing CAN frames to Ethernet and vice-versa with zero host intervention, all running on the M0+ LLCE core.

2.1. Premium Features

IDPS

Intrusion detection and prevention system extensions, in cooperation with the Argus PFE Firmware API, have been created for the customer library. This allows customer-specific classification of packet flows at the firmware level, offering performance boosts for customer applications and added flexibility. Please contact an NXP representative for more details on IDPS.

IPsec

The base firmware includes IPsec support to offload protected packets to the HSE via the utility PE within PFE. The base firmware does not utilize the additional IPsec protocol acceleration feature provided by the HSE (i.e., IPsec ESP encapsulation and decapsulation). Firmware modifications leverage this feature to improve the performance of the solution.

3. Supported Targets

Please refer to the Release Notes document for release-specific details.

4. Quality, Standards Compliance and Testing Approach

The S32G PFE Firmware, MCAL, and QNX SW products are developed according to NXP Software Development Processes, which are Automotive-SPICE, IATF16949, and ISO 9001 compliant.

5. Document Information

Table 1. Sample revision history

Revision number Date Substantive changes
1.0 10/2021 Initial release
1.7 2/2022 Corrected Figure 1 and 4
2.0 2/2023 Updated of S32G

File Info : application/pdf, 12 Pages, 341.19KB

PDF preview unavailable. Download the PDF instead.

S32GPFEPB

References

Microsoft Word for Microsoft 365

Related Documents

Preview MCUXpresso SDK API Reference Manual - NXP Semiconductors
This document serves as a comprehensive API reference manual for the MCUXpresso SDK, detailing the Application Programming Interfaces for various drivers and components developed by NXP Semiconductors. It covers essential functionalities for embedded systems development, including clock management, analog-to-digital conversion, comparator drivers, and direct memory access.
Preview NXP S32G2 and S32R SerDes Subsystem Reference Manual
Detailed reference manual for the NXP S32G2 and S32R SerDes Subsystem, covering PCIe controller and PHY specifications, register descriptions, and operational modes.
Preview NXP EVSE-SIG-BRD1X User Guide: EVSE & EV Development Board
Comprehensive user guide for the NXP EVSE-SIG-BRD1X development board. Learn about its features, connectors, software setup, and integration for electric vehicle supply equipment (EVSE) and electric vehicle (EV) platform development.
Preview QorIQ LX2160A Security (SEC) Reference Manual
Comprehensive reference manual detailing the Security (SEC) engine functionality, implementation, modes of operation, hardware description, frame queues, descriptors, commands, and protocol acceleration for the NXP QorIQ LX2160A processor. Covers IPsec, SSL/TLS/DTLS, MACsec, WPA2, 3G RLC, LTE/5G PDCP, public key cryptography, key agreement functions, and cryptographic hardware accelerators.
Preview NXP AN13129: GD316x Advanced IGBT and SiC Gate Driver Fault Management
An application note from NXP Semiconductors detailing the fault management, diagnostics, interrupt, and priority table for the GD316x series of advanced IGBT and SiC gate drivers, crucial for automotive inverter applications.
Preview MPC5777C MCAL4.3 Dual Core Project Implementation Guide
This application note provides an introduction to dual-core project implementation in MCAL4.3 using the MPC5777C microcontroller. It covers startup and link file modifications, memory sections, interrupt vector configuration, and testing procedures.
Preview 3-phase Sensorless PMSM Motor Control Kit with S32K344: A Technical Overview
Explore the design and implementation of a 3-phase Permanent Magnet Synchronous Motor (PMSM) vector control drive using the NXP S32K344 microcontroller. This application note details the use of RTD Low Level API and the Motor Control Application Tuning (MCAT) tool for efficient motor control.
Preview i.MX RT685 Evaluation Board User Manual
User manual for the NXP i.MX RT685 Evaluation Board (MIMXRT685-EVK), detailing its features, layout, setup, peripherals, and troubleshooting.