]> git.baikalelectronics.ru Git - kernel.git/commit
lib: objagg: implement optimization hints assembly and use hints for object creation
authorJiri Pirko <jiri@mellanox.com>
Thu, 7 Feb 2019 11:22:46 +0000 (11:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Feb 2019 23:02:49 +0000 (15:02 -0800)
commit7375258e95349574b2413950558677c94103fe2d
tree5b8aca6dbaf69345aec08b325761cdf9162ebc9b
parentc341d33feb1d054ae7d4f6bfb2e8acbdbae7314c
lib: objagg: implement optimization hints assembly and use hints for object creation

Implement simple greedy algo to find more optimized root-delta tree for
a given objagg instance. This "hints" can be used by a driver to:
1) check if the hints are better (driver's choice) than the original
   objagg tree. Driver does comparison of objagg stats and hints stats.
2) use the hints to create a new objagg instance which will construct
   the root-delta tree according to the passed hints. Currently, only a
   simple greedy algorithm is implemented. Basically it finds the roots
   according to the maximal possible user count including deltas.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
include/linux/objagg.h
lib/objagg.c
lib/test_objagg.c