Introduction to Diagnostic Routing Function and Testing Scheme
I. Preface
With the rapid advancement of in-vehicle communication technologies (such as OTA, SOME/IP, and DDS), the gateway—being the central hub of the vehicle network—plays a pivotal role in routing capabilities. OTA upgrades impose higher demands on the diagnostic routing performance of the gateway; concurrently, the widespread adoption of SOME/IP and DDS requires gateways to possess robust signal-to-service (S2S) routing capabilities.
This article focuses on the diagnostic routing functionality of the gateway and outlines its performance testing scheme.
II. Gateway Function Overview
Given its central position within the vehicle network, the gateway typically offers the following core functionalities:
Protocol Conversion: Conversion and forwarding of data among different bus protocols (e.g., signal routing: CAN ↔ Ethernet; diagnostic routing: DoIP ↔ DoCAN).
Routing Function: Directional forwarding of frames/messages across different network domains, based on predefined rules or policies (e.g., routing mapping tables).
Partial Network (PN) Management: Coordination and control of sleep/wakeup sequences for connected domains according to the vehicle’s sleep/wake strategy.
External Communication Interface: Serving as the principal interface for data exchange between the vehicle network and external systems (such as diagnostic tools and cloud servers).
Network Security Protection: Acting as a critical security boundary, enforcing firewall policies, access control, secure diagnostic routing, secure flashing, etc., to isolate external threats, prevent unauthorized access, thwart attacks, and avoid data leaks.
Other Functions: Such as data filtering, time synchronization, etc.
With the evolution toward centralized, service-oriented (SOA) electrical/electronic architectures (EEA) in intelligent connected vehicles, the gateway’s roles and responsibilities must be enhanced and refined:
Cross-Domain Hub: In domain-fused or domain-centralized architectures, the gateway becomes even more crucial in linking powertrain, chassis, body, intelligent driving, and cockpit domains.
High-Efficiency Data Processing: Must support greater bandwidth and lower latency to satisfy real-time demands in intelligent driving and IoV applications.
Service Support: Within SOA, the gateway must evolve beyond signal routing to encompass service discovery, routing, and transformation (e.g. SOME/IP), enabling cross-domain service calls and data sharing.
OTA & Diagnostic Support: Provide secure, reliable, and efficient channels to support large-scale OTA upgrades and remote diagnostics.

AUTOSAR Software Architecture Diagram
Under the AUTOSAR paradigm, the gateway’s routing functionality may be categorized into two levels depending upon whether the data path traverses COM → RTE → SWC:
PDU Routing:
Mechanism: Direct forwarding based on complete Protocol Data Units (PDUs) without parsing inner signals.
Scope: Message routing (e.g., forwarding CAN frames) and diagnostic routing (e.g., forwarding DoIP packets).
Signal Routing:
Mechanism: Parsing individual signals or services within a PDU for purposes such as cross-bus/domain mapping, restructuring, or conversion.
Scope: Signal-to-Signal conversion and Signal-to-Service (S2S) conversion.
III. Diagnostic Routing Function
As the central communication hub, the gateway must support multi-layered routing (PDU routing, signal routing) to meet complex application requirements. Diagnostic routing, due to its varied scenarios, demands custom design and implementation, typically manifested in three modes:
1. OBD Diagnostic Routing
DoIP Port Routing:
Software updates: Diagnostic tester connects via DoIP; gateway supports DoIP ↔ CAN(FD)/LIN conversion.
ZEV (Zero Emission Vehicle) diagnostics: Gateway routes standardized ZEV diagnostic service requests to target ECUs.
Typical scenarios:
DoIP ↔ DoIP Routing: NAT may be required when internal Ethernet node IPs are not visible; otherwise, direct switch-level forwarding may suffice.
CAN Port Routing:
Emissions data reading via CAN(FD).
J2534 software updates requiring conversion between CAN extended and CAN(FD) standard frames.
Typical scenarios:
Special requirements: Some OEMs may require CAN ↔ DoIP / CAN(FD) / LIN conversions to support ECU software updates.
Even when source and destination protocols are identical (e.g. CAN → CAN), security measures and flow control still apply. Pure pass-through may be used when no conversion or transport protocol (TP) processing is needed.
2. OTA Diagnostic Routing
OTA Master as TBox:
Path: TBox → Gateway → Target ECU.
Must support conversion capabilities (DoIP ↔ CAN(FD)/LIN).
Key requirements: parallel forwarding, queue support, and ensuring that the gateway’s own firmware upgrade does not interfere with routing operations.

Parallel Requests Diagram

Queued Requests Diagram
OTA Master as Gateway:
The gateway stores the update package locally.
The gateway directly manages data transfer to connected ECUs.
3. Remote Diagnostic Routing
Emphasis on read operations (status, DTCs, parameter queries) as opposed to OTA’s write operations.
Characterized by high request frequency and small data packets.
Requires low latency and parallel processing, but relatively modest buffering compared to OTA.
IV. Diagnostic Routing Performance
While OBD, OTA, and remote diagnostic routing share many commonalities (e.g. protocol conversion, resource pooling), their performance differentiation lies mostly in resource scheduling strategy. Three primary metrics are:
Communication Channel Allocation
Each ECU diagnostic session uses its own channel.
Principles: channel pool size > maximum parallel sessions; isolation between request and response; high-priority channels reserved for functional addressing.
Buffer Allocation Strategy
Minimum buffer count = (number of ECUs) × 2 + 1
Maximum buffer size tied to the largest ECU data block
Minimum RAM requirement = maximum buffer size × minimum buffer count
May adopt static or dynamic allocation, balancing efficiency and utilization.
Definitions:
Routing Latency
The end-to-end delay in processing and forwarding diagnostic messages (from gateway input to gateway output).
Example: forwarding from DoIP to CAN(FD) in under 10 ms.
OEMs may specify latency thresholds for both request and response.
V. Diagnostic Routing Performance Testing Scheme
1.Test Environment

Power supply for the gateway controller.
Professional tools for simulation and data capture.
2.Test Process
Use an automated CANoe project to test DoIP → CAN(FD) routing.
Components include:
Tester Module: Establish TCP connections, issue DoIP requests, receive responses.
Simulation Node Module: Establish transport protocol sessions with ECU nodes and handle CAN FD traffic.
DLL Library: Facilitates high-efficiency data passage between modules.

Test Process Diagram
3.Test Cases
Multi-Segment Parallel Routing Latency Test
Objective: Verify compliance of maximum parallel forwarding latency.
Method: Simulate requests traversing multiple network segments; measure the time until the first output frame.
Sample Report:

Multi-Segment Parallel & Queued Long-Term Routing Stability Test
Objective: Validate long-term stability under heavy OTA-like load conditions.
Method: Test under default session (parallel only) and programming session (parallel + queue).
Sample Report:

VI. Conclusion
This article presents a detailed explanation of diagnostic routing functionality along with its performance testing methodology.
Polelink remains at the forefront of automotive gateway technology, leveraging deep collaborations with OEMs and extensive testing expertise. If you have more specialized testing needs, feel free to reach out.
Next Issue Preview: We will dive into the gateway’s communication routing functions, including:
Message Routing
Signal Routing
Signal-to-Service (S2S) Routing
Stay tuned!
(Note: Some images in this article are sourced from Vector.)
References:
[1] AUTOSAR_SRS_Gateway
[2] AUTOSAR_SWS_SocketAdaptor

