linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v7 0/9] net: lan966x: Add switchdev and vlan support
@ 2021-12-17 15:53 Horatiu Vultur
  2021-12-17 15:53 ` [PATCH net-next v7 1/9] net: lan966x: Add registers that are used for switch and vlan functionality Horatiu Vultur
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Horatiu Vultur @ 2021-12-17 15:53 UTC (permalink / raw)
  To: netdev, devicetree, linux-kernel
  Cc: davem, kuba, robh+dt, UNGLinuxDriver, linux, f.fainelli,
	vivien.didelot, vladimir.oltean, andrew, Horatiu Vultur

This patch series extends lan966x with switchdev and vlan support.
The first patches just adds new registers and extend the MAC table to
handle the interrupts when a new address is learn/forget.

v6->v7:
- fix build issues when compiling as a module

v5->v6:
- fix issues with the singletones, they were not really singletons
- simplify the case where lan966x ports are added to bridges with foreign
  ports
- drop the cases NETDEV_PRE_UP and NETDEV_DOWN
- fix the change of MAC address
- drop the callbacks .ndo_set_features, .ndo_vlan_rx_add_vid,
  .ndo_vlan_rx_kill_vid
- remove duplicate code when port was added in a vlan, the MAC entries
  will be added by the fdb

v4->v5:
- make the notifier_block from lan966x to be singletones
- use switchdev_handle_port_obj_add and switchdev_handle_fdb_event_to_device
  when getting callbacks in the lan966x
- merge the two vlan patches in a single one

v3->v4:
- split the last patch in multiple patches
- replace spin_lock_irqsave/restore with spin_lock/spin_unlock
- remove lan966x_port_change_rx_flags because it was copying all the frames to
  the CPU instead of removing all RX filters.
- implement SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS
- remove calls to __dev_mc_unsync/sync as they are not needed
- replace 0/1 with false/true
- make sure that the lan966x ports are not added to bridges that have other
  interfaces except lan966x
- and allow the lan966x ports to be part of only the same bridge.

v2->v3:
- separate the PVID used when the port is in host mode or vlan unaware
- fix issue when the port was leaving the bridge

v1->v2:
- when allocating entries for the mac table use kzalloc instead of
  devm_kzalloc
- also use GFP_KERNEL instead of GFP_ATOMIC, because is never called
  in atomic context
- when deleting an mac table entry, the order of operations was wrong
- if ana irq is enabled make sure it gets disabled when the driver is
  removed


Horatiu Vultur (9):
  net: lan966x: Add registers that are used for switch and vlan
    functionality
  dt-bindings: net: lan966x: Extend with the analyzer interrupt
  net: lan966x: add support for interrupts from analyzer
  net: lan966x: More MAC table functionality
  net: lan966x: Remove .ndo_change_rx_flags
  net: lan966x: Add support to offload the forwarding.
  net: lan966x: Add vlan support.
  net: lan966x: Extend switchdev bridge flags
  net: lan966x: Extend switchdev with fdb support

 .../net/microchip,lan966x-switch.yaml         |   2 +
 .../net/ethernet/microchip/lan966x/Kconfig    |   1 +
 .../net/ethernet/microchip/lan966x/Makefile   |   3 +-
 .../ethernet/microchip/lan966x/lan966x_fdb.c  | 244 +++++++++
 .../ethernet/microchip/lan966x/lan966x_mac.c  | 342 +++++++++++++
 .../ethernet/microchip/lan966x/lan966x_main.c | 103 +++-
 .../ethernet/microchip/lan966x/lan966x_main.h |  64 ++-
 .../ethernet/microchip/lan966x/lan966x_regs.h | 129 +++++
 .../microchip/lan966x/lan966x_switchdev.c     | 468 ++++++++++++++++++
 .../ethernet/microchip/lan966x/lan966x_vlan.c | 312 ++++++++++++
 10 files changed, 1639 insertions(+), 29 deletions(-)
 create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_fdb.c
 create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
 create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_vlan.c

-- 
2.33.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-12-18 12:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 15:53 [PATCH net-next v7 0/9] net: lan966x: Add switchdev and vlan support Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 1/9] net: lan966x: Add registers that are used for switch and vlan functionality Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 2/9] dt-bindings: net: lan966x: Extend with the analyzer interrupt Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 3/9] net: lan966x: add support for interrupts from analyzer Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 4/9] net: lan966x: More MAC table functionality Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 5/9] net: lan966x: Remove .ndo_change_rx_flags Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 6/9] net: lan966x: Add support to offload the forwarding Horatiu Vultur
2021-12-17 17:44   ` Vladimir Oltean
2021-12-18 12:56     ` Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 7/9] net: lan966x: Add vlan support Horatiu Vultur
2021-12-17 18:14   ` Vladimir Oltean
2021-12-18 13:00     ` Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 8/9] net: lan966x: Extend switchdev bridge flags Horatiu Vultur
2021-12-17 17:40   ` Vladimir Oltean
2021-12-18 12:55     ` Horatiu Vultur
2021-12-17 15:53 ` [PATCH net-next v7 9/9] net: lan966x: Extend switchdev with fdb support Horatiu Vultur
2021-12-17 18:12   ` Vladimir Oltean
2021-12-18 13:00     ` Horatiu Vultur

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).