| 09bccf56 | 01-Apr-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Validate egress gdm port in airoha_ppe_foe_entry_prepare()
Dev pointer in airoha_ppe_foe_entry_prepare routine is not strictly a device allocated by airoha_eth driver since it is an egr
net: airoha: Validate egress gdm port in airoha_ppe_foe_entry_prepare()
Dev pointer in airoha_ppe_foe_entry_prepare routine is not strictly a device allocated by airoha_eth driver since it is an egress device and the flowtable can contain even wlan, pppoe or vlan devices. E.g:
flowtable ft { hook ingress priority filter devices = { eth1, lan1, lan2, lan3, lan4, wlan0 } flags offload ^ | "not allocated by airoha_eth" -- }
In this case airoha_get_dsa_port() will just return the original device pointer and we can't assume netdev priv pointer points to an airoha_gdm_port struct. Fix the issue validating egress gdm port in airoha_ppe_foe_entry_prepare routine before accessing net_device priv pointer.
Fixes: 00a7678310fe ("net: airoha: Introduce flowtable offload support") Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/20250401-airoha-validate-egress-gdm-port-v4-1-c7315d33ce10@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 36757927 | 31-Mar-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Fix ETS priomap validation
ETS Qdisc schedules SP bands in a priority order assigning band-0 the highest priority (band-0 > band-1 > .. > band-n) while EN7581 arranges SP bands in a pri
net: airoha: Fix ETS priomap validation
ETS Qdisc schedules SP bands in a priority order assigning band-0 the highest priority (band-0 > band-1 > .. > band-n) while EN7581 arranges SP bands in a priority order assigning band-7 the highest priority (band-7 > band-6, .. > band-n). Fix priomap check in airoha_qdma_set_tx_ets_sched routine in order to align ETS Qdisc and airoha_eth driver SP priority ordering.
Fixes: b56e4d660a96 ("net: airoha: Enforce ETS Qdisc priomap") Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Davide Caratti <[email protected]> Link: https://patch.msgid.link/20250331-airoha-ets-validate-priomap-v1-1-60a524488672@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 35ea4f06 | 04-Mar-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Fix lan4 support in airoha_qdma_get_gdm_port()
EN7581 SoC supports lan{1,4} ports on MT7530 DSA switch. Fix lan4 reported value in airoha_qdma_get_gdm_port routine.
Fixes: 23020f049327
net: airoha: Fix lan4 support in airoha_qdma_get_gdm_port()
EN7581 SoC supports lan{1,4} ports on MT7530 DSA switch. Fix lan4 reported value in airoha_qdma_get_gdm_port routine.
Fixes: 23020f0493270 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 3fe15c64 | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Introduce PPE debugfs support
Similar to PPE support for Mediatek devices, introduce PPE debugfs in order to dump binded and unbinded flows.
Signed-off-by: Lorenzo Bianconi <lorenzo@ke
net: airoha: Introduce PPE debugfs support
Similar to PPE support for Mediatek devices, introduce PPE debugfs in order to dump binded and unbinded flows.
Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 9cd451d4 | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Add loopback support for GDM2
Enable hw redirection for traffic received on GDM2 port to GDM{3,4}. This is required to apply Qdisc offloading (HTB or ETS) for traffic to and from GDM{3,
net: airoha: Add loopback support for GDM2
Enable hw redirection for traffic received on GDM2 port to GDM{3,4}. This is required to apply Qdisc offloading (HTB or ETS) for traffic to and from GDM{3,4} port.
Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 00a76783 | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Introduce flowtable offload support
Introduce netfilter flowtable integration in order to allow airoha_eth driver to offload 5-tuple flower rules learned by the PPE module if the user a
net: airoha: Introduce flowtable offload support
Introduce netfilter flowtable integration in order to allow 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 } }
Tested-by: Sayantan Nandy <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 23290c7b | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
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 G
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]>
show more ...
|
| 67fde5d5 | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Move REG_GDM_FWD_CFG() initialization in airoha_dev_init()
Move REG_GDM_FWD_CFG() register initialization in airoha_dev_init routine. Moreover, always send traffic PPE module in order t
net: airoha: Move REG_GDM_FWD_CFG() initialization in airoha_dev_init()
Move REG_GDM_FWD_CFG() register initialization in airoha_dev_init routine. Moreover, always send traffic PPE module in order to be processed by hw accelerator. This is a preliminary patch to enable netfilter flowtable hw offloading on EN7581 SoC.
Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| 80369686 | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Enable support for multiple net_devices
In the current codebase airoha_eth driver supports just a single net_device connected to the Packet Switch Engine (PSE) lan port (GDM1). As shown
net: airoha: Enable support for multiple net_devices
In the current codebase airoha_eth driver supports just a single net_device connected to the Packet Switch Engine (PSE) lan port (GDM1). As shown in commit 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC"), PSE can switch packets between four GDM ports. Enable the capability to create a net_device for each GDM port of the PSE module. Moreover, since the QDMA blocks can be shared between net_devices, do not stop TX/RX DMA in airoha_dev_stop() if there are active net_devices for this QDMA block. This is a preliminary patch to enable flowtable hw offloading for EN7581 SoC.
Co-developed-by: Christian Marangi <[email protected]> Signed-off-by: Christian Marangi <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| af3cf757 | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Move DSA tag in DMA descriptor
Packet Processor Engine (PPE) module reads DSA tags from the DMA descriptor and requires untagged DSA packets to properly parse them. Move DSA tag in the
net: airoha: Move DSA tag in DMA descriptor
Packet Processor Engine (PPE) module reads DSA tags from the DMA descriptor and requires untagged DSA packets to properly parse them. Move DSA tag in the DMA descriptor on TX side and read DSA tag from DMA descriptor on RX side. In order to avoid skb reallocation, store tag in skb_dst on RX side. This is a preliminary patch to enable netfilter flowtable hw offloading on EN7581 SoC.
Tested-by: Sayantan Nandy <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| ec663d9a | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Move register definitions in airoha_regs.h
Move common airoha_eth register definitions in airoha_regs.h in order to reuse them for Packet Processor Engine (PPE) codebase. PPE module is
net: airoha: Move register definitions in airoha_regs.h
Move common airoha_eth register definitions in airoha_regs.h in order to reuse them for Packet Processor Engine (PPE) codebase. PPE module is used to enable support for flowtable hw offloading in airoha_eth driver.
Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| b38f4ff0 | 28-Feb-2025 |
Lorenzo Bianconi <[email protected]> |
net: airoha: Move definitions in airoha_eth.h
Move common airoha_eth definitions in airoha_eth.h in order to reuse them for Packet Processor Engine (PPE) codebase. PPE module is used to enable suppo
net: airoha: Move definitions in airoha_eth.h
Move common airoha_eth definitions in airoha_eth.h in order to reuse them for Packet Processor Engine (PPE) codebase. PPE module is used to enable support for flowtable hw offloading in airoha_eth driver.
Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|