openwrt-hardware-offloading
Skill0 starsChanged 2 months agoMITView on GitHub
Hardware flow offloading, Packet Processing Engine (PPE), and Wireless Ethernet Dispatch (WED) specialist for MediaTek Filogic and Atheros SoCs in OpenWrt.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ark-theme-uiSkill
- openwrt-imagebuilderSkill
- openwrt-luci-modernSkill
- openwrt-network-firewallSkill
- openwrt-sqm-bufferbloatSkill
- openwrt-storage-failsafeSkill
- openwrt-wifi-meshSkill
- posix-shellSkill
- security-auditorSkill
- systematic-debuggingSkill
- ark-theme-uiSkill
- openwrt-hardware-offloadingSkill
- openwrt-imagebuilderSkill
- openwrt-luci-modernSkill
- openwrt-network-firewallSkill
- openwrt-sqm-bufferbloatSkill
- openwrt-storage-failsafeSkill
- openwrt-wifi-meshSkill
- posix-shellSkill
- security-auditorSkill
- systematic-debuggingSkill
The file
Files
OpenWrt Hardware Offloading & Network Acceleration (ARK Router)
Objetivo
Configurar e auditar os mecanismos de aceleração de encaminhamento de pacotes no kernel do OpenWrt, diferenciando aceleração por silício (Hardware PPE/WED) de aceleração por software (Software Flow Offloading).
1. Níveis de Aceleração no OpenWrt
- Encaminhamento Padrão por Kernel (Sem Offload):
- Cada pacote passa por todo o stack do Netfilter (
prerouting,forward,postrouting). - A vazão depende de CPU, driver, encapsulamento e tamanho dos pacotes; meça o teto no equipamento.
- Cada pacote passa por todo o stack do Netfilter (
- Software Flow Offloading (
flow_offloading=1):- Cria um atalho na tabela de conexões (flowtable) após o handshake TCP/UDP inicial.
- Os pacotes seguintes pulam a maior parte do Netfilter diretamente para a camada de saída.
- Pode reduzir uso de CPU para fluxos elegíveis; quantifique com testes antes/depois.
- Hardware Flow Offloading (
flow_offloading_hw=1):- Transfere o encaminhamento de fluxos estabelecidos para o acelerador em silício do SoC.
- No MediaTek Filogic MT7981 (ex.: Cudy WR3000):
- PPE (Packet Processing Engine): Projetado para acelerar tráfego Gigabit IPv4/IPv6 com baixa utilização de CPU, desde que o tráfego não dependa de qdiscs ou inspeções complexas. A carga real e o ganho de vazão devem ser verificados em testes com pacotes pequenos e grandes.
- WED (Wireless Ethernet Dispatch): Faz a ponte direta entre os rádios Wi-Fi MT7976 e a interface ethernet, reduzindo a sobrecarga de interrupções na CPU quando o driver do fabricante e do kernel estiverem habilitados para o modelo.
2. Configuração por Família de Roteador
MediaTek Filogic 820 (Cudy WR3000 v1 / MT7981)
Exemplo de configuração para uma imagem cujo driver, firewall e tráfego suportem offload. Confirme capacidade e faça backup da configuração antes de aplicar:
uci -q batch <<EOF
set firewall.@defaults[0].flow_offloading='1'
set firewall.@defaults[0].flow_offloading_hw='1'
commit firewall
EOF
/etc/init.d/firewall reloadQualcomm Atheros (D-Link DGL-5500 / QCA9558)
O QCA9558 não possui PPE moderno. O Hardware Offload DEVE ser desligado, mantendo apenas o Software Offload:
uci -q batch <<EOF
set firewall.@defaults[0].flow_offloading='1'
set firewall.@defaults[0].flow_offloading_hw='0'
commit firewall
EOF
/etc/init.d/firewall reload3. Conflitos Críticos e Regras de Decisão
[!WARNING] Incompatibilidade com SQM (Smart Queue Management): Fluxos com offload podem contornar o qdisc usado pelo SQM. Antes de combinar offload e CAKE, teste se os fluxos relevantes são moldados e se a latência melhora sob saturação; desative o offload para esses fluxos quando o SQM não atuar.
- Regra de decisão: Compare vazão, CPU e latência sob carga com e sem offload. Escolha o perfil que atende à meta de tráfego real; um limite de Mbps isolado não decide a configuração.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

