net/bnxt: add cache table type for TCAM lookup
authorMike Baucom <michael.baucom@broadcom.com>
Wed, 15 Apr 2020 14:49:15 +0000 (20:19 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:09 +0000 (13:57 +0200)
commit4bc32a80556eb85ca980dcc5e82455e3ae741007
treed7c58e8bf5b5e2d76d5cd93b3121b26ae1d4c644
parent072cb4a870ab950990504468838482d43e0936b5
net/bnxt: add cache table type for TCAM lookup

In order to re-use allocated resources and reduce search complexity for
simple keys, a generic software cache table was added for the TCAM. The
implementation is specifically only for keys that can be compressed to
less than 16 bits.  The keys are generated using the same mechanisms as
other search tables, but the table type is set to a cache that mirrors
the actual TCAM table. The allocated result fields are stored in the
cache entry and can be used for subsequent searches in future tables.

Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_mapper.c
drivers/net/bnxt/tf_ulp/ulp_mapper.h
drivers/net/bnxt/tf_ulp/ulp_template_db.c
drivers/net/bnxt/tf_ulp/ulp_template_db.h
drivers/net/bnxt/tf_ulp/ulp_template_struct.h