LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: wei.fang@oss.nxp.com
To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
	xiaoning.wang@nxp.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, chleroy@kernel.org, andrew@lunn.ch,
	olteanv@gmail.com, linux@armlinux.org.uk
Cc: wei.fang@nxp.com, imx@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 net-next 0/9] net: dsa: netc: add bridge mode support
Date: Tue,  2 Jun 2026 15:23:04 +0800	[thread overview]
Message-ID: <20260602072313.3162120-1-wei.fang@oss.nxp.com> (raw)

From: Wei Fang <wei.fang@nxp.com>

This series adds bridge mode support to the NETC DSA switch driver,
covering both VLAN-aware and VLAN-unaware operation.

The NETC switch manages forwarding through a set of hardware tables
accessed via NTMP: the FDB table (FDBT), VLAN filter table (VFT), egress
treatment table (ETT), and egress count table (ECT).  The series extends
the NTMP layer with the operations required for bridging, then builds the
DSA bridge callbacks on top.

Since all switch ports share the VFT, so only one VLAN-aware bridge is
supported.

FDB aging is managed in software.  A periodic delayed work sweeps the
table using the hardware activity element mechanism, with a default aging
time of 300 seconds matching the IEEE 802.1Q standard.  Per-port entries
are also flushed immediately on bridge leave and link-down events.

---
v2:
1. Remove ntmp_fdbt_delete_entry_by_keye()
2. Add settings for cfge.cfg and cfge_mc in
   ntmp_fdbt_update_activity_element()
3. Remove the wrong comment from ntmp_fdbt_delete_aging_entries()
4. Correct the description of ntmp_fdbt_delete_port_dynamic_entries()
5. Add generic function ntmp_vft_set_entry(), which is called by
   ntmp_vft_add_entry() and ntmp_vft_update_entry()
6. ntmp_ett_add_or_update_entry() is split into ntmp_ett_add_entry() and
   ntmp_ett_update_entry(), and add generic function ntmp_ett_set_entry()
7. netc_add_or_update_ett_entry() is split into netc_add_ett_entry() and
   netc_update_ett_entry()
8. Remove "entry->untagged_port_bitmap &= ~BIT(port)" from
   netc_port_del_vlan_entry()
9. Add pvid check in netc_port_vlan_filtering()
10. Improve the comment in netc_vlan_unaware_pvid()
11. Change the error code in netc_single_vlan_aware_bridge() and
    netc_port_vlan_add()
12. Add comments in netc_port_vlan_del()
13. Add ageing_time_min and ageing_time_max, and refactor
    netc_set_ageing_time()
14. Remove fdbt_acteu_interval from struct netc_switch
15. Update some commit messages
v1 link: https://lore.kernel.org/netdev/20260527100217.794987-1-wei.fang@oss.nxp.com/
---

Wei Fang (9):
  net: enetc: add interfaces to manage dynamic FDB entries
  net: enetc: add "Update" and "Delete" operations to VLAN filter table
  net: enetc: add interfaces to manage egress treatment table
  net: enetc: add "Update" operation to the egress count table
  net: dsa: netc: initialize the group bitmap of ETT and ECT
  net: enetc: add helpers to set/clear table bitmap
  net: dsa: netc: add VLAN filter table and egress treatment management
  net: dsa: netc: add bridge mode support
  net: dsa: netc: implement dynamic FDB entry ageing

 drivers/net/dsa/netc/netc_main.c              | 918 +++++++++++++++++-
 drivers/net/dsa/netc/netc_switch.h            |  33 +
 drivers/net/dsa/netc/netc_switch_hw.h         |   6 +
 drivers/net/ethernet/freescale/enetc/ntmp.c   | 440 ++++++++-
 .../ethernet/freescale/enetc/ntmp_private.h   |  18 +-
 include/linux/fsl/ntmp.h                      |  60 ++
 6 files changed, 1454 insertions(+), 21 deletions(-)

-- 
2.34.1



             reply	other threads:[~2026-06-02  7:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02  7:23 wei.fang [this message]
2026-06-02  7:23 ` [PATCH v2 net-next 1/9] net: enetc: add interfaces to manage dynamic FDB entries wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 2/9] net: enetc: add "Update" and "Delete" operations to VLAN filter table wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 3/9] net: enetc: add interfaces to manage egress treatment table wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 4/9] net: enetc: add "Update" operation to the egress count table wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 5/9] net: dsa: netc: initialize the group bitmap of ETT and ECT wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 6/9] net: enetc: add helpers to set/clear table bitmap wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 7/9] net: dsa: netc: add VLAN filter table and egress treatment management wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 8/9] net: dsa: netc: add bridge mode support wei.fang
2026-06-02  7:23 ` [PATCH v2 net-next 9/9] net: dsa: netc: implement dynamic FDB entry ageing wei.fang

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=20260602072313.3162120-1-wei.fang@oss.nxp.com \
    --to=wei.fang@oss.nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=chleroy@kernel.org \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox