[RFC net-next mlxsw v8 0/2] mlxsw: lib: Manager for priority base pruning lookups

Tal Bar talb at mellanox.com
Sun Jul 8 22:26:40 AEST 2018

An object (e.g. packet) needs to be evaluated against a data base of
prune items (represented by {key, mask, priority}) contained in the prune 
object, so that the matching item with the highest priority is selected to
continue process the object. This patchset is addressing that problem, by
reducing the number of lookups between different tables prune object.

The first patch introducing this capability.
The second patch add debug information using debugfs infra.

change log:
v7 -> v8:
* Add debugfs for the prune library
* Update prune documentaion 
v6 -> v7:
* revisit the library APIs and update prune library internal implementation.
* Update commit message
* Fix static checks found by smatch and C=2
* Adjust prune_test to use new APIs
v5 -> v6:
* Add notification aggregation capability
* Adjust prune_test to handle notification aggregation
* Add getters for prune_item_nofity and prune_vector_item
* Fix many comments from v5 review
v1 -> v5:
* Fix style issues

Tal Bar (2):
  lib: Introduce manager for priority base pruning lookups between
  lib: Add debugfs utility to prune library

 Documentation/prune.txt |  285 +++++++++
 MAINTAINERS             |    8 +
 include/linux/prune.h   |   84 +++
 lib/Kconfig             |    6 +
 lib/Kconfig.debug       |   10 +
 lib/Makefile            |    3 +
 lib/prune.c             | 1633 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/test_prune.c        | 1198 ++++++++++++++++++++++++++++++++++
 8 files changed, 3227 insertions(+)
 create mode 100644 Documentation/prune.txt
 create mode 100644 include/linux/prune.h
 create mode 100644 lib/prune.c
 create mode 100644 lib/test_prune.c


More information about the Linux-mlxsw mailing list