numam-dpdk/drivers/net/bnxt/tf_ulp/ulp_template_db.h

292 lines
9.9 KiB
C
Raw Normal View History

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2014-2019 Broadcom
* All rights reserved.
*/
/*
* date: Mon Mar 9 02:37:53 2020
* version: 0.0
*/
#ifndef ULP_TEMPLATE_DB_H_
#define ULP_TEMPLATE_DB_H_
#define BNXT_ULP_MAX_NUM_DEVICES 4
enum bnxt_ulp_action_bit {
BNXT_ULP_ACTION_BIT_MARK = 0x0000000000000001,
BNXT_ULP_ACTION_BIT_DROP = 0x0000000000000002,
BNXT_ULP_ACTION_BIT_COUNT = 0x0000000000000004,
BNXT_ULP_ACTION_BIT_RSS = 0x0000000000000008,
BNXT_ULP_ACTION_BIT_METER = 0x0000000000000010,
BNXT_ULP_ACTION_BIT_VNIC = 0x0000000000000020,
BNXT_ULP_ACTION_BIT_VPORT = 0x0000000000000040,
BNXT_ULP_ACTION_BIT_VXLAN_DECAP = 0x0000000000000080,
BNXT_ULP_ACTION_BIT_NVGRE_DECAP = 0x0000000000000100,
BNXT_ULP_ACTION_BIT_OF_POP_MPLS = 0x0000000000000200,
BNXT_ULP_ACTION_BIT_OF_PUSH_MPLS = 0x0000000000000400,
BNXT_ULP_ACTION_BIT_MAC_SWAP = 0x0000000000000800,
BNXT_ULP_ACTION_BIT_SET_MAC_SRC = 0x0000000000001000,
BNXT_ULP_ACTION_BIT_SET_MAC_DST = 0x0000000000002000,
BNXT_ULP_ACTION_BIT_OF_POP_VLAN = 0x0000000000004000,
BNXT_ULP_ACTION_BIT_OF_PUSH_VLAN = 0x0000000000008000,
BNXT_ULP_ACTION_BIT_OF_SET_VLAN_PCP = 0x0000000000010000,
BNXT_ULP_ACTION_BIT_OF_SET_VLAN_VID = 0x0000000000020000,
BNXT_ULP_ACTION_BIT_SET_IPV4_SRC = 0x0000000000040000,
BNXT_ULP_ACTION_BIT_SET_IPV4_DST = 0x0000000000080000,
BNXT_ULP_ACTION_BIT_SET_IPV6_SRC = 0x0000000000100000,
BNXT_ULP_ACTION_BIT_SET_IPV6_DST = 0x0000000000200000,
BNXT_ULP_ACTION_BIT_DEC_TTL = 0x0000000000400000,
BNXT_ULP_ACTION_BIT_SET_TP_SRC = 0x0000000000800000,
BNXT_ULP_ACTION_BIT_SET_TP_DST = 0x0000000001000000,
BNXT_ULP_ACTION_BIT_VXLAN_ENCAP = 0x0000000002000000,
BNXT_ULP_ACTION_BIT_NVGRE_ENCAP = 0x0000000004000000,
BNXT_ULP_ACTION_BIT_LAST = 0x0000000008000000
};
enum bnxt_ulp_byte_order {
BNXT_ULP_BYTE_ORDER_BE,
BNXT_ULP_BYTE_ORDER_LE,
BNXT_ULP_BYTE_ORDER_LAST
};
enum bnxt_ulp_device_id {
BNXT_ULP_DEVICE_ID_WH_PLUS,
BNXT_ULP_DEVICE_ID_THOR,
BNXT_ULP_DEVICE_ID_STINGRAY,
BNXT_ULP_DEVICE_ID_STINGRAY2,
BNXT_ULP_DEVICE_ID_LAST
};
enum bnxt_ulp_fmf_mask {
BNXT_ULP_FMF_MASK_IGNORE,
BNXT_ULP_FMF_MASK_ANY,
BNXT_ULP_FMF_MASK_EXACT,
BNXT_ULP_FMF_MASK_WILDCARD,
BNXT_ULP_FMF_MASK_LAST
};
enum bnxt_ulp_mark_enable {
BNXT_ULP_MARK_ENABLE_NO = 0,
BNXT_ULP_MARK_ENABLE_YES = 1,
BNXT_ULP_MARK_ENABLE_LAST = 2
};
enum bnxt_ulp_mask_opc {
BNXT_ULP_MASK_OPC_SET_TO_CONSTANT = 0,
BNXT_ULP_MASK_OPC_SET_TO_HDR_FIELD = 1,
BNXT_ULP_MASK_OPC_SET_TO_REGFILE = 2,
BNXT_ULP_MASK_OPC_ADD_PAD = 3,
BNXT_ULP_MASK_OPC_LAST = 4
};
enum bnxt_ulp_priority {
BNXT_ULP_PRIORITY_LEVEL_0 = 0,
BNXT_ULP_PRIORITY_LEVEL_1 = 1,
BNXT_ULP_PRIORITY_LEVEL_2 = 2,
BNXT_ULP_PRIORITY_LEVEL_3 = 3,
BNXT_ULP_PRIORITY_LEVEL_4 = 4,
BNXT_ULP_PRIORITY_LEVEL_5 = 5,
BNXT_ULP_PRIORITY_LEVEL_6 = 6,
BNXT_ULP_PRIORITY_LEVEL_7 = 7,
BNXT_ULP_PRIORITY_NOT_USED = 8,
BNXT_ULP_PRIORITY_LAST = 9
};
enum bnxt_ulp_regfile_index {
BNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_0 = 0,
BNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_1 = 1,
BNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0 = 2,
BNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_1 = 3,
BNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_0 = 4,
BNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_1 = 5,
BNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_0 = 6,
BNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_1 = 7,
BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN = 8,
BNXT_ULP_REGFILE_INDEX_ACTION_PTR_0 = 9,
BNXT_ULP_REGFILE_INDEX_ENCAP_PTR_0 = 10,
BNXT_ULP_REGFILE_INDEX_ENCAP_PTR_1 = 11,
BNXT_ULP_REGFILE_INDEX_NOT_USED = 12,
BNXT_ULP_REGFILE_INDEX_LAST = 13
};
enum bnxt_ulp_resource_func {
BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE = 0,
BNXT_ULP_RESOURCE_FUNC_EM_TABLE = 1,
BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE = 2,
BNXT_ULP_RESOURCE_FUNC_IDENTIFIER = 3,
BNXT_ULP_RESOURCE_FUNC_HW_FID = 4,
BNXT_ULP_RESOURCE_FUNC_LAST = 5
};
enum bnxt_ulp_result_opc {
BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT = 0,
BNXT_ULP_RESULT_O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_IDX_ENCAP_IP_SZ = 4,
BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_SZ = 8,
BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_TYPE = 12,
BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_NUM = 16,
BNXT_ULP_ACT_PROP_IDX_ENCAP_L3_TYPE = 20,
BNXT_ULP_ACT_PROP_IDX_MPLS_POP_NUM = 24,
BNXT_ULP_ACT_PROP_IDX_MPLS_PUSH_NUM = 28,
BNXT_ULP_ACT_PROP_IDX_VNIC = 32,
BNXT_ULP_ACT_PROP_IDX_VPORT = 36,
BNXT_ULP_ACT_PROP_IDX_MARK = 40,
BNXT_ULP_ACT_PROP_IDX_COUNT = 44,
BNXT_ULP_ACT_PROP_IDX_METER = 48,
BNXT_ULP_ACT_PROP_IDX_SET_MAC_SRC = 52,
BNXT_ULP_ACT_PROP_IDX_SET_MAC_DST = 60,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_VLAN = 68,
BNXT_ULP_ACT_PROP_IDX_OF_SET_VLAN_PCP = 72,
BNXT_ULP_ACT_PROP_IDX_OF_SET_VLAN_VID = 76,
BNXT_ULP_ACT_PROP_IDX_SET_IPV4_SRC = 80,
BNXT_ULP_ACT_PROP_IDX_SET_IPV4_DST = 84,
BNXT_ULP_ACT_PROP_IDX_SET_IPV6_SRC = 88,
BNXT_ULP_ACT_PROP_IDX_SET_IPV6_DST = 104,
BNXT_ULP_ACT_PROP_IDX_SET_TP_SRC = 120,
BNXT_ULP_ACT_PROP_IDX_SET_TP_DST = 124,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_0 = 128,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_1 = 132,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_2 = 136,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_3 = 140,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_4 = 144,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_5 = 148,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_6 = 152,
BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_7 = 156,
BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_DMAC = 160,
BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_SMAC = 166,
BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG = 172,
BNXT_ULP_ACT_PROP_IDX_ENCAP_IP = 180,
BNXT_ULP_ACT_PROP_IDX_ENCAP_IP_SRC = 212,
BNXT_ULP_ACT_PROP_IDX_ENCAP_UDP = 228,
BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN = 232,
BNXT_ULP_ACT_PROP_IDX_LAST = 264
};
#endif /* _ULP_TEMPLATE_DB_H_ */