net/bnxt: support Thor template
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_rte_parser.h
index 7996317..4431f1b 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2014-2020 Broadcom
+ * Copyright(c) 2014-2021 Broadcom
  * All rights reserved.
  */
 
@@ -24,7 +24,7 @@
 #define BNXT_ULP_ENCAP_IPV6_DO                 2
 #define BNXT_ULP_ENCAP_IPV6_SIZE               24
 #define BNXT_ULP_ENCAP_UDP_SIZE                        4
-#define BNXT_ULP_INVALID_SVIF_VAL              -1U
+#define BNXT_ULP_INVALID_SVIF_VAL              -1UL
 
 #define        BNXT_ULP_GET_IPV6_VER(vtcf)             \
                        (((vtcf) & BNXT_ULP_PARSER_IPV6_VER_MASK) >> 28)
 #define        BNXT_ULP_PARSER_IPV6_TC                 0x0ff00000
 #define        BNXT_ULP_PARSER_IPV6_FLOW_LABEL         0x000fffff
 
+enum bnxt_ulp_prsr_action {
+       ULP_PRSR_ACT_DEFAULT = 0,
+       ULP_PRSR_ACT_MATCH_IGNORE = 1,
+       ULP_PRSR_ACT_MASK_IGNORE = 2,
+       ULP_PRSR_ACT_SPEC_IGNORE = 4
+};
+
 void
 bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,
                            struct ulp_rte_parser_params *params,
@@ -126,6 +133,25 @@ int32_t
 ulp_rte_vxlan_hdr_handler(const struct rte_flow_item *item,
                          struct ulp_rte_parser_params *params);
 
+/* Function to handle the parsing of RTE Flow item GRE Header. */
+int32_t
+ulp_rte_gre_hdr_handler(const struct rte_flow_item *item,
+                       struct ulp_rte_parser_params *params);
+
+int32_t
+ulp_rte_item_any_handler(const struct rte_flow_item *item __rte_unused,
+                        struct ulp_rte_parser_params *params __rte_unused);
+
+/* Function to handle the parsing of RTE Flow item ICMP Header. */
+int32_t
+ulp_rte_icmp_hdr_handler(const struct rte_flow_item *item,
+                        struct ulp_rte_parser_params *params);
+
+/* Function to handle the parsing of RTE Flow item ICMP6 Header. */
+int32_t
+ulp_rte_icmp6_hdr_handler(const struct rte_flow_item *item,
+                         struct ulp_rte_parser_params *params);
+
 /* Function to handle the parsing of RTE Flow item void Header. */
 int32_t
 ulp_rte_void_hdr_handler(const struct rte_flow_item *item,
@@ -236,4 +262,12 @@ int32_t
 ulp_rte_jump_act_handler(const struct rte_flow_action *action_item,
                         struct ulp_rte_parser_params *params);
 
+int32_t
+ulp_rte_sample_act_handler(const struct rte_flow_action *action_item,
+                          struct ulp_rte_parser_params *params);
+
+int32_t
+ulp_rte_shared_act_handler(const struct rte_flow_action *action_item,
+                          struct ulp_rte_parser_params *params);
+
 #endif /* _ULP_RTE_PARSER_H_ */