Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56ade8fe authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

mlxsw: spectrum: Add initial support for Spectrum ASIC



Add support for new generation Mellanox Spectrum ASIC, 10/25/40/50 and
100Gb/s Ethernet Switch.

The initial driver implements bridge forwarding offload including
bridge internal VLAN support, FDB static entries, FDB learning and
HW ageing including their setup.

Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarElad Raz <eladr@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a4feea74
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -30,3 +30,14 @@ config MLXSW_SWITCHX2

	  To compile this driver as a module, choose M here: the
	  module will be called mlxsw_switchx2.

config MLXSW_SPECTRUM
	tristate "Mellanox Technologies Spectrum support"
	depends on MLXSW_CORE && NET_SWITCHDEV
	default m
	---help---
	  This driver supports Mellanox Technologies Spectrum Ethernet
	  Switch ASICs.

	  To compile this driver as a module, choose M here: the
	  module will be called mlxsw_spectrum.
+3 −0
Original line number Diff line number Diff line
@@ -4,3 +4,6 @@ obj-$(CONFIG_MLXSW_PCI) += mlxsw_pci.o
mlxsw_pci-objs			:= pci.o
obj-$(CONFIG_MLXSW_SWITCHX2)	+= mlxsw_switchx2.o
mlxsw_switchx2-objs		:= switchx2.o
obj-$(CONFIG_MLXSW_SPECTRUM)	+= mlxsw_spectrum.o
mlxsw_spectrum-objs		:= spectrum.o spectrum_buffers.o \
				   spectrum_switchdev.o
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@
	MODULE_ALIAS(MLXSW_MODULE_ALIAS_PREFIX kind)

#define MLXSW_DEVICE_KIND_SWITCHX2 "switchx2"
#define MLXSW_DEVICE_KIND_SPECTRUM "spectrum"

struct mlxsw_core;
struct mlxsw_driver;
+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ static const char mlxsw_pci_driver_name[] = "mlxsw_pci";

static const struct pci_device_id mlxsw_pci_id_table[] = {
	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SWITCHX2), 0},
	{PCI_VDEVICE(MELLANOX, PCI_DEVICE_ID_MELLANOX_SPECTRUM), 0},
	{0, }
};

@@ -67,6 +68,8 @@ static const char *mlxsw_pci_device_kind_get(const struct pci_device_id *id)
	switch (id->device) {
	case PCI_DEVICE_ID_MELLANOX_SWITCHX2:
		return MLXSW_DEVICE_KIND_SWITCHX2;
	case PCI_DEVICE_ID_MELLANOX_SPECTRUM:
		return MLXSW_DEVICE_KIND_SPECTRUM;
	default:
		BUG();
	}
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include "item.h"

#define PCI_DEVICE_ID_MELLANOX_SWITCHX2	0xc738
#define PCI_DEVICE_ID_MELLANOX_SPECTRUM	0xcb84
#define MLXSW_PCI_BAR0_SIZE		(1024 * 1024) /* 1MB */
#define MLXSW_PCI_PAGE_SIZE		4096

Loading