# juliusbairaktaris/openwrt-nss-edma architecture

> Architecture diagram of the GitHub repository juliusbairaktaris/openwrt-nss-edma, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/juliusbairaktaris/openwrt-nss-edma
- Repository: https://github.com/juliusbairaktaris/openwrt-nss-edma

## Overview

This is an OpenWrt distribution tree whose defining product is NSS hardware offload for IPQ807x while retaining upstream EDMA/PPE drivers. The documented user-to-result path begins with network traffic entering the wired ports; a runtime service arms the offload plane, after which the PPE and NSS firmware accelerate supported established flows. New flows and exceptions remain host-mediated. The README also documents wired bridge, multicast, SQM, PPPoE, and Wi-Fi capabilities. The sampled source excerpts do not cover this integration; architecture links below rely on README statements, and paths are included only where supported by the supplied tree.

Main entry points: [`package/kernel/qca-ppe-nss/src/qca_ppe_nss.c`](https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/kernel/qca-ppe-nss/src/qca_ppe_nss.c) (Upstream qca_ppe), [`package/nss/nss-tools/files`](https://github.com/juliusbairaktaris/openwrt-nss-edma/tree/nss-edma-rework/package/nss/nss-tools/files) (NSS service), [`package/nss/nss-tools/files/luci-nss-status.js`](https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/nss/nss-tools/files/luci-nss-status.js) (NSS status UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime control"]
  node_arm["NSS service"]
  node_status["NSS status UI<br/>[luci-nss-status.js]"]
end

subgraph group_wired["Wired datapath"]
  node_host["Linux host path"]
  node_edma["Upstream qca_edma"]
  node_ppe["Upstream qca_ppe<br/>[qca_ppe_nss.c]"]
  node_glue["NSS glue<br/>[qca_ppe_nss.c]"]
end

subgraph group_offload["NSS services"]
  node_firmware["NSS firmware"]
  node_ecm["ECM flow manager"]
  node_nat["Routing and NAT"]
  node_pppoe["PPPoE and VLAN"]
  node_bridge["Wired bridge"]
  node_multicast["Multicast snooping"]
  node_sqm["SQM shaping"]
  node_ingress["Ingress shaping"]
  node_classify["DSCP/mark classes"]
end

subgraph group_wireless["Wireless offload"]
  node_wifi["ath11k Wi-Fi"]
  node_wifili["Wi-Fi offload"]
end

node_ports(("LAN/WAN ports"))

node_ports -->|"receive traffic"| node_edma
node_edma -->|"host forwarding"| node_host
node_arm -->|"arms plane"| node_glue
node_arm -->|"boots firmware"| node_firmware
node_arm -->|"configures offload"| node_wifi
node_edma -->|"redirects packets"| node_ppe
node_ppe -->|"integrates with"| node_glue
node_glue -->|"attaches firmware"| node_firmware
node_ppe -->|"sends exceptions"| node_ecm
node_ecm -->|"installs flow rules"| node_ppe
node_firmware -->|"accelerates flows"| node_nat
node_firmware -->|"accelerates flows"| node_pppoe
node_firmware -->|"bridges ports"| node_bridge
node_firmware -->|"forwards snooped traffic"| node_multicast
node_firmware -->|"shapes traffic"| node_sqm
node_firmware -->|"shapes ingress"| node_ingress
node_firmware -->|"classifies flows"| node_classify
node_wifi -->|"uses data path"| node_wifili
node_firmware -->|"offloads Wi-Fi"| node_wifili
node_status -.->|"reports connections"| node_ecm

click node_arm "https://github.com/juliusbairaktaris/openwrt-nss-edma/tree/nss-edma-rework/package/nss/nss-tools/files"
click node_ppe "https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/kernel/qca-ppe-nss/src/qca_ppe_nss.c"
click node_glue "https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/kernel/qca-ppe-nss/src/qca_ppe_nss.c"
click node_status "https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/nss/nss-tools/files/luci-nss-status.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_arm,node_status toneBlue
class node_host,node_edma,node_ppe,node_glue toneAmber
class node_firmware,node_ecm,node_nat,node_pppoe,node_bridge,node_multicast,node_sqm,node_ingress,node_classify toneMint
class node_wifi,node_wifili toneRose
class node_ports toneIndigo
```

## Components

### Runtime control

- [NSS service](https://github.com/juliusbairaktaris/openwrt-nss-edma/tree/nss-edma-rework/package/nss/nss-tools/files): `package/nss/nss-tools/files`
- [NSS status UI](https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/nss/nss-tools/files/luci-nss-status.js): `package/nss/nss-tools/files/luci-nss-status.js`

### Wired datapath

- **Linux host path**
- **Upstream qca_edma**
- [Upstream qca_ppe](https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/kernel/qca-ppe-nss/src/qca_ppe_nss.c): `package/kernel/qca-ppe-nss/src/qca_ppe_nss.c`
- [NSS glue](https://github.com/juliusbairaktaris/openwrt-nss-edma/blob/nss-edma-rework/package/kernel/qca-ppe-nss/src/qca_ppe_nss.c): `package/kernel/qca-ppe-nss/src/qca_ppe_nss.c`

### NSS services

- **NSS firmware**
- **ECM flow manager**
- **Routing and NAT**
- **PPPoE and VLAN**
- **Wired bridge**
- **Multicast snooping**
- **SQM shaping**
- **Ingress shaping**
- **DSCP/mark classes**

### Wireless offload

- **ath11k Wi-Fi**
- **Wi-Fi offload**

### Other components

- **LAN/WAN ports**

## Connections

- LAN/WAN ports → Upstream qca_edma: receive traffic
- Upstream qca_edma → Linux host path: host forwarding
- NSS service → NSS glue: arms plane
- NSS service → NSS firmware: boots firmware
- NSS service → ath11k Wi-Fi: configures offload
- Upstream qca_edma → Upstream qca_ppe: redirects packets
- Upstream qca_ppe → NSS glue: integrates with
- NSS glue → NSS firmware: attaches firmware
- Upstream qca_ppe → ECM flow manager: sends exceptions
- ECM flow manager → Upstream qca_ppe: installs flow rules
- NSS firmware → Routing and NAT: accelerates flows
- NSS firmware → PPPoE and VLAN: accelerates flows
- NSS firmware → Wired bridge: bridges ports
- NSS firmware → Multicast snooping: forwards snooped traffic
- NSS firmware → SQM shaping: shapes traffic
- NSS firmware → Ingress shaping: shapes ingress
- NSS firmware → DSCP/mark classes: classifies flows
- ath11k Wi-Fi → Wi-Fi offload: uses data path
- NSS firmware → Wi-Fi offload: offloads Wi-Fi
- NSS status UI → ECM flow manager: reports connections
