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

Commit 3e32675c authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'mlxsw-Implement-periodic-ERP-rehash'



Ido Schimmel says:

====================
mlxsw: Implement periodic ERP rehash

Currently, an ERP set is created for each region according to rules
inserted and order of their insertion. However that might lead to
suboptimal ERP sets and possible unnecessary spillage into C-TCAM.
This patchset aims to fix this problem and introduces periodical checking
of used ERP sets and in case a better ERP set is possible for the given
set of rules, it rehashes the region to use the better ERP set.

Patch 1 prepares devlink params infra in order to fix the
        init/fini sequences.
Patch 2 implements hints infra in objagg library.
Patch 3 fixes a typo
Patch 4 adds number of root objects directly into objagg stats.
Patches 5-7 do split of multiple structs in Spectrum TCAM code.
Patch 8 introduces initial implementation of ERP rehash logic,
         according to objagg hints.
Patch 9 adds hints priv passing trought the layers.
Patch 10 adds multi field into PAGT reg. (new patch)
Patch 11 implements actual region rules migration in TCAM code.
Patch 12 adds a devlink param so user is able to control
         rehash interval.
Patch 13 adds couple of tracepoints in order to track
         rehash procedures.
Patch 14 adds a simple selftest to test region rehash.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a655fe9f c478d3c3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
fw_load_policy		[DEVICE, GENERIC]
			Configuration mode: driverinit

acl_region_rehash_interval	[DEVICE, DRIVER-SPECIFIC]
			Sets an interval for periodic ACL region rehashes.
			The value is in milliseconds, minimal value is "3000".
			Value "0" disables the periodic work.
			The first rehash will be run right after value is set.
			Type: u32
			Configuration mode: runtime
+3 −0
Original line number Diff line number Diff line
@@ -258,6 +258,9 @@ int bnxt_dl_register(struct bnxt *bp)
		netdev_err(bp->dev, "devlink_port_params_register failed");
		goto err_dl_port_unreg;
	}

	devlink_params_publish(dl);

	return 0;

err_dl_port_unreg:
+1 −0
Original line number Diff line number Diff line
@@ -3981,6 +3981,7 @@ static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
	if (ret)
		goto err_params_unregister;

	devlink_params_publish(devlink);
	pci_save_state(pdev);
	return 0;

+5 −0
Original line number Diff line number Diff line
@@ -1062,6 +1062,9 @@ __mlxsw_core_bus_device_register(const struct mlxsw_bus_info *mlxsw_bus_info,
			goto err_driver_init;
	}

	if (mlxsw_driver->params_register && !reload)
		devlink_params_publish(devlink);

	return 0;

err_driver_init:
@@ -1131,6 +1134,8 @@ void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core,
			return;
	}

	if (mlxsw_core->driver->params_unregister && !reload)
		devlink_params_unpublish(devlink);
	if (mlxsw_core->driver->fini)
		mlxsw_core->driver->fini(mlxsw_core);
	mlxsw_thermal_fini(mlxsw_core->thermal);
+5 −0
Original line number Diff line number Diff line
@@ -394,4 +394,9 @@ static inline void mlxsw_thermal_fini(struct mlxsw_thermal *thermal)

#endif

enum mlxsw_devlink_param_id {
	MLXSW_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX,
	MLXSW_DEVLINK_PARAM_ID_ACL_REGION_REHASH_INTERVAL,
};

#endif
Loading