Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, pablo@netfilter.org, ryder.lee@mediatek.com
Subject: [RFC 0/7] Ethernet->WLAN hardware flow offloading support on MT7622
Date: Tue, 13 Jul 2021 18:07:38 +0200	[thread overview]
Message-ID: <20210713160745.59707-1-nbd@nbd.name> (raw)

This patch series adds hardware flow offloading for routing/NAT packets from
ethernet to WLAN on MT7622 SoC, in combination with MT7915 WLAN devices
This only offloads one direction, WLAN->Ethernet offload is not supported by
MT7622 (but will be in newer SoC designs).

In order to make this work, the SoC contains a subsystem named Wireless
Ethernet Dispatch. It intercepts access to the WLAN DMA register space and
controls the DMA queues in order to be able to inject packets coming in from
the packet processing engine (PPE). It also intercepts IRQs from PCIe.


Felix Fietkau (7):
  mac80211: add support for .ndo_fill_forward_path
  net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch
    (WED)
  net: ethernet: mtk_eth_soc: implement flow offloading to WED devices
  mt76: dma: add wrapper macro for accessing queue registers
  mt76: make number of tokens configurable dynamically
  mt76: mt7915: remove irq parameter from mt7915_mmio_init
  mt76: mt7915: add Wireless Ethernet Dispatch support

 arch/arm64/boot/dts/mediatek/mt7622.dtsi      |  22 +
 drivers/net/ethernet/mediatek/Kconfig         |   4 +
 drivers/net/ethernet/mediatek/Makefile        |   5 +
 drivers/net/ethernet/mediatek/mtk_eth_soc.c   |  23 +
 drivers/net/ethernet/mediatek/mtk_eth_soc.h   |   3 +
 drivers/net/ethernet/mediatek/mtk_ppe.c       |  18 +
 drivers/net/ethernet/mediatek/mtk_ppe.h       |  14 +-
 .../net/ethernet/mediatek/mtk_ppe_offload.c   |  67 +-
 drivers/net/ethernet/mediatek/mtk_wed.c       | 837 ++++++++++++++++++
 drivers/net/ethernet/mediatek/mtk_wed.h       | 123 +++
 .../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  | 248 ++++++
 drivers/net/wireless/mediatek/mt76/dma.c      | 111 ++-
 drivers/net/wireless/mediatek/mt76/mac80211.c |   5 +-
 drivers/net/wireless/mediatek/mt76/mmio.c     |   9 +-
 drivers/net/wireless/mediatek/mt76/mt76.h     |  36 +-
 .../net/wireless/mediatek/mt76/mt7603/dma.c   |   8 +-
 .../net/wireless/mediatek/mt76/mt7615/dma.c   |   6 +-
 .../net/wireless/mediatek/mt76/mt76x02_mmio.c |   4 +-
 .../net/wireless/mediatek/mt76/mt7915/dma.c   |  38 +-
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 123 ++-
 .../net/wireless/mediatek/mt76/mt7915/mac.h   |   2 +
 .../net/wireless/mediatek/mt76/mt7915/main.c  |  32 +
 .../net/wireless/mediatek/mt76/mt7915/mcu.c   |   4 +
 .../net/wireless/mediatek/mt76/mt7915/mmio.c  |   2 +-
 .../wireless/mediatek/mt76/mt7915/mt7915.h    |   3 +-
 .../net/wireless/mediatek/mt76/mt7915/pci.c   |  98 +-
 .../net/wireless/mediatek/mt76/mt7915/regs.h  |  19 +-
 .../net/wireless/mediatek/mt76/mt7921/dma.c   |   2 +-
 drivers/net/wireless/mediatek/mt76/tx.c       |  21 +-
 include/linux/netdevice.h                     |   7 +
 include/linux/soc/mediatek/mtk_wed.h          | 127 +++
 include/net/mac80211.h                        |   5 +
 net/core/dev.c                                |   4 +
 net/mac80211/driver-ops.h                     |  22 +
 net/mac80211/ieee80211_i.h                    |   2 +-
 net/mac80211/iface.c                          |  58 ++
 net/mac80211/trace.h                          |   7 +
 39 files changed, 2187 insertions(+), 115 deletions(-)
 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

-- 
2.30.1


             reply	other threads:[~2021-07-13 16:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 16:07 Felix Fietkau [this message]
2021-07-13 16:07 ` [RFC 1/7] mac80211: add support for .ndo_fill_forward_path Felix Fietkau
2021-07-13 16:46   ` Johannes Berg
2021-07-13 16:07 ` [RFC 2/7] net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED) Felix Fietkau
2021-07-13 18:31   ` Andrew Lunn
2021-07-14  8:03     ` Felix Fietkau
2021-07-13 16:07 ` [RFC 3/7] net: ethernet: mtk_eth_soc: implement flow offloading to WED devices Felix Fietkau
2021-07-13 18:40   ` Pablo Neira Ayuso
2021-07-14  8:21     ` Felix Fietkau
2021-07-13 18:56   ` Pablo Neira Ayuso
2021-07-14  8:26     ` Felix Fietkau
2021-07-15 21:36       ` Pablo Neira Ayuso
2021-07-16  6:09         ` Felix Fietkau
2021-07-13 16:07 ` [RFC 4/7] mt76: dma: add wrapper macro for accessing queue registers Felix Fietkau
2021-07-13 16:07 ` [RFC 5/7] mt76: make number of tokens configurable dynamically Felix Fietkau
2021-07-13 16:07 ` [RFC 6/7] mt76: mt7915: remove irq parameter from mt7915_mmio_init Felix Fietkau
2021-07-13 16:07 ` [RFC 7/7] mt76: mt7915: add Wireless Ethernet Dispatch support Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210713160745.59707-1-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=ryder.lee@mediatek.com \
    --subject='Re: [RFC 0/7] Ethernet->WLAN hardware flow offloading support on MT7622' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).