mlxsw: Remove XM support
Subsystems (3)
Ido Schimmel
maintainercover mlxsw: Remove XM support
The XM was supposed to be an external device connected to the Spectrum-{2,3} ASICs using dedicated Ethernet ports. Its purpose was to increase the number of routes that can be offloaded to hardware. This was achieved by having the ASIC act as a cache that refers cache misses to the XM where the FIB is stored and LPM lookup is performed.
Testing was done over an emulator and dedicated setups in the lab, but the product was discontinued before shipping to customers.
Therefore, in order to remove dead code and reduce complexity of the code base, revert the three patchsets that added XM support.
Petr Machata (3):
mlxsw: Revert "Introduce initial XM router support"
mlxsw: Revert "Prepare for XM implementation - prefix insertion and
removal"
mlxsw: Revert "Prepare for XM implementation - LPM trees"
drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 - drivers/net/ethernet/mellanox/mlxsw/cmd.h | 30 - drivers/net/ethernet/mellanox/mlxsw/core.c | 12 - drivers/net/ethernet/mellanox/mlxsw/core.h | 12 +- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 3 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 33 +- drivers/net/ethernet/mellanox/mlxsw/reg.h | 670 +------------- .../net/ethernet/mellanox/mlxsw/spectrum.c | 5 - .../ethernet/mellanox/mlxsw/spectrum_router.c | 857 +++++------------- .../ethernet/mellanox/mlxsw/spectrum_router.h | 75 -- .../mellanox/mlxsw/spectrum_router_xm.c | 812 ----------------- 11 files changed, 244 insertions(+), 2266 deletions(-) delete mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c
Signature · 1 line
2.36.1
Ido Schimmel
maintainerPATCH 1/3 mlxsw: Revert "Introduce initial XM router support"
From: Petr Machata <[email protected]>
This reverts commit 75c2a8fe8e39 ("Merge branch
'mlxsw-introduce-initial-xm-router-support'").
--- drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 - drivers/net/ethernet/mellanox/mlxsw/cmd.h | 30 - drivers/net/ethernet/mellanox/mlxsw/core.c | 12 - drivers/net/ethernet/mellanox/mlxsw/core.h | 12 +- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 3 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 33 +- drivers/net/ethernet/mellanox/mlxsw/reg.h | 585 +------------ .../net/ethernet/mellanox/mlxsw/spectrum.c | 5 - .../ethernet/mellanox/mlxsw/spectrum_router.c | 23 +- .../ethernet/mellanox/mlxsw/spectrum_router.h | 10 - .../mellanox/mlxsw/spectrum_router_xm.c | 812 ------------------ 11 files changed, 8 insertions(+), 1518 deletions(-) delete mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c
drivers/net/ethernet/mellanox/mlxsw/Makefile +0 -1
@@ -12,7 +12,6 @@ mlxsw_i2c-objs := i2c.o obj-$(CONFIG_MLXSW_SPECTRUM) += mlxsw_spectrum.o mlxsw_spectrum-objs := spectrum.o spectrum_buffers.o \ spectrum_switchdev.o spectrum_router.o \ - spectrum_router_xm.o \ spectrum1_kvdl.o spectrum2_kvdl.o \ spectrum_kvdl.o \ spectrum_acl_tcam.o spectrum_acl_ctcam.o \
drivers/net/ethernet/mellanox/mlxsw/cmd.h +0 -30
@@ -343,23 +343,6 @@ static inline int mlxsw_cmd_boardinfo(struct mlxsw_core *mlxsw_core, 0, 0, false, out_mbox, MLXSW_CMD_MBOX_SIZE); } -/* cmd_mbox_xm_num_local_ports -* Number of local_ports connected to the xm. -* Each local port is a 4x -* Spectrum-2/3: 25G -* Spectrum-4: 50G -*/ -MLXSW_ITEM32 (cmd_mbox, boardinfo, xm_num_local_ports,0x00 ,4 ,3 ); - -/* cmd_mbox_xm_exists -* An XM (eXtanded Mezanine, e.g. used for the XLT) is connected on the board. -*/ -MLXSW_ITEM32 (cmd_mbox, boardinfo, xm_exists,0x00 ,0 ,1 ); - -/* cmd_mbox_xm_local_port_entry -*/ -MLXSW_ITEM_BIT_ARRAY (cmd_mbox, boardinfo, xm_local_port_entry,0x04 ,4 ,8 ); -/* cmd_mbox_boardinfo_intapin * When PCIe interrupt messages are being used, this value is used for clearing * an interrupt. When using MSI-X, this register is not used.
@@ -674,12 +657,6 @@ MLXSW_ITEM32(cmd_mbox, config_profile, set_kvd_hash_double_size, 0x0C, 26, 1);*/ MLXSW_ITEM32 (cmd_mbox, config_profile, set_cqe_version,0x08 ,0 ,1 ); -/* cmd_mbox_config_set_kvh_xlt_cache_mode -* Capability bit. Setting a bit to 1 configures the profile -* according to the mailbox contents. -*/ -MLXSW_ITEM32 (cmd_mbox, config_profile, set_kvh_xlt_cache_mode,0x08 ,3 ,1 ); -/* cmd_mbox_config_profile_max_vepa_channels * Maximum number of VEPA channels per port (0 through 16) * 0 - multi-channel VEPA is disabled
@@ -806,13 +783,6 @@ MLXSW_ITEM32(cmd_mbox, config_profile, adaptive_routing_group_cap, 0x4C, 0, 16);*/ MLXSW_ITEM32 (cmd_mbox, config_profile, arn,0x50 ,31 ,1 ); -/* cmd_mbox_config_profile_kvh_xlt_cache_mode -* KVH XLT cache mode: -* 0 - XLT can use all KVH as best-effort -* 1 - XLT cache uses 1/2 KVH -*/ -MLXSW_ITEM32 (cmd_mbox, config_profile, kvh_xlt_cache_mode,0x50 ,8 ,4 ); -/* cmd_mbox_config_kvd_linear_size * KVD Linear Size * Valid for Spectrum only
drivers/net/ethernet/mellanox/mlxsw/core.c +0 -12
@@ -3151,18 +3151,6 @@ mlxsw_core_port_linecard_get(struct mlxsw_core *mlxsw_core,return mlxsw_core_port->linecard; } -bool mlxsw_core_port_is_xm (const struct mlxsw_core *mlxsw_core,u16 local_port) -{ -const struct mlxsw_bus_info *bus_info = mlxsw_core->bus_info; -int i; - -for (i =0 ; i < bus_info->xm_local_ports_count; i++) -if (bus_info->xm_local_ports[i] == local_port) -return true; -return false; -} -EXPORT_SYMBOL (mlxsw_core_port_is_xm); -void mlxsw_core_ports_remove_selected (struct mlxsw_core *mlxsw_core,bool (*selector)(void *priv,u16 local_port),void *priv)
drivers/net/ethernet/mellanox/mlxsw/core.h +2 -10
@@ -261,7 +261,6 @@ mlxsw_core_port_devlink_port_get(struct mlxsw_core *mlxsw_core,struct mlxsw_linecard *mlxsw_core_port_linecard_get (struct mlxsw_core *mlxsw_core,u16 local_port); -bool mlxsw_core_port_is_xm (const struct mlxsw_core *mlxsw_core,u16 local_port); void mlxsw_core_ports_remove_selected(struct mlxsw_core *mlxsw_core, bool (*selector)(void *priv, u16 local_port),
@@ -296,8 +295,7 @@ struct mlxsw_config_profile { used_max_pkey:1, used_ar_sec:1, used_adaptive_routing_group_cap:1, - used_kvd_sizes:1, - used_kvh_xlt_cache_mode:1; + used_kvd_sizes:1;u8 max_vepa_channels;u16 max_mid;u16 max_pgt;
@@ -319,7 +317,6 @@ struct mlxsw_config_profile {u32 kvd_linear_size;u8 kvd_hash_single_parts;u8 kvd_hash_double_parts; -u8 kvh_xlt_cache_mode;struct mlxsw_swid_config swid_config[MLXSW_CONFIG_PROFILE_SWID_COUNT ]; };
@@ -478,8 +475,6 @@ struct mlxsw_fw_rev {u16 can_reset_minor; }; -#define MLXSW_BUS_INFO_XM_LOCAL_PORTS_MAX 4 -struct mlxsw_bus_info {const char *device_kind;const char *device_name;
@@ -488,10 +483,7 @@ struct mlxsw_bus_info {u8 vsd[MLXSW_CMD_BOARDINFO_VSD_LEN ];u8 psid[MLXSW_CMD_BOARDINFO_PSID_LEN ]; u8 low_frequency:1, - read_frc_capable:1, - xm_exists:1; -u8 xm_local_ports_count; -u8 xm_local_ports[MLXSW_BUS_INFO_XM_LOCAL_PORTS_MAX ]; + read_frc_capable:1; };struct mlxsw_hwmon ;
drivers/net/ethernet/mellanox/mlxsw/minimal.c +1 -2
@@ -359,8 +359,7 @@ static int mlxsw_m_ports_create(struct mlxsw_m *mlxsw_m)/* Create port objects for each valid entry */ devl_lock (devlink);for (i =0 ; i < mlxsw_m->max_ports; i++) { -if (mlxsw_m->module_to_port[i] >0 && - !mlxsw_core_port_is_xm (mlxsw_m->core, i)) { +if (mlxsw_m->module_to_port[i] >0 ) { err =mlxsw_m_port_create (mlxsw_m, mlxsw_m->module_to_port[i], i);
drivers/net/ethernet/mellanox/mlxsw/pci.c +1 -32
@@ -1252,12 +1252,6 @@ static int mlxsw_pci_config_profile(struct mlxsw_pci *mlxsw_pci, char *mbox,mlxsw_cmd_mbox_config_profile_kvd_hash_double_size_set (mbox,MLXSW_RES_GET (res,KVD_DOUBLE_SIZE )); } -if (profile->used_kvh_xlt_cache_mode) { -mlxsw_cmd_mbox_config_profile_set_kvh_xlt_cache_mode_set ( - mbox,1 ); -mlxsw_cmd_mbox_config_profile_kvh_xlt_cache_mode_set ( - mbox, profile->kvh_xlt_cache_mode); - }for (i =0 ; i <MLXSW_CONFIG_PROFILE_SWID_COUNT ; i++) mlxsw_pci_config_profile_swid_config(mlxsw_pci, mbox, i,
@@ -1271,30 +1265,6 @@ static int mlxsw_pci_config_profile(struct mlxsw_pci *mlxsw_pci, char *mbox,return mlxsw_cmd_config_profile_set (mlxsw_pci->core, mbox); } -static int mlxsw_pci_boardinfo_xm_process (struct mlxsw_pci *mlxsw_pci, -struct mlxsw_bus_info *bus_info, -char *mbox) -{ -int count =mlxsw_cmd_mbox_boardinfo_xm_num_local_ports_get (mbox); -int i; - -if (!mlxsw_cmd_mbox_boardinfo_xm_exists_get (mbox)) -return 0 ; - - bus_info->xm_exists = true; - -if (count >MLXSW_BUS_INFO_XM_LOCAL_PORTS_MAX ) { -dev_err (&mlxsw_pci->pdev->dev,"Invalid number of XM local ports\n" ); -return -EINVAL ; - } - bus_info->xm_local_ports_count = count; -for (i =0 ; i < count; i++) - bus_info->xm_local_ports[i] = -mlxsw_cmd_mbox_boardinfo_xm_local_port_entry_get (mbox, - i); -return 0 ; -} -static int mlxsw_pci_boardinfo (struct mlxsw_pci *mlxsw_pci,char *mbox) {struct mlxsw_bus_info *bus_info = &mlxsw_pci->bus_info;
@@ -1306,8 +1276,7 @@ static int mlxsw_pci_boardinfo(struct mlxsw_pci *mlxsw_pci, char *mbox)return err;mlxsw_cmd_mbox_boardinfo_vsd_memcpy_from (mbox, bus_info->vsd);mlxsw_cmd_mbox_boardinfo_psid_memcpy_from (mbox, bus_info->psid); - -return mlxsw_pci_boardinfo_xm_process (mlxsw_pci, bus_info, mbox); +return 0 ; } static int mlxsw_pci_fw_area_init(struct mlxsw_pci *mlxsw_pci, char *mbox,
drivers/net/ethernet/mellanox/mlxsw/reg.h +3 -582
598 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +0 -5
@@ -2105,9 +2105,6 @@ static int mlxsw_sp_port_module_info_init(struct mlxsw_sp *mlxsw_sp)return -ENOMEM ;for (i =1 ; i < max_ports; i++) { -if (mlxsw_core_port_is_xm (mlxsw_sp->core, i)) -continue ; - port_mapping = &mlxsw_sp->port_mapping[i]; err =mlxsw_sp_port_module_info_get (mlxsw_sp, i, port_mapping);if (err)
@@ -3410,8 +3407,6 @@ static const struct mlxsw_config_profile mlxsw_sp2_config_profile = { .max_ib_mc = 0, .used_max_pkey = 1, .max_pkey = 0, - .used_kvh_xlt_cache_mode = 1, - .kvh_xlt_cache_mode = 1, .swid_config = { { .used_type = 1,
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +1 -22
@@ -551,12 +551,6 @@ struct mlxsw_sp_vr {refcount_t ul_rif_refcnt; }; -static int mlxsw_sp_router_ll_basic_init (struct mlxsw_sp *mlxsw_sp,u16 vr_id, -enum mlxsw_sp_l3proto proto) -{ -return 0 ; -} -static int mlxsw_sp_router_ll_basic_ralta_write (struct mlxsw_sp *mlxsw_sp,char *xralta_pl) { return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(ralta),
@@ -586,10 +580,6 @@ static struct mlxsw_sp_fib *mlxsw_sp_fib_create(struct mlxsw_sp *mlxsw_sp,struct mlxsw_sp_fib *fib;int err; - err = ll_ops->init (mlxsw_sp, vr->id, proto); -if (err) -return ERR_PTR (err); - lpm_tree = mlxsw_sp->router->lpm.proto_trees[proto]; fib =kzalloc (sizeof (*fib),GFP_KERNEL );if (!fib)
@@ -7770,7 +7760,6 @@ static void mlxsw_sp_router_fib_event_work(struct work_struct *work) op_ctx->bulk_ok = !list_is_last (&fib_event->list, &fib_event_queue) && fib_event->family == next_fib_event->family && fib_event->event == next_fib_event->event; - op_ctx->event = fib_event->event;/* In case family of this and the previous entry are different, context * reinitialization is going to be needed now, indicate that.
@@ -10534,7 +10523,6 @@ static void __mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp) }static const struct mlxsw_sp_router_ll_ops mlxsw_sp_router_ll_basic_ops = { - .init = mlxsw_sp_router_ll_basic_init, .ralta_write = mlxsw_sp_router_ll_basic_ralta_write, .ralst_write = mlxsw_sp_router_ll_basic_ralst_write, .raltb_write = mlxsw_sp_router_ll_basic_raltb_write,
@@ -10646,13 +10634,7 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp,if (err) goto err_router_ops_init; - err =mlxsw_sp_router_xm_init (mlxsw_sp); -if (err) - goto err_xm_init; - - router->proto_ll_ops[MLXSW_SP_L3_PROTO_IPV4 ] =mlxsw_sp_router_xm_ipv4_is_supported (mlxsw_sp) ? - &mlxsw_sp_router_ll_xm_ops : - &mlxsw_sp_router_ll_basic_ops; + router->proto_ll_ops[MLXSW_SP_L3_PROTO_IPV4 ] = &mlxsw_sp_router_ll_basic_ops; router->proto_ll_ops[MLXSW_SP_L3_PROTO_IPV6 ] = &mlxsw_sp_router_ll_basic_ops; err =mlxsw_sp_router_ll_op_ctx_init (router);
@@ -10799,8 +10781,6 @@ int mlxsw_sp_router_init(struct mlxsw_sp *mlxsw_sp,cancel_delayed_work_sync (&mlxsw_sp->router->nh_grp_activity_dw);mlxsw_sp_router_ll_op_ctx_fini (router); err_ll_op_ctx_init: -mlxsw_sp_router_xm_fini (mlxsw_sp); -err_xm_init: err_router_ops_init:mutex_destroy (&mlxsw_sp->router->lock);kfree (mlxsw_sp->router);
@@ -10832,7 +10812,6 @@ void mlxsw_sp_router_fini(struct mlxsw_sp *mlxsw_sp)__mlxsw_sp_router_fini (mlxsw_sp);cancel_delayed_work_sync (&mlxsw_sp->router->nh_grp_activity_dw);mlxsw_sp_router_ll_op_ctx_fini (mlxsw_sp->router); -mlxsw_sp_router_xm_fini (mlxsw_sp);mutex_destroy (&mlxsw_sp->router->lock);kfree (mlxsw_sp->router); }
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h +0 -10
@@ -24,7 +24,6 @@ struct mlxsw_sp_fib_entry_op_ctx {* the context priv is initialized. */ struct list_head fib_entry_priv_list; -unsigned long event;unsigned long ll_priv[]; };
@@ -79,7 +78,6 @@ struct mlxsw_sp_router {const struct mlxsw_sp_router_ll_ops *proto_ll_ops[MLXSW_SP_L3_PROTO_MAX ];struct mlxsw_sp_fib_entry_op_ctx *ll_op_ctx;u16 lb_rif_index; -struct mlxsw_sp_router_xm *xm;const struct mlxsw_sp_adj_grp_size_range *adj_grp_size_ranges;size_t adj_grp_size_ranges_count;struct delayed_work nh_grp_activity_dw;
@@ -105,8 +103,6 @@ enum mlxsw_sp_fib_entry_op {* register sets to work with ordinary and XM trees and FIB entries. */ struct mlxsw_sp_router_ll_ops { -int (*init)(struct mlxsw_sp *mlxsw_sp,u16 vr_id, -enum mlxsw_sp_l3proto proto);int (*ralta_write)(struct mlxsw_sp *mlxsw_sp,char *xralta_pl);int (*ralst_write)(struct mlxsw_sp *mlxsw_sp,char *xralst_pl);int (*raltb_write)(struct mlxsw_sp *mlxsw_sp,char *xraltb_pl);
@@ -232,10 +228,4 @@ int mlxsw_sp_ipip_ecn_decap_init(struct mlxsw_sp *mlxsw_sp);struct net_device *mlxsw_sp_ipip_netdev_ul_dev_get (const struct net_device *ol_dev); -extern const struct mlxsw_sp_router_ll_ops mlxsw_sp_router_ll_xm_ops; - -int mlxsw_sp_router_xm_init (struct mlxsw_sp *mlxsw_sp); -void mlxsw_sp_router_xm_fini (struct mlxsw_sp *mlxsw_sp); -bool mlxsw_sp_router_xm_ipv4_is_supported (const struct mlxsw_sp *mlxsw_sp); -#endif /* _MLXSW_ROUTER_H_*/
drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c deleted +0 -812
812 lines not on this page · raw message
Signature · 1 line
2.36.1
Ido Schimmel
maintainerPATCH 2/3 mlxsw: Revert "Prepare for XM implementation - prefix insertion and removal"
In reply to Ido SchimmelFrom: Petr Machata <[email protected]>
This reverts commit e7086213f7b4 ("Merge branch 'mlxsw-spectrum-prepare-for-xm-implementation-prefix-insertion-and-removal'").
--- drivers/net/ethernet/mellanox/mlxsw/reg.h | 8 +- .../ethernet/mellanox/mlxsw/spectrum_router.c | 736 +++++------------- .../ethernet/mellanox/mlxsw/spectrum_router.h | 54 -- 3 files changed, 209 insertions(+), 589 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/reg.h +3 -5
@@ -7848,11 +7848,10 @@ static inline void mlxsw_reg_ralue_pack4(char *payload,enum mlxsw_reg_ralxx_protocol protocol, enum mlxsw_reg_ralue_op op, u16 virtual_router, u8 prefix_len, - u32 *dip) + u32 dip) {mlxsw_reg_ralue_pack (payload ,protocol ,op ,virtual_router ,prefix_len ); -if (dip) -mlxsw_reg_ralue_dip4_set (payload, *dip); +mlxsw_reg_ralue_dip4_set (payload, dip); } static inline void mlxsw_reg_ralue_pack6(char *payload,
@@ -7862,8 +7861,7 @@ static inline void mlxsw_reg_ralue_pack6(char *payload, const void *dip) {mlxsw_reg_ralue_pack (payload, protocol, op, virtual_router, prefix_len); -if (dip) -mlxsw_reg_ralue_dip6_memcpy_to (payload, dip); +mlxsw_reg_ralue_dip6_memcpy_to (payload, dip); } static inline void
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +206 -530
1,281 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h +0 -54
78 lines not on this page · raw message
Signature · 1 line
2.36.1
Ido Schimmel
maintainerPATCH 3/3 mlxsw: Revert "Prepare for XM implementation - LPM trees"
In reply to Ido SchimmelFrom: Petr Machata <[email protected]>
This reverts commit 923ba95ea22d ("Merge branch 'mlxsw-spectrum-prepare-for-xm-implementation-lpm-trees'").
--- drivers/net/ethernet/mellanox/mlxsw/reg.h | 83 --------------- .../ethernet/mellanox/mlxsw/spectrum_router.c | 100 ++++++------------ .../ethernet/mellanox/mlxsw/spectrum_router.h | 11 -- 3 files changed, 31 insertions(+), 163 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/reg.h +0 -83
@@ -8924,86 +8924,6 @@ mlxsw_reg_rmft2_ipv6_pack(char *payload, bool v, u16 offset, u16 virtual_router,mlxsw_reg_rmft2_sip6_mask_memcpy_to (payload, (void *)&sip6_mask); } -/* Note that XRALXX register position violates the rule of ordering register -* definition by the ID. However, XRALXX pack helpers are using RALXX pack -* helpers, RALXX registers have higher IDs. -*/ - -/* XRALTA - XM Router Algorithmic LPM Tree Allocation Register -* ----------------------------------------------------------- -* The XRALTA is used to allocate the XLT LPM trees. -* -* This register embeds original RALTA register. -*/ -#define MLXSW_REG_XRALTA_ID 0x7811 -#define MLXSW_REG_XRALTA_LEN 0x08 -#define MLXSW_REG_XRALTA_RALTA_OFFSET 0x04 - -MLXSW_REG_DEFINE (xralta,MLXSW_REG_XRALTA_ID ,MLXSW_REG_XRALTA_LEN ); - -static inline void mlxsw_reg_xralta_pack (char *payload,bool alloc, -enum mlxsw_reg_ralxx_protocol protocol, -u8 tree_id) -{ -char *ralta_payload = payload +MLXSW_REG_XRALTA_RALTA_OFFSET ; - -MLXSW_REG_ZERO (xralta, payload); -mlxsw_reg_ralta_pack (ralta_payload, alloc, protocol, tree_id); -} - -/* XRALST - XM Router Algorithmic LPM Structure Tree Register -* ---------------------------------------------------------- -* The XRALST is used to set and query the structure of an XLT LPM tree. -* -* This register embeds original RALST register. -*/ -#define MLXSW_REG_XRALST_ID 0x7812 -#define MLXSW_REG_XRALST_LEN 0x108 -#define MLXSW_REG_XRALST_RALST_OFFSET 0x04 - -MLXSW_REG_DEFINE (xralst,MLXSW_REG_XRALST_ID ,MLXSW_REG_XRALST_LEN ); - -static inline void mlxsw_reg_xralst_pack (char *payload,u8 root_bin,u8 tree_id) -{ -char *ralst_payload = payload +MLXSW_REG_XRALST_RALST_OFFSET ; - -MLXSW_REG_ZERO (xralst, payload); -mlxsw_reg_ralst_pack (ralst_payload, root_bin, tree_id); -} - -static inline void mlxsw_reg_xralst_bin_pack (char *payload,u8 bin_number, -u8 left_child_bin, -u8 right_child_bin) -{ -char *ralst_payload = payload +MLXSW_REG_XRALST_RALST_OFFSET ; - -mlxsw_reg_ralst_bin_pack (ralst_payload, bin_number, left_child_bin, - right_child_bin); -} - -/* XRALTB - XM Router Algorithmic LPM Tree Binding Register -* -------------------------------------------------------- -* The XRALTB register is used to bind virtual router and protocol -* to an allocated LPM tree. -* -* This register embeds original RALTB register. -*/ -#define MLXSW_REG_XRALTB_ID 0x7813 -#define MLXSW_REG_XRALTB_LEN 0x08 -#define MLXSW_REG_XRALTB_RALTB_OFFSET 0x04 - -MLXSW_REG_DEFINE (xraltb,MLXSW_REG_XRALTB_ID ,MLXSW_REG_XRALTB_LEN ); - -static inline void mlxsw_reg_xraltb_pack (char *payload,u16 virtual_router, -enum mlxsw_reg_ralxx_protocol protocol, -u8 tree_id) -{ -char *raltb_payload = payload +MLXSW_REG_XRALTB_RALTB_OFFSET ; - -MLXSW_REG_ZERO (xraltb, payload); -mlxsw_reg_raltb_pack (raltb_payload, virtual_router, protocol, tree_id); -} -/* MFCR - Management Fan Control Register * -------------------------------------- * This register controls the settings of the Fan Speed PWM mechanism.
@@ -12510,9 +12430,6 @@ static const struct mlxsw_reg_info *mlxsw_reg_infos[] = {MLXSW_REG (rigr2),MLXSW_REG (recr2),MLXSW_REG (rmft2), -MLXSW_REG (xralta), -MLXSW_REG (xralst), -MLXSW_REG (xraltb),MLXSW_REG (mfcr),MLXSW_REG (mfsc), MLXSW_REG(mfsm),
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +31 -69
227 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h +0 -11
@@ -51,8 +51,6 @@ struct mlxsw_sp_router {const struct mlxsw_sp_ipip_ops **ipip_ops_arr;struct mlxsw_sp_router_nve_decap nve_decap_config;struct mutex lock;/* Protects shared router resources */ -/* One set of ops for each protocol: IPv4 and IPv6 */ -const struct mlxsw_sp_router_ll_ops *proto_ll_ops[MLXSW_SP_L3_PROTO_MAX ];struct mlxsw_sp_fib_entry_op_ctx *ll_op_ctx;u16 lb_rif_index;const struct mlxsw_sp_adj_grp_size_range *adj_grp_size_ranges;
@@ -64,15 +62,6 @@ struct mlxsw_sp_router {u32 adj_trap_index; }; -/* Low-level router ops. Basically this is to handle the different -* register sets to work with ordinary and XM trees and FIB entries. -*/ -struct mlxsw_sp_router_ll_ops { -int (*ralta_write)(struct mlxsw_sp *mlxsw_sp,char *xralta_pl); -int (*ralst_write)(struct mlxsw_sp *mlxsw_sp,char *xralst_pl); -int (*raltb_write)(struct mlxsw_sp *mlxsw_sp,char *xraltb_pl); -}; -struct mlxsw_sp_rif_ipip_lb ;struct mlxsw_sp_rif_ipip_lb_config {enum mlxsw_reg_ritr_loopback_ipip_type lb_ipipt;
Signature · 1 line
2.36.1
This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Mon, 13 Jun 2022 16:21:13 +0300 you wrote:
The XM was supposed to be an external device connected to the Spectrum-{2,3} ASICs using dedicated Ethernet ports. Its purpose was to increase the number of routes that can be offloaded to hardware. This was achieved by having the ASIC act as a cache that refers cache misses to the XM where the FIB is stored and LPM lookup is performed.
Testing was done over an emulator and dedicated setups in the lab, but the product was discontinued before shipping to customers.
[...]
Here is the summary with links:
- [net-next,1/3] mlxsw: Revert "Introduce initial XM router support"
https://git.kernel.org/netdev/net-next/c/6a4b02b8fa40 - [net-next,2/3] mlxsw: Revert "Prepare for XM implementation - prefix insertion and removal" https://git.kernel.org/netdev/net-next/c/725ff5320443 - [net-next,3/3] mlxsw: Revert "Prepare for XM implementation - LPM trees" https://git.kernel.org/netdev/net-next/c/87c0a3c6766e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html