Skip to content

Commit 23290c7

Browse files
LorenzoBianconiPaolo Abeni
authored andcommitted
net: airoha: Introduce Airoha NPU support
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. The airoha_eth driver can enable hw acceleration of learned 5-tuples rules if the user configure them in netfilter flowtable (netfilter flowtable support will be added with subsequent patches). 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. Introduce basic support for Airoha NPU module. Tested-by: Sayantan Nandy <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 9b1a0b7 commit 23290c7

File tree

5 files changed

+566
-0
lines changed

5 files changed

+566
-0
lines changed

drivers/net/ethernet/airoha/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ config NET_VENDOR_AIROHA
77

88
if NET_VENDOR_AIROHA
99

10+
config NET_AIROHA_NPU
11+
tristate "Airoha NPU support"
12+
select WANT_DEV_COREDUMP
13+
select REGMAP_MMIO
14+
help
15+
This driver supports Airoha Network Processor (NPU) available
16+
on the Airoha Soc family.
17+
1018
config NET_AIROHA
1119
tristate "Airoha SoC Gigabit Ethernet support"
1220
depends on NET_DSA || !NET_DSA
21+
select NET_AIROHA_NPU
1322
select PAGE_POOL
1423
help
1524
This driver supports the gigabit ethernet MACs in the

drivers/net/ethernet/airoha/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
#
55

66
obj-$(CONFIG_NET_AIROHA) += airoha_eth.o
7+
obj-$(CONFIG_NET_AIROHA_NPU) += airoha_npu.o

drivers/net/ethernet/airoha/airoha_eth.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ struct airoha_eth {
240240
unsigned long state;
241241
void __iomem *fe_regs;
242242

243+
struct airoha_npu __rcu *npu;
244+
243245
struct reset_control_bulk_data rsts[AIROHA_MAX_NUM_RSTS];
244246
struct reset_control_bulk_data xsi_rsts[AIROHA_MAX_NUM_XSI_RSTS];
245247

0 commit comments

Comments
 (0)