[net-next mlxsw v10 0/3] mlxsw: lib: Manager for priority base pruning lookups and mlxsw driver usage

Tal Bar talb at mellanox.com
Mon Aug 13 01:57:18 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.
The third patch utilize the library in mlxsw driver to imrprove acl preformance.

change log:
v9 -> v10:
patch 3/3
	* NEW - Add utilization of the prune library. 
patch 2/3
	* Print keys and mask as a buffer and not integer.
	* Align patch to the changes in patch 1.
patch 1/3
	* Fix style issues and spelling.
	* Change comments to align to linux kernel-doc.
	* Align exposed strcuts and functions comments to kernel-doc style
	* Add role-back to prune_intersec_table_build
	* Improved symmetry across the code.
	* Change scope of variables to their exact context. 
	* Replace kmalloc instead of kzmalloc in few places 
	* Added .Documentation/prune.txt for prune documentation and removed Documentation/prune.txt
v8 -> v9:
patch 1/3
* 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 (3):
  lib: Introduce manager for priority base pruning lookups between
    tables
  lib: Add debugfs utility to prune library
  mlxsw: spectrum_acl: Add utilization of the prune library

 Documentation/00-INDEX                             |    2 +
 Documentation/prune.rst                            |  445 +++++
 MAINTAINERS                                        |    8 +
 drivers/net/ethernet/mellanox/mlxsw/Kconfig        |    1 +
 drivers/net/ethernet/mellanox/mlxsw/reg.h          |   16 +-
 .../ethernet/mellanox/mlxsw/spectrum1_acl_tcam.c   |    3 +-
 .../ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c   |  154 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c |    8 +
 .../ethernet/mellanox/mlxsw/spectrum_acl_atcam.c   |  138 +-
 .../ethernet/mellanox/mlxsw/spectrum_acl_ctcam.c   |    7 +-
 .../net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c |   61 +-
 .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c    |    9 +-
 .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.h    |   42 +-
 include/linux/prune.h                              |   85 +
 lib/Kconfig                                        |    8 +-
 lib/Kconfig.debug                                  |   10 +
 lib/Makefile                                       |    3 +
 lib/prune.c                                        | 1726 ++++++++++++++++++++
 lib/test_prune.c                                   | 1216 ++++++++++++++
 19 files changed, 3910 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/prune.rst
 create mode 100644 include/linux/prune.h
 create mode 100644 lib/prune.c
 create mode 100644 lib/test_prune.c

-- 
2.8.0



More information about the Linux-mlxsw mailing list