-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'introduce-flowtable-hw-offloading-in-airoha_eth-driver'
Lorenzo Bianconi says: ==================== Introduce flowtable hw offloading in airoha_eth driver Introduce netfilter flowtable integration in airoha_eth driver to offload 5-tuple flower rules learned by the PPE module if the user accelerates them using a nft configuration similar to the one reported below: table inet filter { flowtable ft { hook ingress priority filter devices = { lan1, lan2, lan3, lan4, eth1 } flags offload; } chain forward { type filter hook forward priority filter; policy accept; meta l4proto { tcp, udp } flow add @ft } } Packet Processor Engine (PPE) module available on EN7581 SoC populates the PPE table with 5-tuples flower rules learned from traffic forwarded between the GDM ports connected to the Packet Switch Engine (PSE) module. airoha_eth driver configures and collects data from the PPE module via a Network Processor Unit (NPU) RISC-V module available on the EN7581 SoC. Move airoha_eth driver in a dedicated folder (drivers/net/ethernet/airoha). v7: https://lore.kernel.org/r/20250224-airoha-en7581-flowtable-offload-v7-0-b4a22ad8364e@kernel.org v6: https://lore.kernel.org/r/20250221-airoha-en7581-flowtable-offload-v6-0-d593af0e9487@kernel.org v5: https://lore.kernel.org/r/20250217-airoha-en7581-flowtable-offload-v5-0-28be901cb735@kernel.org v4: https://lore.kernel.org/r/20250213-airoha-en7581-flowtable-offload-v4-0-b69ca16d74db@kernel.org v3: https://lore.kernel.org/r/20250209-airoha-en7581-flowtable-offload-v3-0-dba60e755563@kernel.org v2: https://lore.kernel.org/r/20250207-airoha-en7581-flowtable-offload-v2-0-3a2239692a67@kernel.org v1: https://lore.kernel.org/r/20250205-airoha-en7581-flowtable-offload-v1-0-d362cfa97b01@kernel.org ==================== Link: https://patch.msgid.link/20250228-airoha-en7581-flowtable-offload-v8-0-01dc1653f46e@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
- Loading branch information
Showing
17 changed files
with
3,422 additions
and
1,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
Documentation/devicetree/bindings/net/airoha,en7581-npu.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/net/airoha,en7581-npu.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Airoha Network Processor Unit for EN7581 SoC | ||
|
||
maintainers: | ||
- Lorenzo Bianconi <lorenzo@kernel.org> | ||
|
||
description: | ||
The Airoha Network Processor Unit (NPU) provides a configuration interface | ||
to implement wired and wireless hardware flow offloading programming Packet | ||
Processor Engine (PPE) flow table. | ||
|
||
properties: | ||
compatible: | ||
enum: | ||
- airoha,en7581-npu | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
interrupts: | ||
items: | ||
- description: mbox host irq line | ||
- description: watchdog0 irq line | ||
- description: watchdog1 irq line | ||
- description: watchdog2 irq line | ||
- description: watchdog3 irq line | ||
- description: watchdog4 irq line | ||
- description: watchdog5 irq line | ||
- description: watchdog6 irq line | ||
- description: watchdog7 irq line | ||
- description: wlan irq line0 | ||
- description: wlan irq line1 | ||
- description: wlan irq line2 | ||
- description: wlan irq line3 | ||
- description: wlan irq line4 | ||
- description: wlan irq line5 | ||
|
||
memory-region: | ||
maxItems: 1 | ||
description: | ||
Memory used to store NPU firmware binary. | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- interrupts | ||
- memory-region | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/interrupt-controller/arm-gic.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
soc { | ||
#address-cells = <2>; | ||
#size-cells = <2>; | ||
npu@1e900000 { | ||
compatible = "airoha,en7581-npu"; | ||
reg = <0 0x1e900000 0 0x313000>; | ||
interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; | ||
memory-region = <&npu_binary>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
config NET_VENDOR_AIROHA | ||
bool "Airoha devices" | ||
depends on ARCH_AIROHA || COMPILE_TEST | ||
help | ||
If you have a Airoha SoC with ethernet, say Y. | ||
|
||
if NET_VENDOR_AIROHA | ||
|
||
config NET_AIROHA_NPU | ||
tristate "Airoha NPU support" | ||
select WANT_DEV_COREDUMP | ||
select REGMAP_MMIO | ||
help | ||
This driver supports Airoha Network Processor (NPU) available | ||
on the Airoha Soc family. | ||
|
||
config NET_AIROHA | ||
tristate "Airoha SoC Gigabit Ethernet support" | ||
depends on NET_DSA || !NET_DSA | ||
select NET_AIROHA_NPU | ||
select PAGE_POOL | ||
help | ||
This driver supports the gigabit ethernet MACs in the | ||
Airoha SoC family. | ||
|
||
endif #NET_VENDOR_AIROHA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# | ||
# Airoha for the Mediatek SoCs built-in ethernet macs | ||
# | ||
|
||
obj-$(CONFIG_NET_AIROHA) += airoha-eth.o | ||
airoha-eth-y := airoha_eth.o airoha_ppe.o | ||
airoha-eth-$(CONFIG_DEBUG_FS) += airoha_ppe_debugfs.o | ||
obj-$(CONFIG_NET_AIROHA_NPU) += airoha_npu.o |
Oops, something went wrong.