ethdev: promote sibling iterators to stable
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_template_struct.h
index adb2266..0cbac66 100644 (file)
@@ -27,6 +27,8 @@
 #define BNXT_ULP_PROTO_HDR_UDP_NUM     4
 #define BNXT_ULP_PROTO_HDR_TCP_NUM     9
 #define BNXT_ULP_PROTO_HDR_VXLAN_NUM   4
+#define BNXT_ULP_PROTO_HDR_GRE_NUM     6
+#define BNXT_ULP_PROTO_HDR_ICMP_NUM    5
 #define BNXT_ULP_PROTO_HDR_MAX         128
 #define BNXT_ULP_PROTO_HDR_FIELD_SVIF_IDX      1
 
@@ -62,11 +64,13 @@ struct ulp_rte_act_prop {
 
 /* Structure to be used for passing all the parser functions */
 struct ulp_rte_parser_params {
+       STAILQ_ENTRY(ulp_rte_parser_params)  next;
        struct ulp_rte_hdr_bitmap       hdr_bitmap;
        struct ulp_rte_hdr_bitmap       hdr_fp_bit;
        struct ulp_rte_field_bitmap     fld_bitmap;
+       struct ulp_rte_field_bitmap     fld_s_bitmap;
        struct ulp_rte_hdr_field        hdr_field[BNXT_ULP_PROTO_HDR_MAX];
-       uint32_t                        comp_fld[BNXT_ULP_CF_IDX_LAST];
+       uint64_t                        comp_fld[BNXT_ULP_CF_IDX_LAST];
        uint32_t                        field_idx;
        struct ulp_rte_act_bitmap       act_bitmap;
        struct ulp_rte_act_prop         act_prop;
@@ -76,11 +80,15 @@ struct ulp_rte_parser_params {
        uint32_t                        parent_flow;
        uint32_t                        parent_fid;
        uint16_t                        func_id;
+       uint16_t                        port_id;
        uint32_t                        class_id;
        uint32_t                        act_tmpl;
        struct bnxt_ulp_context         *ulp_ctx;
        uint32_t                        hdr_sig_id;
        uint32_t                        flow_sig_id;
+       uint32_t                        flow_pattern_id;
+       uint32_t                        act_pattern_id;
+       uint8_t                         app_id;
 };
 
 /* Flow Parser Header Information Structure */
@@ -126,8 +134,10 @@ struct bnxt_ulp_class_match_info {
        uint32_t                class_tid;
        uint8_t                 act_vnic;
        uint8_t                 wc_pri;
+       uint8_t                 app_sig;
        uint32_t                hdr_sig_id;
        uint32_t                flow_sig_id;
+       uint32_t                flow_pattern_id;
 };
 
 /* Flow Matcher templates Structure for class entries */
@@ -144,6 +154,8 @@ struct bnxt_ulp_act_match_info {
        struct ulp_rte_bitmap   act_sig;
        uint32_t                act_hid;
        uint32_t                act_tid;
+       uint32_t                act_pattern_id;
+       uint8_t                 app_sig;
 };
 
 /* Flow Matcher templates Structure for action entries */
@@ -160,6 +172,17 @@ struct bnxt_ulp_mapper_cond_list_info {
        enum bnxt_ulp_cond_list_opc cond_list_opcode;
        uint32_t cond_start_idx;
        uint32_t cond_nums;
+       int32_t cond_true_goto;
+       int32_t cond_false_goto;
+};
+
+struct bnxt_ulp_mapper_func_info {
+       enum bnxt_ulp_func_opc          func_opc;
+       enum bnxt_ulp_func_src          func_src1;
+       enum bnxt_ulp_func_src          func_src2;
+       uint16_t                        func_opr1;
+       uint16_t                        func_opr2;
+       uint16_t                        func_dst_opr;
 };
 
 struct bnxt_ulp_template_device_tbls {
@@ -195,6 +218,16 @@ struct bnxt_ulp_device_params {
        uint64_t                        packet_count_mask;
        uint32_t                        byte_count_shift;
        uint32_t                        packet_count_shift;
+       uint32_t                        dynamic_pad_en;
+       uint16_t                        em_blk_size_bits;
+       uint16_t                        em_blk_align_bits;
+       uint16_t                        em_key_align_bytes;
+       uint16_t                        em_result_size_bits;
+       uint16_t                        wc_slice_width;
+       uint16_t                        wc_max_slices;
+       uint32_t                        wc_mode_list[4];
+       uint32_t                        wc_mod_list_max_size;
+       uint32_t                        wc_ctl_size_bits;
        const struct bnxt_ulp_template_device_tbls *dev_tbls;
 };
 
@@ -211,12 +244,13 @@ struct bnxt_ulp_mapper_tbl_info {
        uint32_t                        resource_type; /* TF_ enum type */
        enum bnxt_ulp_resource_sub_type resource_sub_type;
        struct bnxt_ulp_mapper_cond_list_info execute_info;
+       struct bnxt_ulp_mapper_func_info func_info;
        enum bnxt_ulp_cond_opc cond_opcode;
        uint32_t cond_operand;
-       enum bnxt_ulp_mem_type_opc      mem_type_opcode;
        uint8_t                         direction;
        enum bnxt_ulp_pri_opc           pri_opcode;
        uint32_t                        pri_operand;
+       enum bnxt_ulp_byte_order        byte_order;
 
        /* conflict resolution opcode */
        enum bnxt_ulp_accept_opc        accept_opcode;
@@ -245,19 +279,26 @@ struct bnxt_ulp_mapper_tbl_info {
        /* Table opcode for table operations */
        uint32_t                        tbl_opcode;
        uint32_t                        tbl_operand;
+       enum bnxt_ulp_generic_tbl_lkup_type gen_tbl_lkup_type;
 
        /* FDB table opcode */
        enum bnxt_ulp_fdb_opc           fdb_opcode;
        uint32_t                        fdb_operand;
+
+       /* Shared session */
+       enum bnxt_ulp_shared_session    shared_session;
 };
 
 struct bnxt_ulp_mapper_field_info {
-       uint8_t                 description[64];
-       enum bnxt_ulp_field_opc field_opcode;
-       uint16_t                field_bit_size;
-       uint8_t                 field_operand[16];
-       uint8_t                 field_operand_true[16];
-       uint8_t                 field_operand_false[16];
+       uint8_t                         description[64];
+       uint16_t                        field_bit_size;
+       enum bnxt_ulp_field_opc         field_opc;
+       enum bnxt_ulp_field_src         field_src1;
+       uint8_t                         field_opr1[16];
+       enum bnxt_ulp_field_src         field_src2;
+       uint8_t                         field_opr2[16];
+       enum bnxt_ulp_field_src         field_src3;
+       uint8_t                         field_opr3[16];
 };
 
 struct bnxt_ulp_mapper_key_info {
@@ -276,10 +317,27 @@ struct bnxt_ulp_mapper_ident_info {
 };
 
 struct bnxt_ulp_glb_resource_info {
+       uint8_t                         app_id;
+       enum bnxt_ulp_device_id         device_id;
+       enum tf_dir                     direction;
        enum bnxt_ulp_resource_func     resource_func;
        uint32_t                        resource_type; /* TF_ enum type */
        enum bnxt_ulp_glb_rf_idx        glb_regfile_index;
+};
+
+struct bnxt_ulp_resource_resv_info {
+       uint8_t                         app_id;
+       enum bnxt_ulp_device_id         device_id;
        enum tf_dir                     direction;
+       enum bnxt_ulp_resource_func     resource_func;
+       uint32_t                        resource_type; /* TF_ enum type */
+       uint32_t                        count;
+};
+
+struct bnxt_ulp_app_capabilities_info {
+       uint8_t                         app_id;
+       enum bnxt_ulp_device_id         device_id;
+       uint32_t                        flags;
 };
 
 struct bnxt_ulp_cache_tbl_params {
@@ -287,9 +345,13 @@ struct bnxt_ulp_cache_tbl_params {
 };
 
 struct bnxt_ulp_generic_tbl_params {
+       const char                      *name;
        uint16_t                        result_num_entries;
        uint16_t                        result_num_bytes;
        enum bnxt_ulp_byte_order        result_byte_order;
+       uint32_t                        hash_tbl_entries;
+       uint16_t                        num_buckets;
+       uint16_t                        key_num_bytes;
 };
 
 struct bnxt_ulp_shared_act_info {
@@ -320,6 +382,29 @@ extern uint32_t ulp_act_prop_map_table[];
  */
 extern struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[];
 
+/*
+ * The ulp_app_glb_resource_tbl provides the list of shared resources required
+ * in the event that shared session is enabled.
+ */
+extern struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[];
+
+/*
+ * The ulp_resource_resv_list provides the list of tf resources required when
+ * calling tf_open.
+ */
+extern struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[];
+
+/*
+ * The ulp_app_resource_resv_list provides the list of tf resources required
+ * when calling tf_open.
+ */
+extern struct bnxt_ulp_resource_resv_info ulp_app_resource_resv_list[];
+
+/*
+ * The_app_cap_info_list provides the list of ULP capabilities per app/device.
+ */
+extern struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[];
+
 /*
  * The ulp_cache_tbl_parms table provides the sizes of the cache tables the
  * mapper must dynamically allocate during initialization.