net/bnxt: modify mark manager validity checks
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Mon, 4 May 2020 17:25:02 +0000 (13:25 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:27 +0000 (15:54 +0200)
commit8a32d5c49207b6be78da9e965c9ab6472ae237ce
tree627c9f799bb0dcfa97a2b5f66adff949cca66764
parent17b6c8386d735d6f0bc745022dcd6176b908fc24
net/bnxt: modify mark manager validity checks

The ULP mark manager originally assumed that zero was an invalid
mark and used it for invalidation and deletion.  The mark manager
now supports adding zero as a mark, flags for validity and type,
and adds explicit bounds checking instead of relying on mask.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_mapper.c
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h