net/bnxt: support wildcard pattern matching
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Sun, 30 May 2021 08:59:12 +0000 (14:29 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 8 Jul 2021 00:02:05 +0000 (02:02 +0200)
The computational field is enabled for wild card pattern support.
The template checks the computational field to add a flow as wild
card entry or exact match entry.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h

index 37dedbe..3c45acd 100644 (file)
@@ -50,8 +50,8 @@ ulp_rte_parser_field_bitmap_update(struct ulp_rte_parser_params *params,
                ULP_INDEX_BITMAP_SET(params->fld_bitmap.bits, idx);
                /* Not exact match */
                if (!ulp_bitmap_is_ones(field->mask, field->size))
-                       ULP_BITMAP_SET(params->fld_bitmap.bits,
-                                      BNXT_ULP_MATCH_TYPE_BITMASK_WM);
+                       ULP_COMP_FLD_IDX_WR(params,
+                                           BNXT_ULP_CF_IDX_WC_MATCH, 1);
        } else {
                ULP_INDEX_BITMAP_RESET(params->fld_bitmap.bits, idx);
        }
index d42933d..5e83910 100644 (file)
@@ -180,7 +180,8 @@ enum bnxt_ulp_cf_idx {
        BNXT_ULP_CF_IDX_FID = 49,
        BNXT_ULP_CF_IDX_HDR_SIG_ID = 50,
        BNXT_ULP_CF_IDX_FLOW_SIG_ID = 51,
-       BNXT_ULP_CF_IDX_LAST = 52
+       BNXT_ULP_CF_IDX_WC_MATCH = 52,
+       BNXT_ULP_CF_IDX_LAST = 53
 };
 
 enum bnxt_ulp_cond_list_opc {