mbox series

[v2,00/14] MediaTek SoC flow offload improvements + wireless support

Message ID 20220405195755.10817-1-nbd@nbd.name (mailing list archive)
Headers show
Series MediaTek SoC flow offload improvements + wireless support | expand

Message

Felix Fietkau April 5, 2022, 7:57 p.m. UTC
This series contains the following improvements to mediatek ethernet flow
offload support:

- support dma-coherent on ethernet to improve performance
- add ipv6 offload support
- rework hardware flow table entry handling to improve dealing with hash
  collisions and competing flows
- support creating offload entries from user space
- support creating offload entries with just source/destination mac address,
  vlan and output device information
- add driver changes for supporting the Wireless Ethernet Dispatch core,
  which can be used to offload flows from ethernet to MT7915 PCIe WLAN
  devices

Changes in v2:
- add missing dt-bindings patches

David Bentham (1):
  net: ethernet: mtk_eth_soc: add ipv6 flow offload support

Felix Fietkau (10):
  net: ethernet: mtk_eth_soc: add support for coherent DMA
  arm64: dts: mediatek: mt7622: add support for coherent DMA
  net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch
    (WED)
  net: ethernet: mtk_eth_soc: implement flow offloading to WED devices
  arm64: dts: mediatek: mt7622: introduce nodes for Wireless Ethernet
    Dispatch
  net: ethernet: mtk_eth_soc: support TC_SETUP_BLOCK for PPE offload
  net: ethernet: mtk_eth_soc: allocate struct mtk_ppe separately
  net: ethernet: mtk_eth_soc: rework hardware flow table management
  net: ethernet: mtk_eth_soc: remove bridge flow offload type entry
    support
  net: ethernet: mtk_eth_soc: support creating mac address based offload
    entries

Lorenzo Bianconi (3):
  dt-bindings: net: mediatek: add optional properties for the SoC
    ethernet core
  dt-bindings: arm: mediatek: document WED binding for MT7622
  dt-bindings: arm: mediatek: document the pcie mirror node on MT7622

 .../mediatek/mediatek,mt7622-pcie-mirror.yaml |  42 +
 .../arm/mediatek/mediatek,mt7622-wed.yaml     |  50 +
 .../devicetree/bindings/net/mediatek-net.txt  |  10 +
 arch/arm64/boot/dts/mediatek/mt7622.dtsi      |  32 +-
 drivers/net/ethernet/mediatek/Kconfig         |   4 +
 drivers/net/ethernet/mediatek/Makefile        |   5 +
 drivers/net/ethernet/mediatek/mtk_eth_soc.c   | 131 ++-
 drivers/net/ethernet/mediatek/mtk_eth_soc.h   |  14 +-
 drivers/net/ethernet/mediatek/mtk_ppe.c       | 368 +++++++-
 drivers/net/ethernet/mediatek/mtk_ppe.h       |  89 +-
 .../net/ethernet/mediatek/mtk_ppe_debugfs.c   |   1 -
 .../net/ethernet/mediatek/mtk_ppe_offload.c   | 189 +++-
 drivers/net/ethernet/mediatek/mtk_wed.c       | 875 ++++++++++++++++++
 drivers/net/ethernet/mediatek/mtk_wed.h       | 135 +++
 .../net/ethernet/mediatek/mtk_wed_debugfs.c   | 175 ++++
 drivers/net/ethernet/mediatek/mtk_wed_ops.c   |   8 +
 drivers/net/ethernet/mediatek/mtk_wed_regs.h  | 251 +++++
 include/linux/netdevice.h                     |   7 +
 include/linux/soc/mediatek/mtk_wed.h          | 131 +++
 net/core/dev.c                                |   4 +
 20 files changed, 2396 insertions(+), 125 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-pcie-mirror.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml
 create mode 100644 drivers/net/ethernet/mediatek/mtk_wed.c
 create mode 100644 drivers/net/ethernet/mediatek/mtk_wed.h
 create mode 100644 drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
 create mode 100644 drivers/net/ethernet/mediatek/mtk_wed_ops.c
 create mode 100644 drivers/net/ethernet/mediatek/mtk_wed_regs.h
 create mode 100644 include/linux/soc/mediatek/mtk_wed.h

Comments

patchwork-bot+netdevbpf@kernel.org April 6, 2022, 1:30 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue,  5 Apr 2022 21:57:41 +0200 you wrote:
> This series contains the following improvements to mediatek ethernet flow
> offload support:
> 
> - support dma-coherent on ethernet to improve performance
> - add ipv6 offload support
> - rework hardware flow table entry handling to improve dealing with hash
>   collisions and competing flows
> - support creating offload entries from user space
> - support creating offload entries with just source/destination mac address,
>   vlan and output device information
> - add driver changes for supporting the Wireless Ethernet Dispatch core,
>   which can be used to offload flows from ethernet to MT7915 PCIe WLAN
>   devices
> 
> [...]

Here is the summary with links:
  - [v2,01/14] dt-bindings: net: mediatek: add optional properties for the SoC ethernet core
    https://git.kernel.org/netdev/net-next/c/1dafd0d60703
  - [v2,02/14] net: ethernet: mtk_eth_soc: add support for coherent DMA
    https://git.kernel.org/netdev/net-next/c/d776a57e4a28
  - [v2,03/14] arm64: dts: mediatek: mt7622: add support for coherent DMA
    https://git.kernel.org/netdev/net-next/c/3abd063019b6
  - [v2,04/14] dt-bindings: arm: mediatek: document WED binding for MT7622
    https://git.kernel.org/netdev/net-next/c/55c1c4e945fa
  - [v2,05/14] dt-bindings: arm: mediatek: document the pcie mirror node on MT7622
    https://git.kernel.org/netdev/net-next/c/f14ac41b785f
  - [v2,06/14] net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)
    https://git.kernel.org/netdev/net-next/c/804775dfc288
  - [v2,07/14] net: ethernet: mtk_eth_soc: implement flow offloading to WED devices
    https://git.kernel.org/netdev/net-next/c/a333215e10cb
  - [v2,08/14] arm64: dts: mediatek: mt7622: introduce nodes for Wireless Ethernet Dispatch
    https://git.kernel.org/netdev/net-next/c/e9b65ecb7c30
  - [v2,09/14] net: ethernet: mtk_eth_soc: add ipv6 flow offload support
    https://git.kernel.org/netdev/net-next/c/817b2fdf1667
  - [v2,10/14] net: ethernet: mtk_eth_soc: support TC_SETUP_BLOCK for PPE offload
    https://git.kernel.org/netdev/net-next/c/bb14c19122b7
  - [v2,11/14] net: ethernet: mtk_eth_soc: allocate struct mtk_ppe separately
    https://git.kernel.org/netdev/net-next/c/1ccc723b5829
  - [v2,12/14] net: ethernet: mtk_eth_soc: rework hardware flow table management
    https://git.kernel.org/netdev/net-next/c/c4f033d9e03e
  - [v2,13/14] net: ethernet: mtk_eth_soc: remove bridge flow offload type entry support
    https://git.kernel.org/netdev/net-next/c/8ff25d377445
  - [v2,14/14] net: ethernet: mtk_eth_soc: support creating mac address based offload entries
    https://git.kernel.org/netdev/net-next/c/33fc42de3327

You are awesome, thank you!
Andrew Lunn April 7, 2022, 3:57 p.m. UTC | #2
On Wed, Apr 06, 2022 at 01:30:17PM +0000, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This series was applied to netdev/net-next.git (master)
> by David S. Miller <davem@davemloft.net>:
> 
> On Tue,  5 Apr 2022 21:57:41 +0200 you wrote:
> > This series contains the following improvements to mediatek ethernet flow
> > offload support:
> > 
> > - support dma-coherent on ethernet to improve performance
> > - add ipv6 offload support
> > - rework hardware flow table entry handling to improve dealing with hash
> >   collisions and competing flows
> > - support creating offload entries from user space
> > - support creating offload entries with just source/destination mac address,
> >   vlan and output device information
> > - add driver changes for supporting the Wireless Ethernet Dispatch core,
> >   which can be used to offload flows from ethernet to MT7915 PCIe WLAN
> >   devices

Hi David

It seems very early to merge this. The discussion of if the files are
even in the right places has not even finished. And Arnd seems to not
want parts of this in his subsystem. And there are some major
architecture issues which need discussing...

I think you should revert this.

  Andrew
Felix Fietkau April 7, 2022, 5 p.m. UTC | #3
On 07.04.22 17:57, Andrew Lunn wrote:
> On Wed, Apr 06, 2022 at 01:30:17PM +0000, patchwork-bot+netdevbpf@kernel.org wrote:
>> Hello:
>> 
>> This series was applied to netdev/net-next.git (master)
>> by David S. Miller <davem@davemloft.net>:
>> 
>> On Tue,  5 Apr 2022 21:57:41 +0200 you wrote:
>> > This series contains the following improvements to mediatek ethernet flow
>> > offload support:
>> > 
>> > - support dma-coherent on ethernet to improve performance
>> > - add ipv6 offload support
>> > - rework hardware flow table entry handling to improve dealing with hash
>> >   collisions and competing flows
>> > - support creating offload entries from user space
>> > - support creating offload entries with just source/destination mac address,
>> >   vlan and output device information
>> > - add driver changes for supporting the Wireless Ethernet Dispatch core,
>> >   which can be used to offload flows from ethernet to MT7915 PCIe WLAN
>> >   devices
> 
> Hi David
> 
> It seems very early to merge this. The discussion of if the files are
> even in the right places has not even finished. And Arnd seems to not
> want parts of this in his subsystem. And there are some major
> architecture issues which need discussing...
> 
> I think you should revert this.
How about I simply send follow-up patches that move the relevant pieces 
to net?

- Felix
Andrew Lunn April 7, 2022, 5:28 p.m. UTC | #4
On Thu, Apr 07, 2022 at 07:00:36PM +0200, Felix Fietkau wrote:
> On 07.04.22 17:57, Andrew Lunn wrote:
> > On Wed, Apr 06, 2022 at 01:30:17PM +0000, patchwork-bot+netdevbpf@kernel.org wrote:
> > > Hello:
> > > 
> > > This series was applied to netdev/net-next.git (master)
> > > by David S. Miller <davem@davemloft.net>:
> > > 
> > > On Tue,  5 Apr 2022 21:57:41 +0200 you wrote:
> > > > This series contains the following improvements to mediatek ethernet flow
> > > > offload support:
> > > > > - support dma-coherent on ethernet to improve performance
> > > > - add ipv6 offload support
> > > > - rework hardware flow table entry handling to improve dealing with hash
> > > >   collisions and competing flows
> > > > - support creating offload entries from user space
> > > > - support creating offload entries with just source/destination mac address,
> > > >   vlan and output device information
> > > > - add driver changes for supporting the Wireless Ethernet Dispatch core,
> > > >   which can be used to offload flows from ethernet to MT7915 PCIe WLAN
> > > >   devices
> > 
> > Hi David
> > 
> > It seems very early to merge this. The discussion of if the files are
> > even in the right places has not even finished. And Arnd seems to not
> > want parts of this in his subsystem. And there are some major
> > architecture issues which need discussing...
> > 
> > I think you should revert this.
> How about I simply send follow-up patches that move the relevant pieces to
> net?

There has just been comments from Rob about the binding. I've not yet
looked at the code, but if i remember correctly, v1 had some
interaction with the DSA tagger, so i do want to look at it.

I'm also wondering if there is anything common here with IPA. It is an
accelerator which sits between the WiFi and the mobile phone baseband
device.

I really would prefer that a proper review of this code was made, by
netdev people, and the bigger architecture questions looked at. So
far, all the reviewers have been from outside netdev.

       Andrew
Felix Fietkau April 7, 2022, 5:34 p.m. UTC | #5
On 07.04.22 19:28, Andrew Lunn wrote:
> On Thu, Apr 07, 2022 at 07:00:36PM +0200, Felix Fietkau wrote:
>> On 07.04.22 17:57, Andrew Lunn wrote:
>> > On Wed, Apr 06, 2022 at 01:30:17PM +0000, patchwork-bot+netdevbpf@kernel.org wrote:
>> > > Hello:
>> > > 
>> > > This series was applied to netdev/net-next.git (master)
>> > > by David S. Miller <davem@davemloft.net>:
>> > > 
>> > > On Tue,  5 Apr 2022 21:57:41 +0200 you wrote:
>> > > > This series contains the following improvements to mediatek ethernet flow
>> > > > offload support:
>> > > > > - support dma-coherent on ethernet to improve performance
>> > > > - add ipv6 offload support
>> > > > - rework hardware flow table entry handling to improve dealing with hash
>> > > >   collisions and competing flows
>> > > > - support creating offload entries from user space
>> > > > - support creating offload entries with just source/destination mac address,
>> > > >   vlan and output device information
>> > > > - add driver changes for supporting the Wireless Ethernet Dispatch core,
>> > > >   which can be used to offload flows from ethernet to MT7915 PCIe WLAN
>> > > >   devices
>> > 
>> > Hi David
>> > 
>> > It seems very early to merge this. The discussion of if the files are
>> > even in the right places has not even finished. And Arnd seems to not
>> > want parts of this in his subsystem. And there are some major
>> > architecture issues which need discussing...
>> > 
>> > I think you should revert this.
>> How about I simply send follow-up patches that move the relevant pieces to
>> net?
> 
> There has just been comments from Rob about the binding. I've not yet
> looked at the code, but if i remember correctly, v1 had some
> interaction with the DSA tagger, so i do want to look at it.
> 
> I'm also wondering if there is anything common here with IPA. It is an
> accelerator which sits between the WiFi and the mobile phone baseband
> device.
I don't think it has much in common with IPA. WED doesn't completely sit 
between WiFi and the ethernet MAC, it just captures some (but not all) 
of the DMA rings and intercepts IRQs.

> I really would prefer that a proper review of this code was made, by
> netdev people, and the bigger architecture questions looked at. So
> far, all the reviewers have been from outside netdev.
Sure. I will definitely quickly fix any issues that show up. I did 
submit this series once already a while back, and there hasn't really 
been any feedback on it.

- Felix