net/bnxt: refactor mapper opcodes
authorMike Baucom <michael.baucom@broadcom.com>
Fri, 12 Jun 2020 12:50:18 +0000 (18:20 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:30 +0000 (14:52 +0200)
commita4651725432ec4e6b0e5c39bfc6a497bb4fbdac2
tree4d14f30ac8674204bdc79ff44355c3ebe2de5389
parent8ce17d56a1f148af979c8da3e91b723b6cc19774
net/bnxt: refactor mapper opcodes

Unify the opcodes of the different enums into a single enum for reuse of
common processors. Also the ADD_PAD opcode is now SET_TO_ZERO.
This change better reflects the intent of the opcode and allows it to be
used in more circumstances without overloading the term pad.
The fields that were setting a constant zero have now been switched to
use the new SET_TO_ZERO opcode as an optimization.  The SET_TO_ZERO does
not copy data into the key/result/mask fields, but rather simply
increments the write pointer.

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_mapper.c
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
drivers/net/bnxt/tf_ulp/ulp_template_struct.h
drivers/net/bnxt/tf_ulp/ulp_utils.c
drivers/net/bnxt/tf_ulp/ulp_utils.h