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

Tal Bar talb at mellanox.com
Tue Jul 24 21:55:37 AEST 2018

An object (e.g. packet) needs to be evaluated against a data base of
rules (represented by {key, mask, priority}). When such rules are spread 
along different tables, the naive way to do it, is to evaluate it against
all the rules in all tables. This patchset is addressing that problem,
by reducing the number of lookups between different tables in the same 
rule set.

The first patch introduces this capability.
The second patch add debug information using debugfs infrastructure.

change log:
v8 -> v9:
* update Documentation/prune.txt - still need to move it to .rst
* remove struct prune_vector_item_data
* remove struct prune_vector_item
* remove struct prune_vector
* remove struct prune_item_notify
* add comments on structs 
* change scope of intersec_tables_ht_params from global to prune attribute
* add new function - prune_intersec_table_demolish
* remove uneeded iterators on prune vector
* run pahole and fix packing issues
* removed struct intersec_item which used as a key
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/00-INDEX  |    2 +
 Documentation/prune.txt |  286 +++++++++
 MAINTAINERS             |    8 +
 include/linux/prune.h   |   78 +++
 lib/Kconfig             |    8 +-
 lib/Kconfig.debug       |   10 +
 lib/Makefile            |    3 +
 lib/prune.c             | 1596 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/test_prune.c        | 1217 ++++++++++++++++++++++++++++++++++++
 9 files changed, 3207 insertions(+), 1 deletion(-)
 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